LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine slarscl2 ( integer  M,
integer  N,
real, dimension( * )  D,
real, dimension( ldx, * )  X,
integer  LDX 
)

SLARSCL2 performs reciprocal diagonal scaling on a vector.

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

Purpose:
 SLARSCL2 performs a reciprocal diagonal scaling on an vector:
   x <-- inv(D) * x
 where the diagonal matrix D is stored as a vector.

 Eventually to be replaced by BLAS_sge_diag_scale in the new BLAS
 standard.
Parameters
[in]M
          M is INTEGER
     The number of rows of D and X. M >= 0.
[in]N
          N is INTEGER
     The number of columns of X. N >= 0.
[in]D
          D is REAL array, length M
     Diagonal matrix D, stored as a vector of length M.
[in,out]X
          X is REAL array, dimension (LDX,N)
     On entry, the vector X to be scaled by D.
     On exit, the scaled vector.
[in]LDX
          LDX is INTEGER
     The leading dimension of the vector X. LDX >= M.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
June 2016

Definition at line 92 of file slarscl2.f.

92 *
93 * -- LAPACK computational routine (version 3.6.1) --
94 * -- LAPACK is a software package provided by Univ. of Tennessee, --
95 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
96 * June 2016
97 *
98 * .. Scalar Arguments ..
99  INTEGER m, n, ldx
100 * ..
101 * .. Array Arguments ..
102  REAL d( * ), x( ldx, * )
103 * ..
104 *
105 * =====================================================================
106 *
107 * .. Local Scalars ..
108  INTEGER i, j
109 * ..
110 * .. Executable Statements ..
111 *
112  DO j = 1, n
113  DO i = 1, m
114  x( i, j ) = x( i, j ) / d( i )
115  END DO
116  END DO
117 
118  RETURN