LAPACK  3.5.0
LAPACK: Linear Algebra PACKage
 All Classes Files Functions Variables Typedefs Macros
lapacke_ztr_nancheck.c File Reference
#include "lapacke_utils.h"
Include dependency graph for lapacke_ztr_nancheck.c:

Go to the source code of this file.

Functions/Subroutines

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

Function/Subroutine Documentation

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

Definition at line 37 of file lapacke_ztr_nancheck.c.

{
lapack_int i, j, st;
lapack_logical colmaj, lower, unit;
if( a == NULL ) return (lapack_logical) 0;
colmaj = ( matrix_order == LAPACK_COL_MAJOR );
lower = LAPACKE_lsame( uplo, 'l' );
unit = LAPACKE_lsame( diag, 'u' );
if( ( !colmaj && ( matrix_order != LAPACK_ROW_MAJOR ) ) ||
( !lower && !LAPACKE_lsame( uplo, 'u' ) ) ||
( !unit && !LAPACKE_lsame( diag, 'n' ) ) ) {
/* Just exit if any of input parameters are wrong */
return (lapack_logical) 0;
}
if( unit ) {
/* If unit, then don't touch diagonal, start from 1st column or row */
st = 1;
} else {
/* If non-unit, then check diagonal also, starting from [0,0] */
st = 0;
}
/* Since col_major upper and row_major lower are equal,
* and col_major lower and row_major upper are equals too -
* using one code for equal cases. XOR( colmaj, upper )
*/
if( ( colmaj || lower ) && !( colmaj && lower ) ) {
for( j = st; j < n; j++ ) {
for( i = 0; i < MIN( j+1-st, lda ); i++ ) {
if( LAPACK_ZISNAN( a[i+j*lda] ) )
return (lapack_logical) 1;
}
}
} else {
for( j = 0; j < n-st; j++ ) {
for( i = j+st; i < MIN( n, lda ); i++ ) {
if( LAPACK_ZISNAN( a[i+j*lda] ) )
return (lapack_logical) 1;
}
}
}
return (lapack_logical) 0;
}

Here is the call graph for this function:

Here is the caller graph for this function: