LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ LAPACKE_cge_nancheck()

lapack_logical LAPACKE_cge_nancheck ( int  matrix_layout,
lapack_int  m,
lapack_int  n,
const lapack_complex_float a,
lapack_int  lda 
)

Definition at line 37 of file lapacke_cge_nancheck.c.

41 {
42  lapack_int i, j;
43 
44  if( a == NULL ) return (lapack_logical) 0;
45 
46  if( matrix_layout == LAPACK_COL_MAJOR ) {
47  for( j = 0; j < n; j++ ) {
48  for( i = 0; i < MIN( m, lda ); i++ ) {
49  if( LAPACK_CISNAN( a[i+(size_t)j*lda] ) )
50  return (lapack_logical) 1;
51  }
52  }
53  } else if ( matrix_layout == LAPACK_ROW_MAJOR ) {
54  for( i = 0; i < m; i++ ) {
55  for( j = 0; j < MIN( n, lda ); j++ ) {
56  if( LAPACK_CISNAN( a[(size_t)i*lda+j] ) )
57  return (lapack_logical) 1;
58  }
59  }
60  }
61  return (lapack_logical) 0;
62 }
#define lapack_logical
Definition: lapacke.h:51
#define LAPACK_CISNAN(x)
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:119
#define MIN(x, y)
Definition: lapacke_utils.h:50
#define LAPACK_COL_MAJOR
Definition: lapacke.h:120
#define lapack_int
Definition: lapacke.h:47