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

◆ slacpy()

subroutine slacpy ( character uplo,
integer m,
integer n,
real, dimension( lda, * ) a,
integer lda,
real, dimension( ldb, * ) b,
integer ldb )

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

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

Purpose:
!>
!> SLACPY 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 REAL 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 REAL 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 slacpy.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 REAL 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 ELSE IF( lsame( uplo, 'L' ) ) THEN
135 DO 40 j = 1, n
136 DO 30 i = j, m
137 b( i, j ) = a( i, j )
138 30 CONTINUE
139 40 CONTINUE
140 ELSE
141 DO 60 j = 1, n
142 DO 50 i = 1, m
143 b( i, j ) = a( i, j )
144 50 CONTINUE
145 60 CONTINUE
146 END IF
147 RETURN
148*
149* End of SLACPY
150*
logical function lsame(ca, cb)
LSAME
Definition lsame.f:48
Here is the caller graph for this function: