PLASMA  2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
cgennd.f
Go to the documentation of this file.
1  LOGICAL FUNCTION cgennd (M, N, A, LDA)
2  IMPLICIT NONE
3 *
4 * -- LAPACK test routine (version 3.1) --
5 * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
6 * February 2008
7 *
8 * .. Scalar Arguments ..
9  INTEGER m, n, lda
10 * ..
11 * .. Array Arguments ..
12  COMPLEX a( lda, * )
13 * ..
14 *
15 * Purpose
16 * =======
17 *
18 * CGENND tests that its argument has a real, non-negative diagonal.
19 *
20 * Arguments
21 * =========
22 *
23 * M (input) INTEGER
24 * The number of rows in A.
25 *
26 * N (input) INTEGER
27 * The number of columns in A.
28 *
29 * A (input) COMPLEX array, dimension (LDA, N)
30 * The matrix.
31 *
32 * LDA (input) INTEGER
33 * Leading dimension of A.
34 *
35 * =====================================================================
36 *
37 * .. Parameters ..
38  REAL zero
39  parameter( zero = 0.0e0 )
40 * ..
41 * .. Local Scalars ..
42  LOGICAL out
43  INTEGER i, k
44  COMPLEX aii
45 * ..
46 * .. Intrinsics ..
47  INTRINSIC min, REAL, aimag
48 * ..
49 * .. Executable Statements ..
50  k = min( m, n )
51  DO i = 1, k
52  aii = a( i, i )
53  IF( REAL( aii ).LT.zero.OR.aimag( aii ).NE.zero ) then
54  cgennd = .false.
55  return
56  END IF
57  END DO
58  cgennd = .true.
59  return
60  END