1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
LOGICAL FUNCTION CGENND (M, N, A, LDA)
IMPLICIT NONE * * -- LAPACK test routine (version 3.1) -- * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. * February 2008 * * .. Scalar Arguments .. INTEGER M, N, LDA * .. * .. Array Arguments .. COMPLEX A( LDA, * ) * .. * * Purpose * ======= * * CGENND tests that its argument has a real, non-negative diagonal. * * Arguments * ========= * * M (input) INTEGER * The number of rows in A. * * N (input) INTEGER * The number of columns in A. * * A (input) COMPLEX array, dimension (LDA, N) * The matrix. * * LDA (input) INTEGER * Leading dimension of A. * * ===================================================================== * * .. Parameters .. REAL ZERO PARAMETER ( ZERO = 0.0E0 ) * .. * .. Local Scalars .. LOGICAL OUT INTEGER I, K COMPLEX AII * .. * .. Intrinsics .. INTRINSIC MIN, REAL, AIMAG * .. * .. Executable Statements .. K = MIN( M, N ) DO I = 1, K AII = A( I, I ) IF( REAL( AII ).LT.ZERO.OR.AIMAG( AII ).NE.ZERO ) THEN CGENND = .FALSE. RETURN END IF END DO CGENND = .TRUE. RETURN END |