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

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

Purpose:
``` CLACP2 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 REAL 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 106 of file clacp2.f.

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

Here is the caller graph for this function: