LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ LAPACKE_dtb_nancheck()

lapack_logical LAPACKE_dtb_nancheck ( int  matrix_layout,
char  uplo,
char  diag,
lapack_int  n,
lapack_int  kd,
const double *  ab,
lapack_int  ldab 
)

Definition at line 36 of file lapacke_dtb_nancheck.c.

40 {
41  lapack_logical colmaj, upper, unit;
42 
43  if( ab == NULL ) return (lapack_logical) 0;
44 
45  colmaj = ( matrix_layout == LAPACK_COL_MAJOR );
46  upper = LAPACKE_lsame( uplo, 'u' );
47  unit = LAPACKE_lsame( diag, 'u' );
48 
49  if( ( !colmaj && ( matrix_layout != LAPACK_ROW_MAJOR ) ) ||
50  ( !upper && !LAPACKE_lsame( uplo, 'l' ) ) ||
51  ( !unit && !LAPACKE_lsame( diag, 'n' ) ) ) {
52  /* Just exit if any of input parameters are wrong */
53  return (lapack_logical) 0;
54  }
55 
56  if( unit ) {
57  /* Unit case, diagonal should be excluded from the check for NaN. */
58  if( colmaj ) {
59  if( upper ) {
60  return LAPACKE_dgb_nancheck( matrix_layout, n-1, n-1, 0, kd-1,
61  &ab[ldab], ldab );
62  } else {
63  return LAPACKE_dgb_nancheck( matrix_layout, n-1, n-1, kd-1, 0,
64  &ab[1], ldab );
65  }
66  } else {
67  if( upper ) {
68  return LAPACKE_dgb_nancheck( matrix_layout, n-1, n-1, 0, kd-1,
69  &ab[1], ldab );
70  } else {
71  return LAPACKE_dgb_nancheck( matrix_layout, n-1, n-1, kd-1, 0,
72  &ab[ldab], ldab );
73  }
74  }
75  } else {
76  /* Non-unit case */
77  if( upper ) {
78  return LAPACKE_dgb_nancheck( matrix_layout, n, n, 0, kd, ab, ldab );
79  } else {
80  return LAPACKE_dgb_nancheck( matrix_layout, n, n, kd, 0, ab, ldab );
81  }
82  }
83 }
#define lapack_logical
Definition: lapack.h:87
#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
lapack_logical LAPACKE_dgb_nancheck(int matrix_layout, lapack_int m, lapack_int n, lapack_int kl, lapack_int ku, const double *ab, lapack_int ldab)
Here is the call graph for this function:
Here is the caller graph for this function: