 LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 subroutine clacpy ( character UPLO, integer M, integer N, complex, dimension( lda, * ) A, integer LDA, complex, dimension( ldb, * ) B, integer LDB )

CLACPY copies all or part of one two-dimensional array to another.

Purpose:
``` CLACPY copies all or part of a two-dimensional matrix A to another
matrix B.```
Parameters
 [in] UPLO ``` UPLO is CHARACTER*1 Specifies the part of the matrix A to be copied to B. = 'U': Upper triangular part = 'L': Lower triangular part Otherwise: All of the matrix A``` [in] M ``` M is INTEGER The number of rows of the matrix A. M >= 0.``` [in] N ``` N is INTEGER The number of columns of the matrix A. N >= 0.``` [in] A ``` A is COMPLEX array, dimension (LDA,N) The m by n matrix A. If UPLO = 'U', only the upper trapezium is accessed; if UPLO = 'L', only the lower trapezium is accessed.``` [in] LDA ``` LDA is INTEGER The leading dimension of the array A. LDA >= max(1,M).``` [out] B ``` B is COMPLEX array, dimension (LDB,N) On exit, B = A in the locations specified by UPLO.``` [in] LDB ``` LDB is INTEGER The leading dimension of the array B. LDB >= max(1,M).```
Date
September 2012

Definition at line 105 of file clacpy.f.

105 *
106 * -- LAPACK auxiliary routine (version 3.4.2) --
107 * -- LAPACK is a software package provided by Univ. of Tennessee, --
108 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
109 * September 2012
110 *
111 * .. Scalar Arguments ..
112  CHARACTER uplo
113  INTEGER lda, ldb, m, n
114 * ..
115 * .. Array Arguments ..
116  COMPLEX a( lda, * ), b( ldb, * )
117 * ..
118 *
119 * =====================================================================
120 *
121 * .. Local Scalars ..
122  INTEGER i, j
123 * ..
124 * .. External Functions ..
125  LOGICAL lsame
126  EXTERNAL lsame
127 * ..
128 * .. Intrinsic Functions ..
129  INTRINSIC min
130 * ..
131 * .. Executable Statements ..
132 *
133  IF( lsame( uplo, 'U' ) ) THEN
134  DO 20 j = 1, n
135  DO 10 i = 1, min( j, m )
136  b( i, j ) = a( i, j )
137  10 CONTINUE
138  20 CONTINUE
139 *
140  ELSE IF( lsame( uplo, 'L' ) ) THEN
141  DO 40 j = 1, n
142  DO 30 i = j, m
143  b( i, j ) = a( i, j )
144  30 CONTINUE
145  40 CONTINUE
146 *
147  ELSE
148  DO 60 j = 1, n
149  DO 50 i = 1, m
150  b( i, j ) = a( i, j )
151  50 CONTINUE
152  60 CONTINUE
153  END IF
154 *
155  RETURN
156 *
157 * End of CLACPY
158 *
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55