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

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

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

Purpose:
 DLACPY 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 DOUBLE PRECISION array, dimension (LDA,N)
          The m by n matrix A.  If UPLO = 'U', only the upper triangle
          or trapezoid is accessed; if UPLO = 'L', only the lower
          triangle or trapezoid is accessed.
[in]LDA
          LDA is INTEGER
          The leading dimension of the array A.  LDA >= max(1,M).
[out]B
          B is DOUBLE PRECISION 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
September 2012

Definition at line 105 of file dlacpy.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  DOUBLE PRECISION 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  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  ELSE
146  DO 60 j = 1, n
147  DO 50 i = 1, m
148  b( i, j ) = a( i, j )
149  50 CONTINUE
150  60 CONTINUE
151  END IF
152  RETURN
153 *
154 * End of DLACPY
155 *
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55