LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
dlarscl2.f
Go to the documentation of this file.
1*> \brief \b DLARSCL2 performs reciprocal diagonal scaling on a matrix.
2*
3* =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6* http://www.netlib.org/lapack/explore-html/
7*
8*> Download DLARSCL2 + dependencies
9*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarscl2.f">
10*> [TGZ]</a>
11*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarscl2.f">
12*> [ZIP]</a>
13*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarscl2.f">
14*> [TXT]</a>
15*
16* Definition:
17* ===========
18*
19* SUBROUTINE DLARSCL2 ( M, N, D, X, LDX )
20*
21* .. Scalar Arguments ..
22* INTEGER M, N, LDX
23* ..
24* .. Array Arguments ..
25* DOUBLE PRECISION D( * ), X( LDX, * )
26* ..
27*
28*
29*> \par Purpose:
30* =============
31*>
32*> \verbatim
33*>
34*> DLARSCL2 performs a reciprocal diagonal scaling on a matrix:
35*> x <-- inv(D) * x
36*> where the diagonal matrix D is stored as a vector.
37*>
38*> Eventually to be replaced by BLAS_dge_diag_scale in the new BLAS
39*> standard.
40*> \endverbatim
41*
42* Arguments:
43* ==========
44*
45*> \param[in] M
46*> \verbatim
47*> M is INTEGER
48*> The number of rows of D and X. M >= 0.
49*> \endverbatim
50*>
51*> \param[in] N
52*> \verbatim
53*> N is INTEGER
54*> The number of columns of X. N >= 0.
55*> \endverbatim
56*>
57*> \param[in] D
58*> \verbatim
59*> D is DOUBLE PRECISION array, dimension (M)
60*> Diagonal matrix D, stored as a vector of length M.
61*> \endverbatim
62*>
63*> \param[in,out] X
64*> \verbatim
65*> X is DOUBLE PRECISION array, dimension (LDX,N)
66*> On entry, the matrix X to be scaled by D.
67*> On exit, the scaled matrix.
68*> \endverbatim
69*>
70*> \param[in] LDX
71*> \verbatim
72*> LDX is INTEGER
73*> The leading dimension of the matrix X. LDX >= M.
74*> \endverbatim
75*
76* Authors:
77* ========
78*
79*> \author Univ. of Tennessee
80*> \author Univ. of California Berkeley
81*> \author Univ. of Colorado Denver
82*> \author NAG Ltd.
83*
84*> \ingroup larscl2
85*
86* =====================================================================
87 SUBROUTINE dlarscl2 ( M, N, D, X, LDX )
88*
89* -- LAPACK computational routine --
90* -- LAPACK is a software package provided by Univ. of Tennessee, --
91* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
92*
93* .. Scalar Arguments ..
94 INTEGER M, N, LDX
95* ..
96* .. Array Arguments ..
97 DOUBLE PRECISION D( * ), X( LDX, * )
98* ..
99*
100* =====================================================================
101*
102* .. Local Scalars ..
103 INTEGER I, J
104* ..
105* .. Executable Statements ..
106*
107 DO j = 1, n
108 DO i = 1, m
109 x( i, j ) = x( i, j ) / d( i )
110 END DO
111 END DO
112
113 RETURN
114 END
subroutine dlarscl2(m, n, d, x, ldx)
DLARSCL2 performs reciprocal diagonal scaling on a matrix.
Definition dlarscl2.f:88