LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ zlacpy()

subroutine zlacpy ( character  UPLO,
integer  M,
integer  N,
complex*16, dimension( lda, * )  A,
integer  LDA,
complex*16, dimension( ldb, * )  B,
integer  LDB 
)

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

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

Purpose:
 ZLACPY 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*16 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*16 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.
Date
December 2016

Definition at line 105 of file zlacpy.f.

105 *
106 * -- LAPACK auxiliary routine (version 3.7.0) --
107 * -- LAPACK is a software package provided by Univ. of Tennessee, --
108 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
109 * December 2016
110 *
111 * .. Scalar Arguments ..
112  CHARACTER uplo
113  INTEGER lda, ldb, m, n
114 * ..
115 * .. Array Arguments ..
116  COMPLEX*16 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 ZLACPY
158 *
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55