lapack_int LAPACKE_spbrfs( int matrix_layout, char uplo, lapack_int n, lapack_int kd, lapack_int nrhs, const float* ab, lapack_int ldab, const float* afb, lapack_int ldafb, const float* b, lapack_int ldb, float* x, lapack_int ldx, float* ferr, float* berr ) { lapack_int info = 0; lapack_int* iwork = NULL; float* work = NULL; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_spbrfs", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK if( LAPACKE_get_nancheck() ) { /* Optionally check input matrices for NaNs */ if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) { return -6; } if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) { return -8; } if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) { return -10; } if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) { return -12; } } #endif /* Allocate memory for working array(s) */ iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n) ); if( iwork == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_0; } work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n) ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_1; } /* Call middle-level interface */ info = LAPACKE_spbrfs_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, iwork ); /* Release memory and exit */ LAPACKE_free( work ); exit_level_1: LAPACKE_free( iwork ); exit_level_0: if( info == LAPACK_WORK_MEMORY_ERROR ) { LAPACKE_xerbla( "LAPACKE_spbrfs", info ); } return info; }
lapack_int LAPACKE_spbtrf( int matrix_order, char uplo, lapack_int n, lapack_int kd, float* ab, lapack_int ldab ) { if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_spbtrf", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ if( LAPACKE_spb_nancheck( matrix_order, uplo, n, kd, ab, ldab ) ) { return -5; } #endif return LAPACKE_spbtrf_work( matrix_order, uplo, n, kd, ab, ldab ); }
lapack_int LAPACKE_spbstf( int matrix_layout, char uplo, lapack_int n, lapack_int kb, float* bb, lapack_int ldbb ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_spbstf", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) { return -5; } #endif return LAPACKE_spbstf_work( matrix_layout, uplo, n, kb, bb, ldbb ); }
lapack_int LAPACKE_spbequ( int matrix_layout, char uplo, lapack_int n, lapack_int kd, const float* ab, lapack_int ldab, float* s, float* scond, float* amax ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_spbequ", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK if( LAPACKE_get_nancheck() ) { /* Optionally check input matrices for NaNs */ if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) { return -5; } } #endif return LAPACKE_spbequ_work( matrix_layout, uplo, n, kd, ab, ldab, s, scond, amax ); }
lapack_int LAPACKE_spbtrs( int matrix_layout, char uplo, lapack_int n, lapack_int kd, lapack_int nrhs, const float* ab, lapack_int ldab, float* b, lapack_int ldb ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_spbtrs", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) { return -6; } if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) { return -8; } #endif return LAPACKE_spbtrs_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b, ldb ); }