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