 LAPACK  3.9.0 LAPACK: Linear Algebra PACKage

## ◆ clacrm()

 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.

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) On entry, 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) On entry, B contains the N by N matrix B.``` [in] LDB ``` LDB is INTEGER The leading dimension of the array B. LDB >=max(1,N).``` [out] C ``` C is COMPLEX 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,N).``` [out] RWORK ` RWORK is REAL array, dimension (2*M*N)`
Date
December 2016

Definition at line 116 of file clacrm.f.

116 *
117 * -- LAPACK auxiliary routine (version 3.7.0) --
118 * -- LAPACK is a software package provided by Univ. of Tennessee, --
119 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
120 * December 2016
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 *
Here is the call graph for this function:
Here is the caller graph for this function:
sgemm
subroutine sgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
SGEMM
Definition: sgemm.f:189