LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ slarscl2()

subroutine slarscl2 ( integer  m,
integer  n,
real, dimension( * )  d,
real, dimension( ldx, * )  x,
integer  ldx 
)

SLARSCL2 performs reciprocal diagonal scaling on a matrix.

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

Purpose:
 SLARSCL2 performs a reciprocal diagonal scaling on a matrix:
   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 matrix X to be scaled by D.
     On exit, the scaled matrix.
[in]LDX
          LDX is INTEGER
     The leading dimension of the matrix X. LDX >= M.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 89 of file slarscl2.f.

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