LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ LAPACKE_sge_nancheck()

lapack_logical LAPACKE_sge_nancheck ( int  matrix_layout,
lapack_int  m,
lapack_int  n,
const float *  a,
lapack_int  lda 
)

Definition at line 36 of file lapacke_sge_nancheck.c.

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