LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ zlacp2()

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

ZLACP2 copies all or part of a real two-dimensional array to a complex array.

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

Purpose:
 ZLACP2 copies all or part of a real two-dimensional matrix A to a
 complex 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 DOUBLE PRECISION 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.

Definition at line 103 of file zlacp2.f.

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