LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
zlarcm.f
Go to the documentation of this file.
00001 *> \brief \b ZLARCM
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *> \htmlonly
00009 *> Download ZLARCM + dependencies 
00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarcm.f"> 
00011 *> [TGZ]</a> 
00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarcm.f"> 
00013 *> [ZIP]</a> 
00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarcm.f"> 
00015 *> [TXT]</a>
00016 *> \endhtmlonly 
00017 *
00018 *  Definition:
00019 *  ===========
00020 *
00021 *       SUBROUTINE ZLARCM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
00022 * 
00023 *       .. Scalar Arguments ..
00024 *       INTEGER            LDA, LDB, LDC, M, N
00025 *       ..
00026 *       .. Array Arguments ..
00027 *       DOUBLE PRECISION   A( LDA, * ), RWORK( * )
00028 *       COMPLEX*16         B( LDB, * ), C( LDC, * )
00029 *       ..
00030 *  
00031 *
00032 *> \par Purpose:
00033 *  =============
00034 *>
00035 *> \verbatim
00036 *>
00037 *> ZLARCM performs a very simple matrix-matrix multiplication:
00038 *>          C := A * B,
00039 *> where A is M by M and real; B is M by N and complex;
00040 *> C is M by N and complex.
00041 *> \endverbatim
00042 *
00043 *  Arguments:
00044 *  ==========
00045 *
00046 *> \param[in] M
00047 *> \verbatim
00048 *>          M is INTEGER
00049 *>          The number of rows of the matrix A and of the matrix C.
00050 *>          M >= 0.
00051 *> \endverbatim
00052 *>
00053 *> \param[in] N
00054 *> \verbatim
00055 *>          N is INTEGER
00056 *>          The number of columns and rows of the matrix B and
00057 *>          the number of columns of the matrix C.
00058 *>          N >= 0.
00059 *> \endverbatim
00060 *>
00061 *> \param[in] A
00062 *> \verbatim
00063 *>          A is DOUBLE PRECISION array, dimension (LDA, M)
00064 *>          A contains the M by M matrix A.
00065 *> \endverbatim
00066 *>
00067 *> \param[in] LDA
00068 *> \verbatim
00069 *>          LDA is INTEGER
00070 *>          The leading dimension of the array A. LDA >=max(1,M).
00071 *> \endverbatim
00072 *>
00073 *> \param[in] B
00074 *> \verbatim
00075 *>          B is DOUBLE PRECISION array, dimension (LDB, N)
00076 *>          B contains the M by N matrix B.
00077 *> \endverbatim
00078 *>
00079 *> \param[in] LDB
00080 *> \verbatim
00081 *>          LDB is INTEGER
00082 *>          The leading dimension of the array B. LDB >=max(1,M).
00083 *> \endverbatim
00084 *>
00085 *> \param[in] C
00086 *> \verbatim
00087 *>          C is COMPLEX*16 array, dimension (LDC, N)
00088 *>          C contains the M by N matrix C.
00089 *> \endverbatim
00090 *>
00091 *> \param[in] LDC
00092 *> \verbatim
00093 *>          LDC is INTEGER
00094 *>          The leading dimension of the array C. LDC >=max(1,M).
00095 *> \endverbatim
00096 *>
00097 *> \param[out] RWORK
00098 *> \verbatim
00099 *>          RWORK is DOUBLE PRECISION array, dimension (2*M*N)
00100 *> \endverbatim
00101 *
00102 *  Authors:
00103 *  ========
00104 *
00105 *> \author Univ. of Tennessee 
00106 *> \author Univ. of California Berkeley 
00107 *> \author Univ. of Colorado Denver 
00108 *> \author NAG Ltd. 
00109 *
00110 *> \date November 2011
00111 *
00112 *> \ingroup complex16OTHERauxiliary
00113 *
00114 *  =====================================================================
00115       SUBROUTINE ZLARCM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
00116 *
00117 *  -- LAPACK auxiliary routine (version 3.4.0) --
00118 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00119 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00120 *     November 2011
00121 *
00122 *     .. Scalar Arguments ..
00123       INTEGER            LDA, LDB, LDC, M, N
00124 *     ..
00125 *     .. Array Arguments ..
00126       DOUBLE PRECISION   A( LDA, * ), RWORK( * )
00127       COMPLEX*16         B( LDB, * ), C( LDC, * )
00128 *     ..
00129 *
00130 *  =====================================================================
00131 *
00132 *     .. Parameters ..
00133       DOUBLE PRECISION   ONE, ZERO
00134       PARAMETER          ( ONE = 1.0D0, ZERO = 0.0D0 )
00135 *     ..
00136 *     .. Local Scalars ..
00137       INTEGER            I, J, L
00138 *     ..
00139 *     .. Intrinsic Functions ..
00140       INTRINSIC          DBLE, DCMPLX, DIMAG
00141 *     ..
00142 *     .. External Subroutines ..
00143       EXTERNAL           DGEMM
00144 *     ..
00145 *     .. Executable Statements ..
00146 *
00147 *     Quick return if possible.
00148 *
00149       IF( ( M.EQ.0 ) .OR. ( N.EQ.0 ) )
00150      $   RETURN
00151 *
00152       DO 20 J = 1, N
00153          DO 10 I = 1, M
00154             RWORK( ( J-1 )*M+I ) = DBLE( B( I, J ) )
00155    10    CONTINUE
00156    20 CONTINUE
00157 *
00158       L = M*N + 1
00159       CALL DGEMM( 'N', 'N', M, N, M, ONE, A, LDA, RWORK, M, ZERO,
00160      $            RWORK( L ), M )
00161       DO 40 J = 1, N
00162          DO 30 I = 1, M
00163             C( I, J ) = RWORK( L+( J-1 )*M+I-1 )
00164    30    CONTINUE
00165    40 CONTINUE
00166 *
00167       DO 60 J = 1, N
00168          DO 50 I = 1, M
00169             RWORK( ( J-1 )*M+I ) = DIMAG( B( I, J ) )
00170    50    CONTINUE
00171    60 CONTINUE
00172       CALL DGEMM( 'N', 'N', M, N, M, ONE, A, LDA, RWORK, M, ZERO,
00173      $            RWORK( L ), M )
00174       DO 80 J = 1, N
00175          DO 70 I = 1, M
00176             C( I, J ) = DCMPLX( DBLE( C( I, J ) ),
00177      $                  RWORK( L+( J-1 )*M+I-1 ) )
00178    70    CONTINUE
00179    80 CONTINUE
00180 *
00181       RETURN
00182 *
00183 *     End of ZLARCM
00184 *
00185       END
 All Files Functions