1 *> \brief \b ZLARCM copies all or part of a real two-dimensional array to a complex array.
3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
9 *> Download ZLARCM + dependencies
10 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarcm.f">
12 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarcm.f">
14 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarcm.f">
21 * SUBROUTINE ZLARCM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
23 * .. Scalar Arguments ..
24 * INTEGER LDA, LDB, LDC, M, N
26 * .. Array Arguments ..
27 * DOUBLE PRECISION A( LDA, * ), RWORK( * )
28 * COMPLEX*16 B( LDB, * ), C( LDC, * )
37 *> ZLARCM performs a very simple matrix-matrix multiplication:
39 *> where A is M by M and real; B is M by N and complex;
40 *> C is M by N and complex.
49 *> The number of rows of the matrix A and of the matrix C.
56 *> The number of columns and rows of the matrix B and
57 *> the number of columns of the matrix C.
63 *> A is DOUBLE PRECISION array, dimension (LDA, M)
64 *> A contains the M by M matrix A.
70 *> The leading dimension of the array A. LDA >=max(1,M).
75 *> B is COMPLEX*16 array, dimension (LDB, N)
76 *> B contains the M by N matrix B.
82 *> The leading dimension of the array B. LDB >=max(1,M).
87 *> C is COMPLEX*16 array, dimension (LDC, N)
88 *> C contains the M by N matrix C.
94 *> The leading dimension of the array C. LDC >=max(1,M).
99 *> RWORK is DOUBLE PRECISION array, dimension (2*M*N)
105 *> \author Univ. of Tennessee
106 *> \author Univ. of California Berkeley
107 *> \author Univ. of Colorado Denver
112 *> \ingroup complex16OTHERauxiliary
114 * =====================================================================
115 SUBROUTINE ZLARCM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
117 * -- LAPACK auxiliary routine (version 3.6.1) --
118 * -- LAPACK is a software package provided by Univ. of Tennessee, --
119 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
122 * .. Scalar Arguments ..
123 INTEGER LDA, LDB, LDC, M, N
125 * .. Array Arguments ..
126 DOUBLE PRECISION A( LDA, * ), RWORK( * )
127 COMPLEX*16 B( LDB, * ), C( LDC, * )
130 * =====================================================================
133 DOUBLE PRECISION ONE, ZERO
134 PARAMETER ( ONE = 1.0D0, ZERO = 0.0D0 )
136 * .. Local Scalars ..
139 * .. Intrinsic Functions ..
140 INTRINSIC DBLE, DCMPLX, DIMAG
142 * .. External Subroutines ..
145 * .. Executable Statements ..
147 * Quick return if possible.
149 IF( ( M.EQ.0 ) .OR. ( N.EQ.0 ) )
154 RWORK( ( J-1 )*M+I ) = DBLE( B( I, J ) )
159 CALL DGEMM( 'N', 'N', M, N, M, ONE, A, LDA, RWORK, M, ZERO,
163 C( I, J ) = RWORK( L+( J-1 )*M+I-1 )
169 RWORK( ( J-1 )*M+I ) = DIMAG( B( I, J ) )
172 CALL DGEMM( 'N', 'N', M, N, M, ONE, A, LDA, RWORK, M, ZERO,
176 C( I, J ) = DCMPLX( DBLE( C( I, J ) ),
177 $ RWORK( L+( J-1 )*M+I-1 ) )