LAPACK 3.11.0 LAPACK: Linear Algebra PACKage
Searching...
No Matches

## ◆ LAPACKE_ztr_nancheck()

 lapack_logical LAPACKE_ztr_nancheck ( int matrix_layout, char uplo, char diag, lapack_int n, const lapack_complex_double * a, lapack_int lda )

Definition at line 36 of file lapacke_ztr_nancheck.c.

40{
41 lapack_int i, j, st;
42 lapack_logical colmaj, lower, unit;
43
44 if( a == NULL ) return (lapack_logical) 0;
45
46 colmaj = ( matrix_layout == LAPACK_COL_MAJOR );
47 lower = LAPACKE_lsame( uplo, 'l' );
48 unit = LAPACKE_lsame( diag, 'u' );
49
50 if( ( !colmaj && ( matrix_layout != LAPACK_ROW_MAJOR ) ) ||
51 ( !lower && !LAPACKE_lsame( uplo, 'u' ) ) ||
52 ( !unit && !LAPACKE_lsame( diag, 'n' ) ) ) {
53 /* Just exit if any of input parameters are wrong */
54 return (lapack_logical) 0;
55 }
56 if( unit ) {
57 /* If unit, then don't touch diagonal, start from 1st column or row */
58 st = 1;
59 } else {
60 /* If non-unit, then check diagonal also, starting from [0,0] */
61 st = 0;
62 }
63
64 /* Since col_major upper and row_major lower are equal,
65 * and col_major lower and row_major upper are equals too -
66 * using one code for equal cases. XOR( colmaj, upper )
67 */
68 if( ( colmaj || lower ) && !( colmaj && lower ) ) {
69 for( j = st; j < n; j++ ) {
70 for( i = 0; i < MIN( j+1-st, lda ); i++ ) {
71 if( LAPACK_ZISNAN( a[i+j*lda] ) )
72 return (lapack_logical) 1;
73 }
74 }
75 } else {
76 for( j = 0; j < n-st; j++ ) {
77 for( i = j+st; i < MIN( n, lda ); i++ ) {
78 if( LAPACK_ZISNAN( a[i+j*lda] ) )
79 return (lapack_logical) 1;
80 }
81 }
82 }
83 return (lapack_logical) 0;
84}
#define lapack_int
Definition: lapack.h:87
#define lapack_logical
Definition: lapack.h:103
#define LAPACK_COL_MAJOR
Definition: lapacke.h:53
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:52
lapack_logical LAPACKE_lsame(char ca, char cb)
Definition: lapacke_lsame.c:35
#define LAPACK_ZISNAN(x)
#define MIN(x, y)
Definition: lapacke_utils.h:49
Here is the call graph for this function:
Here is the caller graph for this function: