1 SUBROUTINE CLAIPD( N, A, INDA, VINDA )
2 *
3 * -- LAPACK test routine (version 3.1) --
4 * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
5 * November 2006
6 *
7 * .. Scalar Arguments ..
8 INTEGER INDA, N, VINDA
9 * ..
10 * .. Array Arguments ..
11 COMPLEX A( * )
12 * ..
13 *
14 * Purpose
15 * =======
16 *
17 * CLAIPD sets the imaginary part of the diagonal elements of a complex
18 * matrix A to a large value. This is used to test LAPACK routines for
19 * complex Hermitian matrices, which are not supposed to access or use
20 * the imaginary parts of the diagonals.
21 *
22 * Arguments
23 * =========
24 *
25 * N (input) INTEGER
26 * The number of diagonal elements of A.
27 *
28 * A (input/output) COMPLEX array, dimension
29 * (1+(N-1)*INDA+(N-2)*VINDA)
30 * On entry, the complex (Hermitian) matrix A.
31 * On exit, the imaginary parts of the diagonal elements are set
32 * to BIGNUM = EPS / SAFMIN, where EPS is the machine epsilon and
33 * SAFMIN is the safe minimum.
34 *
35 * INDA (input) INTEGER
36 * The increment between A(1) and the next diagonal element of A.
37 * Typical values are
38 * = LDA+1: square matrices with leading dimension LDA
39 * = 2: packed upper triangular matrix, starting at A(1,1)
40 * = N: packed lower triangular matrix, starting at A(1,1)
41 *
42 * VINDA (input) INTEGER
43 * The change in the diagonal increment between columns of A.
44 * Typical values are
45 * = 0: no change, the row and column increments in A are fixed
46 * = 1: packed upper triangular matrix
47 * = -1: packed lower triangular matrix
48 *
49 * =====================================================================
50 *
51 * .. Local Scalars ..
52 INTEGER I, IA, IXA
53 REAL BIGNUM
54 * ..
55 * .. External Functions ..
56 REAL SLAMCH
57 EXTERNAL SLAMCH
58 * ..
59 * .. Intrinsic Functions ..
60 INTRINSIC CMPLX, REAL
61 * ..
62 * .. Executable Statements ..
63 *
64 BIGNUM = SLAMCH( 'Epsilon' ) / SLAMCH( 'Safe minimum' )
65 IA = 1
66 IXA = INDA
67 DO 10 I = 1, N
68 A( IA ) = CMPLX( REAL( A( IA ) ), BIGNUM )
69 IA = IA + IXA
70 IXA = IXA + VINDA
71 10 CONTINUE
72 RETURN
73 END
2 *
3 * -- LAPACK test routine (version 3.1) --
4 * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
5 * November 2006
6 *
7 * .. Scalar Arguments ..
8 INTEGER INDA, N, VINDA
9 * ..
10 * .. Array Arguments ..
11 COMPLEX A( * )
12 * ..
13 *
14 * Purpose
15 * =======
16 *
17 * CLAIPD sets the imaginary part of the diagonal elements of a complex
18 * matrix A to a large value. This is used to test LAPACK routines for
19 * complex Hermitian matrices, which are not supposed to access or use
20 * the imaginary parts of the diagonals.
21 *
22 * Arguments
23 * =========
24 *
25 * N (input) INTEGER
26 * The number of diagonal elements of A.
27 *
28 * A (input/output) COMPLEX array, dimension
29 * (1+(N-1)*INDA+(N-2)*VINDA)
30 * On entry, the complex (Hermitian) matrix A.
31 * On exit, the imaginary parts of the diagonal elements are set
32 * to BIGNUM = EPS / SAFMIN, where EPS is the machine epsilon and
33 * SAFMIN is the safe minimum.
34 *
35 * INDA (input) INTEGER
36 * The increment between A(1) and the next diagonal element of A.
37 * Typical values are
38 * = LDA+1: square matrices with leading dimension LDA
39 * = 2: packed upper triangular matrix, starting at A(1,1)
40 * = N: packed lower triangular matrix, starting at A(1,1)
41 *
42 * VINDA (input) INTEGER
43 * The change in the diagonal increment between columns of A.
44 * Typical values are
45 * = 0: no change, the row and column increments in A are fixed
46 * = 1: packed upper triangular matrix
47 * = -1: packed lower triangular matrix
48 *
49 * =====================================================================
50 *
51 * .. Local Scalars ..
52 INTEGER I, IA, IXA
53 REAL BIGNUM
54 * ..
55 * .. External Functions ..
56 REAL SLAMCH
57 EXTERNAL SLAMCH
58 * ..
59 * .. Intrinsic Functions ..
60 INTRINSIC CMPLX, REAL
61 * ..
62 * .. Executable Statements ..
63 *
64 BIGNUM = SLAMCH( 'Epsilon' ) / SLAMCH( 'Safe minimum' )
65 IA = 1
66 IXA = INDA
67 DO 10 I = 1, N
68 A( IA ) = CMPLX( REAL( A( IA ) ), BIGNUM )
69 IA = IA + IXA
70 IXA = IXA + VINDA
71 10 CONTINUE
72 RETURN
73 END