LAPACK 3.3.1
Linear Algebra PACKage

zlarscl2.f

Go to the documentation of this file.
00001       SUBROUTINE ZLARSCL2 ( 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       COMPLEX*16         X( LDX, * )
00018       DOUBLE PRECISION   D( * )
00019 *     ..
00020 *
00021 *  Purpose
00022 *  =======
00023 *
00024 *  ZLARSCL2 performs a reciprocal diagonal scaling on an vector:
00025 *    x <-- inv(D) * x
00026 *  where the DOUBLE PRECISION diagonal matrix D is stored as a vector.
00027 *
00028 *  Eventually to be replaced by BLAS_zge_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) DOUBLE PRECISION array, length M
00041 *     Diagonal matrix D, stored as a vector of length M.
00042 *
00043 *     X       (input/output) COMPLEX*16 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