LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine clacrm ( integer  M,
integer  N,
complex, dimension( lda, * )  A,
integer  LDA,
real, dimension( ldb, * )  B,
integer  LDB,
complex, dimension( ldc, * )  C,
integer  LDC,
real, dimension( * )  RWORK 
)

CLACRM multiplies a complex matrix by a square real matrix.

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

Purpose:
 CLACRM performs a very simple matrix-matrix multiplication:
          C := A * B,
 where A is M by N and complex; B is N by N and real;
 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 COMPLEX array, dimension (LDA, N)
          A contains the M by N matrix A.
[in]LDA
          LDA is INTEGER
          The leading dimension of the array A. LDA >=max(1,M).
[in]B
          B is REAL array, dimension (LDB, N)
          B contains the N by N matrix B.
[in]LDB
          LDB is INTEGER
          The leading dimension of the array B. LDB >=max(1,N).
[in]C
          C is COMPLEX array, dimension (LDC, N)
          C contains the M by N matrix C.
[in]LDC
          LDC is INTEGER
          The leading dimension of the array C. LDC >=max(1,N).
[out]RWORK
          RWORK is REAL array, dimension (2*M*N)
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
September 2012

Definition at line 116 of file clacrm.f.

116 *
117 * -- LAPACK auxiliary routine (version 3.4.2) --
118 * -- LAPACK is a software package provided by Univ. of Tennessee, --
119 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
120 * September 2012
121 *
122 * .. Scalar Arguments ..
123  INTEGER lda, ldb, ldc, m, n
124 * ..
125 * .. Array Arguments ..
126  REAL b( ldb, * ), rwork( * )
127  COMPLEX a( lda, * ), c( ldc, * )
128 * ..
129 *
130 * =====================================================================
131 *
132 * .. Parameters ..
133  REAL one, zero
134  parameter ( one = 1.0e0, zero = 0.0e0 )
135 * ..
136 * .. Local Scalars ..
137  INTEGER i, j, l
138 * ..
139 * .. Intrinsic Functions ..
140  INTRINSIC aimag, cmplx, real
141 * ..
142 * .. External Subroutines ..
143  EXTERNAL sgemm
144 * ..
145 * .. Executable Statements ..
146 *
147 * Quick return if possible.
148 *
149  IF( ( m.EQ.0 ) .OR. ( n.EQ.0 ) )
150  $ RETURN
151 *
152  DO 20 j = 1, n
153  DO 10 i = 1, m
154  rwork( ( j-1 )*m+i ) = REAL( A( I, J ) )
155  10 CONTINUE
156  20 CONTINUE
157 *
158  l = m*n + 1
159  CALL sgemm( 'N', 'N', m, n, n, one, rwork, m, b, ldb, zero,
160  $ rwork( l ), m )
161  DO 40 j = 1, n
162  DO 30 i = 1, m
163  c( i, j ) = rwork( l+( j-1 )*m+i-1 )
164  30 CONTINUE
165  40 CONTINUE
166 *
167  DO 60 j = 1, n
168  DO 50 i = 1, m
169  rwork( ( j-1 )*m+i ) = aimag( a( i, j ) )
170  50 CONTINUE
171  60 CONTINUE
172  CALL sgemm( 'N', 'N', m, n, n, one, rwork, m, b, ldb, zero,
173  $ rwork( l ), m )
174  DO 80 j = 1, n
175  DO 70 i = 1, m
176  c( i, j ) = cmplx( REAL( C( I, J ) ),
177  $ rwork( l+( j-1 )*m+i-1 ) )
178  70 CONTINUE
179  80 CONTINUE
180 *
181  RETURN
182 *
183 * End of CLACRM
184 *
subroutine sgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
SGEMM
Definition: sgemm.f:189

Here is the call graph for this function:

Here is the caller graph for this function: