01:       SUBROUTINE ZLARSCL2 ( M, N, D, X, LDX )
02: *
03: *     -- LAPACK routine (version 3.2)                                 --
04: *     -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
05: *     -- Jason Riedy of Univ. of California Berkeley.                 --
06: *     -- November 2008                                                --
07: *
08: *     -- LAPACK is a software package provided by Univ. of Tennessee, --
09: *     -- Univ. of California Berkeley and NAG Ltd.                    --
10: *
11:       IMPLICIT NONE
12: *     ..
13: *     .. Scalar Arguments ..
14:       INTEGER            M, N, LDX
15: *     ..
16: *     .. Array Arguments ..
17:       COMPLEX*16         X( LDX, * )
18:       DOUBLE PRECISION   D( * )
19: *     ..
20: *
21: *  Purpose
22: *  =======
23: *
24: *  ZLARSCL2 performs a reciprocal diagonal scaling on an vector:
25: *    x <-- inv(D) * x
26: *  where the diagonal matrix D is stored as a vector.
27: *  Eventually to be replaced by BLAS_sge_diag_scale in the new BLAS
28: *  standard.
29: *
30: *  Arguments
31: *  =========
32: *  N      (input) INTEGER
33: *         The size of the vectors X and D.
34: *
35: *  D      (input) DOUBLE PRECISION array, length N
36: *         Diagonal matrix D, stored as a vector of length N.
37: *  X      (input/output) COMPLEX*16 array, length N
38: *         On entry, the vector X to be scaled by D.
39: *         On exit, the scaled vector.
40: *     ..
41: *     .. Local Scalars ..
42:       INTEGER            I, J
43: *     ..
44: *     .. Executable Statements ..
45: *
46:       DO J = 1, N
47:          DO I = 1, M
48:             X(I,J) = X(I,J) / D(I)
49:          END DO
50:       END DO
51: *
52:       RETURN
53:       END
54: *
55: