LAPACK 3.3.0

clascl2.f

Go to the documentation of this file.
00001       SUBROUTINE CLASCL2 ( M, N, D, X, LDX )
00002 *
00003 *     -- LAPACK routine (version 3.2.1)                               --
00004 *     -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
00005 *     -- Jason Riedy of Univ. of California Berkeley.                 --
00006 *     -- April 2009                                                   --
00007 *
00008 *     -- LAPACK is a software package provided by Univ. of Tennessee, --
00009 *     -- Univ. of California Berkeley and NAG Ltd.                    --
00010 *
00011       IMPLICIT NONE
00012 *     ..
00013 *     .. Scalar Arguments ..
00014       INTEGER            M, N, LDX
00015 *     ..
00016 *     .. Array Arguments ..
00017       REAL               D( * )
00018       COMPLEX            X( LDX, * )
00019 *     ..
00020 *
00021 *  Purpose
00022 *  =======
00023 *
00024 *  CLASCL2 performs a diagonal scaling on a vector:
00025 *    x <-- D * x
00026 *  where the diagonal REAL matrix D is stored as a vector.
00027 *
00028 *  Eventually to be replaced by BLAS_cge_diag_scale in the new BLAS
00029 *  standard.
00030 *
00031 *  Arguments
00032 *  =========
00033 *
00034 *     M       (input) INTEGER
00035 *     The number of rows of D and X. M >= 0.
00036 *
00037 *     N       (input) INTEGER
00038 *     The number of columns of D and X. N >= 0.
00039 *
00040 *     D       (input) REAL array, length M
00041 *     Diagonal matrix D, stored as a vector of length M.
00042 *
00043 *     X       (input/output) COMPLEX array, dimension (LDX,N)
00044 *     On entry, the vector X to be scaled by D.
00045 *     On exit, the scaled vector.
00046 *
00047 *     LDX     (input) INTEGER
00048 *     The leading dimension of the vector X. LDX >= 0.
00049 *
00050 *  =====================================================================
00051 *
00052 *     .. Local Scalars ..
00053       INTEGER            I, J
00054 *     ..
00055 *     .. Executable Statements ..
00056 *
00057       DO J = 1, N
00058          DO I = 1, M
00059             X( I, J ) = X( I, J ) * D( I )
00060          END DO
00061       END DO
00062 
00063       RETURN
00064       END
00065 
 All Files Functions