```001:       SUBROUTINE ZLACRM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
002: *
003: *  -- LAPACK auxiliary routine (version 3.2) --
004: *     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
005: *     November 2006
006: *
007: *     .. Scalar Arguments ..
008:       INTEGER            LDA, LDB, LDC, M, N
009: *     ..
010: *     .. Array Arguments ..
011:       DOUBLE PRECISION   B( LDB, * ), RWORK( * )
012:       COMPLEX*16         A( LDA, * ), C( LDC, * )
013: *     ..
014: *
015: *  Purpose
016: *  =======
017: *
018: *  ZLACRM performs a very simple matrix-matrix multiplication:
019: *           C := A * B,
020: *  where A is M by N and complex; B is N by N and real;
021: *  C is M by N and complex.
022: *
023: *  Arguments
024: *  =========
025: *
026: *  M       (input) INTEGER
027: *          The number of rows of the matrix A and of the matrix C.
028: *          M >= 0.
029: *
030: *  N       (input) INTEGER
031: *          The number of columns and rows of the matrix B and
032: *          the number of columns of the matrix C.
033: *          N >= 0.
034: *
035: *  A       (input) COMPLEX*16 array, dimension (LDA, N)
036: *          A contains the M by N matrix A.
037: *
038: *  LDA     (input) INTEGER
039: *          The leading dimension of the array A. LDA >=max(1,M).
040: *
041: *  B       (input) DOUBLE PRECISION array, dimension (LDB, N)
042: *          B contains the N by N matrix B.
043: *
044: *  LDB     (input) INTEGER
045: *          The leading dimension of the array B. LDB >=max(1,N).
046: *
047: *  C       (input) COMPLEX*16 array, dimension (LDC, N)
048: *          C contains the M by N matrix C.
049: *
050: *  LDC     (input) INTEGER
051: *          The leading dimension of the array C. LDC >=max(1,N).
052: *
053: *  RWORK   (workspace) DOUBLE PRECISION array, dimension (2*M*N)
054: *
055: *  =====================================================================
056: *
057: *     .. Parameters ..
058:       DOUBLE PRECISION   ONE, ZERO
059:       PARAMETER          ( ONE = 1.0D0, ZERO = 0.0D0 )
060: *     ..
061: *     .. Local Scalars ..
062:       INTEGER            I, J, L
063: *     ..
064: *     .. Intrinsic Functions ..
065:       INTRINSIC          DBLE, DCMPLX, DIMAG
066: *     ..
067: *     .. External Subroutines ..
068:       EXTERNAL           DGEMM
069: *     ..
070: *     .. Executable Statements ..
071: *
072: *     Quick return if possible.
073: *
074:       IF( ( M.EQ.0 ) .OR. ( N.EQ.0 ) )
075:      \$   RETURN
076: *
077:       DO 20 J = 1, N
078:          DO 10 I = 1, M
079:             RWORK( ( J-1 )*M+I ) = DBLE( A( I, J ) )
080:    10    CONTINUE
081:    20 CONTINUE
082: *
083:       L = M*N + 1
084:       CALL DGEMM( 'N', 'N', M, N, N, ONE, RWORK, M, B, LDB, ZERO,
085:      \$            RWORK( L ), M )
086:       DO 40 J = 1, N
087:          DO 30 I = 1, M
088:             C( I, J ) = RWORK( L+( J-1 )*M+I-1 )
089:    30    CONTINUE
090:    40 CONTINUE
091: *
092:       DO 60 J = 1, N
093:          DO 50 I = 1, M
094:             RWORK( ( J-1 )*M+I ) = DIMAG( A( I, J ) )
095:    50    CONTINUE
096:    60 CONTINUE
097:       CALL DGEMM( 'N', 'N', M, N, N, ONE, RWORK, M, B, LDB, ZERO,
098:      \$            RWORK( L ), M )
099:       DO 80 J = 1, N
100:          DO 70 I = 1, M
101:             C( I, J ) = DCMPLX( DBLE( C( I, J ) ),
102:      \$                  RWORK( L+( J-1 )*M+I-1 ) )
103:    70    CONTINUE
104:    80 CONTINUE
105: *
106:       RETURN
107: *
108: *     End of ZLACRM
109: *
110:       END
111: ```