LAPACK 3.3.0

clacp2.f

Go to the documentation of this file.
00001       SUBROUTINE CLACP2( UPLO, M, N, A, LDA, B, LDB )
00002 *
00003 *  -- LAPACK auxiliary routine (version 3.2) --
00004 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00005 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00006 *     November 2006
00007 *
00008 *     .. Scalar Arguments ..
00009       CHARACTER          UPLO
00010       INTEGER            LDA, LDB, M, N
00011 *     ..
00012 *     .. Array Arguments ..
00013       REAL               A( LDA, * )
00014       COMPLEX            B( LDB, * )
00015 *     ..
00016 *
00017 *  Purpose
00018 *  =======
00019 *
00020 *  CLACP2 copies all or part of a real two-dimensional matrix A to a
00021 *  complex matrix B.
00022 *
00023 *  Arguments
00024 *  =========
00025 *
00026 *  UPLO    (input) CHARACTER*1
00027 *          Specifies the part of the matrix A to be copied to B.
00028 *          = 'U':      Upper triangular part
00029 *          = 'L':      Lower triangular part
00030 *          Otherwise:  All of the matrix A
00031 *
00032 *  M       (input) INTEGER
00033 *          The number of rows of the matrix A.  M >= 0.
00034 *
00035 *  N       (input) INTEGER
00036 *          The number of columns of the matrix A.  N >= 0.
00037 *
00038 *  A       (input) REAL array, dimension (LDA,N)
00039 *          The m by n matrix A.  If UPLO = 'U', only the upper trapezium
00040 *          is accessed; if UPLO = 'L', only the lower trapezium is
00041 *          accessed.
00042 *
00043 *  LDA     (input) INTEGER
00044 *          The leading dimension of the array A.  LDA >= max(1,M).
00045 *
00046 *  B       (output) COMPLEX array, dimension (LDB,N)
00047 *          On exit, B = A in the locations specified by UPLO.
00048 *
00049 *  LDB     (input) INTEGER
00050 *          The leading dimension of the array B.  LDB >= max(1,M).
00051 *
00052 *  =====================================================================
00053 *
00054 *     .. Local Scalars ..
00055       INTEGER            I, J
00056 *     ..
00057 *     .. External Functions ..
00058       LOGICAL            LSAME
00059       EXTERNAL           LSAME
00060 *     ..
00061 *     .. Intrinsic Functions ..
00062       INTRINSIC          MIN
00063 *     ..
00064 *     .. Executable Statements ..
00065 *
00066       IF( LSAME( UPLO, 'U' ) ) THEN
00067          DO 20 J = 1, N
00068             DO 10 I = 1, MIN( J, M )
00069                B( I, J ) = A( I, J )
00070    10       CONTINUE
00071    20    CONTINUE
00072 *
00073       ELSE IF( LSAME( UPLO, 'L' ) ) THEN
00074          DO 40 J = 1, N
00075             DO 30 I = J, M
00076                B( I, J ) = A( I, J )
00077    30       CONTINUE
00078    40    CONTINUE
00079 *
00080       ELSE
00081          DO 60 J = 1, N
00082             DO 50 I = 1, M
00083                B( I, J ) = A( I, J )
00084    50       CONTINUE
00085    60    CONTINUE
00086       END IF
00087 *
00088       RETURN
00089 *
00090 *     End of CLACP2
00091 *
00092       END
 All Files Functions