LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
zlacp2.f
Go to the documentation of this file.
00001 *> \brief \b ZLACP2
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *> \htmlonly
00009 *> Download ZLACP2 + dependencies 
00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlacp2.f"> 
00011 *> [TGZ]</a> 
00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlacp2.f"> 
00013 *> [ZIP]</a> 
00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlacp2.f"> 
00015 *> [TXT]</a>
00016 *> \endhtmlonly 
00017 *
00018 *  Definition:
00019 *  ===========
00020 *
00021 *       SUBROUTINE ZLACP2( UPLO, M, N, A, LDA, B, LDB )
00022 * 
00023 *       .. Scalar Arguments ..
00024 *       CHARACTER          UPLO
00025 *       INTEGER            LDA, LDB, M, N
00026 *       ..
00027 *       .. Array Arguments ..
00028 *       DOUBLE PRECISION   A( LDA, * )
00029 *       COMPLEX*16         B( LDB, * )
00030 *       ..
00031 *  
00032 *
00033 *> \par Purpose:
00034 *  =============
00035 *>
00036 *> \verbatim
00037 *>
00038 *> ZLACP2 copies all or part of a real two-dimensional matrix A to a
00039 *> complex matrix B.
00040 *> \endverbatim
00041 *
00042 *  Arguments:
00043 *  ==========
00044 *
00045 *> \param[in] UPLO
00046 *> \verbatim
00047 *>          UPLO is CHARACTER*1
00048 *>          Specifies the part of the matrix A to be copied to B.
00049 *>          = 'U':      Upper triangular part
00050 *>          = 'L':      Lower triangular part
00051 *>          Otherwise:  All of the matrix A
00052 *> \endverbatim
00053 *>
00054 *> \param[in] M
00055 *> \verbatim
00056 *>          M is INTEGER
00057 *>          The number of rows of the matrix A.  M >= 0.
00058 *> \endverbatim
00059 *>
00060 *> \param[in] N
00061 *> \verbatim
00062 *>          N is INTEGER
00063 *>          The number of columns of the matrix A.  N >= 0.
00064 *> \endverbatim
00065 *>
00066 *> \param[in] A
00067 *> \verbatim
00068 *>          A is DOUBLE PRECISION array, dimension (LDA,N)
00069 *>          The m by n matrix A.  If UPLO = 'U', only the upper trapezium
00070 *>          is accessed; if UPLO = 'L', only the lower trapezium is
00071 *>          accessed.
00072 *> \endverbatim
00073 *>
00074 *> \param[in] LDA
00075 *> \verbatim
00076 *>          LDA is INTEGER
00077 *>          The leading dimension of the array A.  LDA >= max(1,M).
00078 *> \endverbatim
00079 *>
00080 *> \param[out] B
00081 *> \verbatim
00082 *>          B is COMPLEX*16 array, dimension (LDB,N)
00083 *>          On exit, B = A in the locations specified by UPLO.
00084 *> \endverbatim
00085 *>
00086 *> \param[in] LDB
00087 *> \verbatim
00088 *>          LDB is INTEGER
00089 *>          The leading dimension of the array B.  LDB >= max(1,M).
00090 *> \endverbatim
00091 *
00092 *  Authors:
00093 *  ========
00094 *
00095 *> \author Univ. of Tennessee 
00096 *> \author Univ. of California Berkeley 
00097 *> \author Univ. of Colorado Denver 
00098 *> \author NAG Ltd. 
00099 *
00100 *> \date November 2011
00101 *
00102 *> \ingroup complex16OTHERauxiliary
00103 *
00104 *  =====================================================================
00105       SUBROUTINE ZLACP2( UPLO, M, N, A, LDA, B, LDB )
00106 *
00107 *  -- LAPACK auxiliary routine (version 3.4.0) --
00108 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00109 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00110 *     November 2011
00111 *
00112 *     .. Scalar Arguments ..
00113       CHARACTER          UPLO
00114       INTEGER            LDA, LDB, M, N
00115 *     ..
00116 *     .. Array Arguments ..
00117       DOUBLE PRECISION   A( LDA, * )
00118       COMPLEX*16         B( LDB, * )
00119 *     ..
00120 *
00121 *  =====================================================================
00122 *
00123 *     .. Local Scalars ..
00124       INTEGER            I, J
00125 *     ..
00126 *     .. External Functions ..
00127       LOGICAL            LSAME
00128       EXTERNAL           LSAME
00129 *     ..
00130 *     .. Intrinsic Functions ..
00131       INTRINSIC          MIN
00132 *     ..
00133 *     .. Executable Statements ..
00134 *
00135       IF( LSAME( UPLO, 'U' ) ) THEN
00136          DO 20 J = 1, N
00137             DO 10 I = 1, MIN( J, M )
00138                B( I, J ) = A( I, J )
00139    10       CONTINUE
00140    20    CONTINUE
00141 *
00142       ELSE IF( LSAME( UPLO, 'L' ) ) THEN
00143          DO 40 J = 1, N
00144             DO 30 I = J, M
00145                B( I, J ) = A( I, J )
00146    30       CONTINUE
00147    40    CONTINUE
00148 *
00149       ELSE
00150          DO 60 J = 1, N
00151             DO 50 I = 1, M
00152                B( I, J ) = A( I, J )
00153    50       CONTINUE
00154    60    CONTINUE
00155       END IF
00156 *
00157       RETURN
00158 *
00159 *     End of ZLACP2
00160 *
00161       END
 All Files Functions