LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ zlarcm()

subroutine zlarcm ( integer  M,
integer  N,
double precision, dimension( lda, * )  A,
integer  LDA,
complex*16, dimension( ldb, * )  B,
integer  LDB,
complex*16, dimension( ldc, * )  C,
integer  LDC,
double precision, dimension( * )  RWORK 
)

ZLARCM copies all or part of a real two-dimensional array to a complex array.

Download ZLARCM + dependencies [TGZ] [ZIP] [TXT]

Purpose:
 ZLARCM performs a very simple matrix-matrix multiplication:
          C := A * B,
 where A is M by M and real; B is M by N and complex;
 C is M by N and complex.
Parameters
[in]M
          M is INTEGER
          The number of rows of the matrix A and of the matrix C.
          M >= 0.
[in]N
          N is INTEGER
          The number of columns and rows of the matrix B and
          the number of columns of the matrix C.
          N >= 0.
[in]A
          A is DOUBLE PRECISION array, dimension (LDA, M)
          On entry, A contains the M by M matrix A.
[in]LDA
          LDA is INTEGER
          The leading dimension of the array A. LDA >=max(1,M).
[in]B
          B is COMPLEX*16 array, dimension (LDB, N)
          On entry, B contains the M by N matrix B.
[in]LDB
          LDB is INTEGER
          The leading dimension of the array B. LDB >=max(1,M).
[out]C
          C is COMPLEX*16 array, dimension (LDC, N)
          On exit, C contains the M by N matrix C.
[in]LDC
          LDC is INTEGER
          The leading dimension of the array C. LDC >=max(1,M).
[out]RWORK
          RWORK is DOUBLE PRECISION array, dimension (2*M*N)
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 113 of file zlarcm.f.

114 *
115 * -- LAPACK auxiliary routine --
116 * -- LAPACK is a software package provided by Univ. of Tennessee, --
117 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
118 *
119 * .. Scalar Arguments ..
120  INTEGER LDA, LDB, LDC, M, N
121 * ..
122 * .. Array Arguments ..
123  DOUBLE PRECISION A( LDA, * ), RWORK( * )
124  COMPLEX*16 B( LDB, * ), C( LDC, * )
125 * ..
126 *
127 * =====================================================================
128 *
129 * .. Parameters ..
130  DOUBLE PRECISION ONE, ZERO
131  parameter( one = 1.0d0, zero = 0.0d0 )
132 * ..
133 * .. Local Scalars ..
134  INTEGER I, J, L
135 * ..
136 * .. Intrinsic Functions ..
137  INTRINSIC dble, dcmplx, dimag
138 * ..
139 * .. External Subroutines ..
140  EXTERNAL dgemm
141 * ..
142 * .. Executable Statements ..
143 *
144 * Quick return if possible.
145 *
146  IF( ( m.EQ.0 ) .OR. ( n.EQ.0 ) )
147  $ RETURN
148 *
149  DO 20 j = 1, n
150  DO 10 i = 1, m
151  rwork( ( j-1 )*m+i ) = dble( b( i, j ) )
152  10 CONTINUE
153  20 CONTINUE
154 *
155  l = m*n + 1
156  CALL dgemm( 'N', 'N', m, n, m, one, a, lda, rwork, m, zero,
157  $ rwork( l ), m )
158  DO 40 j = 1, n
159  DO 30 i = 1, m
160  c( i, j ) = rwork( l+( j-1 )*m+i-1 )
161  30 CONTINUE
162  40 CONTINUE
163 *
164  DO 60 j = 1, n
165  DO 50 i = 1, m
166  rwork( ( j-1 )*m+i ) = dimag( b( i, j ) )
167  50 CONTINUE
168  60 CONTINUE
169  CALL dgemm( 'N', 'N', m, n, m, one, a, lda, rwork, m, zero,
170  $ rwork( l ), m )
171  DO 80 j = 1, n
172  DO 70 i = 1, m
173  c( i, j ) = dcmplx( dble( c( i, j ) ),
174  $ rwork( l+( j-1 )*m+i-1 ) )
175  70 CONTINUE
176  80 CONTINUE
177 *
178  RETURN
179 *
180 * End of ZLARCM
181 *
subroutine dgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
DGEMM
Definition: dgemm.f:187
Here is the call graph for this function:
Here is the caller graph for this function: