LAPACK 3.3.0

zlaipd.f

Go to the documentation of this file.
00001       SUBROUTINE ZLAIPD( N, A, INDA, VINDA )
00002 *
00003 *  -- LAPACK test routine (version 3.1) --
00004 *     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
00005 *     November 2006
00006 *
00007 *     .. Scalar Arguments ..
00008       INTEGER            INDA, N, VINDA
00009 *     ..
00010 *     .. Array Arguments ..
00011       COMPLEX*16         A( * )
00012 *     ..
00013 *
00014 *  Purpose
00015 *  =======
00016 *
00017 *  ZLAIPD sets the imaginary part of the diagonal elements of a complex
00018 *  matrix A to a large value.  This is used to test LAPACK routines for
00019 *  complex Hermitian matrices, which are not supposed to access or use
00020 *  the imaginary parts of the diagonals.
00021 *
00022 *  Arguments
00023 *  =========
00024 *
00025 *  N      (input) INTEGER
00026 *         The number of diagonal elements of A.
00027 *
00028 *  A      (input/output) COMPLEX*16 array, dimension
00029 *                        (1+(N-1)*INDA+(N-2)*VINDA)
00030 *         On entry, the complex (Hermitian) matrix A.
00031 *         On exit, the imaginary parts of the diagonal elements are set
00032 *         to BIGNUM = EPS / SAFMIN, where EPS is the machine epsilon and
00033 *         SAFMIN is the safe minimum.
00034 *
00035 *  INDA   (input) INTEGER
00036 *         The increment between A(1) and the next diagonal element of A.
00037 *         Typical values are
00038 *         = LDA+1:  square matrices with leading dimension LDA
00039 *         = 2:  packed upper triangular matrix, starting at A(1,1)
00040 *         = N:  packed lower triangular matrix, starting at A(1,1)
00041 *
00042 *  VINDA  (input) INTEGER
00043 *         The change in the diagonal increment between columns of A.
00044 *         Typical values are
00045 *         = 0:  no change, the row and column increments in A are fixed
00046 *         = 1:  packed upper triangular matrix
00047 *         = -1:  packed lower triangular matrix
00048 *
00049 *  =====================================================================
00050 *
00051 *     .. Local Scalars ..
00052       INTEGER            I, IA, IXA
00053       DOUBLE PRECISION   BIGNUM
00054 *     ..
00055 *     .. External Functions ..
00056       DOUBLE PRECISION   DLAMCH
00057       EXTERNAL           DLAMCH
00058 *     ..
00059 *     .. Intrinsic Functions ..
00060       INTRINSIC          DBLE, DCMPLX
00061 *     ..
00062 *     .. Executable Statements ..
00063 *
00064       BIGNUM = DLAMCH( 'Epsilon' ) / DLAMCH( 'Safe minimum' )
00065       IA = 1
00066       IXA = INDA
00067       DO 10 I = 1, N
00068          A( IA ) = DCMPLX( DBLE( A( IA ) ), BIGNUM )
00069          IA = IA + IXA
00070          IXA = IXA + VINDA
00071    10 CONTINUE
00072       RETURN
00073       END
 All Files Functions