LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
clascl2.f
Go to the documentation of this file.
1*> \brief \b CLASCL2 performs 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 CLASCL2 + dependencies
9*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/clascl2.f">
10*> [TGZ]</a>
11*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/clascl2.f">
12*> [ZIP]</a>
13*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/clascl2.f">
14*> [TXT]</a>
15*
16* Definition:
17* ===========
18*
19* SUBROUTINE CLASCL2 ( M, N, D, X, LDX )
20*
21* .. Scalar Arguments ..
22* INTEGER M, N, LDX
23* ..
24* .. Array Arguments ..
25* REAL D( * )
26* COMPLEX X( LDX, * )
27* ..
28*
29*
30*> \par Purpose:
31* =============
32*>
33*> \verbatim
34*>
35*> CLASCL2 performs a diagonal scaling on a matrix:
36*> x <-- D * x
37*> where the diagonal REAL matrix D is stored as a matrix.
38*>
39*> Eventually to be replaced by BLAS_cge_diag_scale in the new BLAS
40*> standard.
41*> \endverbatim
42*
43* Arguments:
44* ==========
45*
46*> \param[in] M
47*> \verbatim
48*> M is INTEGER
49*> The number of rows of D and X. M >= 0.
50*> \endverbatim
51*>
52*> \param[in] N
53*> \verbatim
54*> N is INTEGER
55*> The number of columns of X. N >= 0.
56*> \endverbatim
57*>
58*> \param[in] D
59*> \verbatim
60*> D is REAL array, length M
61*> Diagonal matrix D, stored as a vector of length M.
62*> \endverbatim
63*>
64*> \param[in,out] X
65*> \verbatim
66*> X is COMPLEX array, dimension (LDX,N)
67*> On entry, the matrix X to be scaled by D.
68*> On exit, the scaled matrix.
69*> \endverbatim
70*>
71*> \param[in] LDX
72*> \verbatim
73*> LDX is INTEGER
74*> The leading dimension of the matrix X. LDX >= M.
75*> \endverbatim
76*
77* Authors:
78* ========
79*
80*> \author Univ. of Tennessee
81*> \author Univ. of California Berkeley
82*> \author Univ. of Colorado Denver
83*> \author NAG Ltd.
84*
85*> \ingroup lascl2
86*
87* =====================================================================
88 SUBROUTINE clascl2 ( M, N, D, X, LDX )
89*
90* -- LAPACK computational routine --
91* -- LAPACK is a software package provided by Univ. of Tennessee, --
92* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
93*
94* .. Scalar Arguments ..
95 INTEGER M, N, LDX
96* ..
97* .. Array Arguments ..
98 REAL D( * )
99 COMPLEX 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
116 END
117
subroutine clascl2(m, n, d, x, ldx)
CLASCL2 performs diagonal scaling on a matrix.
Definition clascl2.f:89