LAPACK 3.3.1
Linear Algebra PACKage
|
00001 SUBROUTINE SLASCL2 ( 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( * ), X( LDX, * ) 00018 * .. 00019 * 00020 * Purpose 00021 * ======= 00022 * 00023 * SLASCL2 performs a diagonal scaling on a vector: 00024 * x <-- D * x 00025 * where the diagonal matrix D is stored as a vector. 00026 * 00027 * Eventually to be replaced by BLAS_sge_diag_scale in the new BLAS 00028 * standard. 00029 * 00030 * Arguments 00031 * ========= 00032 * 00033 * M (input) INTEGER 00034 * The number of rows of D and X. M >= 0. 00035 * 00036 * N (input) INTEGER 00037 * The number of columns of D and X. N >= 0. 00038 * 00039 * D (input) REAL array, length M 00040 * Diagonal matrix D, stored as a vector of length M. 00041 * 00042 * X (input/output) REAL array, dimension (LDX,N) 00043 * On entry, the vector X to be scaled by D. 00044 * On exit, the scaled vector. 00045 * 00046 * LDX (input) INTEGER 00047 * The leading dimension of the vector X. LDX >= 0. 00048 * 00049 * ===================================================================== 00050 * 00051 * .. Local Scalars .. 00052 INTEGER I, J 00053 * .. 00054 * .. Executable Statements .. 00055 * 00056 DO J = 1, N 00057 DO I = 1, M 00058 X( I, J ) = X( I, J ) * D( I ) 00059 END DO 00060 END DO 00061 00062 RETURN 00063 END