LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ clacpy()

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.

Download CLACPY + dependencies [TGZ] [ZIP] [TXT]

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).
!> 
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 100 of file clacpy.f.

101*
102* -- LAPACK auxiliary routine --
103* -- LAPACK is a software package provided by Univ. of Tennessee, --
104* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
105*
106* .. Scalar Arguments ..
107 CHARACTER UPLO
108 INTEGER LDA, LDB, M, N
109* ..
110* .. Array Arguments ..
111 COMPLEX A( LDA, * ), B( LDB, * )
112* ..
113*
114* =====================================================================
115*
116* .. Local Scalars ..
117 INTEGER I, J
118* ..
119* .. External Functions ..
120 LOGICAL LSAME
121 EXTERNAL lsame
122* ..
123* .. Intrinsic Functions ..
124 INTRINSIC min
125* ..
126* .. Executable Statements ..
127*
128 IF( lsame( uplo, 'U' ) ) THEN
129 DO 20 j = 1, n
130 DO 10 i = 1, min( j, m )
131 b( i, j ) = a( i, j )
132 10 CONTINUE
133 20 CONTINUE
134*
135 ELSE IF( lsame( uplo, 'L' ) ) THEN
136 DO 40 j = 1, n
137 DO 30 i = j, m
138 b( i, j ) = a( i, j )
139 30 CONTINUE
140 40 CONTINUE
141*
142 ELSE
143 DO 60 j = 1, n
144 DO 50 i = 1, m
145 b( i, j ) = a( i, j )
146 50 CONTINUE
147 60 CONTINUE
148 END IF
149*
150 RETURN
151*
152* End of CLACPY
153*
logical function lsame(ca, cb)
LSAME
Definition lsame.f:48
Here is the caller graph for this function: