1*> \brief \b ZLAIPD
2*
3*  =========== DOCUMENTATION ===========
4*
5* Online html documentation available at
6*            http://www.netlib.org/lapack/explore-html/
7*
8*  Definition:
9*  ===========
10*
11*       SUBROUTINE ZLAIPD( N, A, INDA, VINDA )
12*
13*       .. Scalar Arguments ..
14*       INTEGER            INDA, N, VINDA
15*       ..
16*       .. Array Arguments ..
17*       COMPLEX*16         A( * )
18*       ..
19*
20*
21*> \par Purpose:
22*  =============
23*>
24*> \verbatim
25*>
26*> ZLAIPD sets the imaginary part of the diagonal elements of a complex
27*> matrix A to a large value.  This is used to test LAPACK routines for
28*> complex Hermitian matrices, which are not supposed to access or use
29*> the imaginary parts of the diagonals.
30*> \endverbatim
31*
32*  Arguments:
33*  ==========
34*
35*> \param[in] N
36*> \verbatim
37*>          N is INTEGER
38*>         The number of diagonal elements of A.
39*> \endverbatim
40*>
41*> \param[in,out] A
42*> \verbatim
43*>          A is COMPLEX*16 array, dimension
44*>                        (1+(N-1)*INDA+(N-2)*VINDA)
45*>         On entry, the complex (Hermitian) matrix A.
46*>         On exit, the imaginary parts of the diagonal elements are set
47*>         to BIGNUM = EPS / SAFMIN, where EPS is the machine epsilon and
48*>         SAFMIN is the safe minimum.
49*> \endverbatim
50*>
51*> \param[in] INDA
52*> \verbatim
53*>          INDA is INTEGER
54*>         The increment between A(1) and the next diagonal element of A.
55*>         Typical values are
56*>         = LDA+1:  square matrices with leading dimension LDA
57*>         = 2:  packed upper triangular matrix, starting at A(1,1)
58*>         = N:  packed lower triangular matrix, starting at A(1,1)
59*> \endverbatim
60*>
61*> \param[in] VINDA
62*> \verbatim
63*>          VINDA is INTEGER
64*>         The change in the diagonal increment between columns of A.
65*>         Typical values are
66*>         = 0:  no change, the row and column increments in A are fixed
67*>         = 1:  packed upper triangular matrix
68*>         = -1:  packed lower triangular matrix
69*> \endverbatim
70*
71*  Authors:
72*  ========
73*
74*> \author Univ. of Tennessee
75*> \author Univ. of California Berkeley
76*> \author Univ. of Colorado Denver
77*> \author NAG Ltd.
78*
79*> \date December 2016
80*
81*> \ingroup complex16_lin
82*
83*  =====================================================================
84      SUBROUTINE ZLAIPD( N, A, INDA, VINDA )
85*
86*  -- LAPACK test routine (version 3.7.0) --
87*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
88*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
89*     December 2016
90*
91*     .. Scalar Arguments ..
92      INTEGER            INDA, N, VINDA
93*     ..
94*     .. Array Arguments ..
95      COMPLEX*16         A( * )
96*     ..
97*
98*  =====================================================================
99*
100*     .. Local Scalars ..
101      INTEGER            I, IA, IXA
102      DOUBLE PRECISION   BIGNUM
103*     ..
104*     .. External Functions ..
105      DOUBLE PRECISION   DLAMCH
106      EXTERNAL           DLAMCH
107*     ..
108*     .. Intrinsic Functions ..
109      INTRINSIC          DBLE, DCMPLX
110*     ..
111*     .. Executable Statements ..
112*
113      BIGNUM = DLAMCH( 'Epsilon' ) / DLAMCH( 'Safe minimum' )
114      IA = 1
115      IXA = INDA
116      DO 10 I = 1, N
117         A( IA ) = DCMPLX( DBLE( A( IA ) ), BIGNUM )
118         IA = IA + IXA
119         IXA = IXA + VINDA
120   10 CONTINUE
121      RETURN
122      END
123