lapack_int LAPACKE_sppsvx( int matrix_layout, char fact, char uplo, lapack_int n, lapack_int nrhs, float* ap, float* afp, char* equed, float* s, float* b, lapack_int ldb, float* x, lapack_int ldx, float* rcond, 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_sppsvx", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ if( LAPACKE_lsame( fact, 'f' ) ) { if( LAPACKE_spp_nancheck( n, afp ) ) { return -7; } } if( LAPACKE_spp_nancheck( n, ap ) ) { return -6; } if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) { return -10; } if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) { if( LAPACKE_s_nancheck( n, s, 1 ) ) { return -9; } } #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_sppsvx_work( matrix_layout, fact, uplo, n, nrhs, ap, afp, equed, s, b, ldb, x, ldx, rcond, 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_sppsvx", info ); } return info; }
lapack_int LAPACKE_stpttf( int matrix_layout, char transr, char uplo, lapack_int n, const float* ap, float* arf ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_stpttf", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ if( LAPACKE_spp_nancheck( n, ap ) ) { return -5; } #endif return LAPACKE_stpttf_work( matrix_layout, transr, uplo, n, ap, arf ); }
lapack_int LAPACKE_spptrf( int matrix_layout, char uplo, lapack_int n, float* ap ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_spptrf", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK if( LAPACKE_get_nancheck() ) { /* Optionally check input matrices for NaNs */ if( LAPACKE_spp_nancheck( n, ap ) ) { return -4; } } #endif return LAPACKE_spptrf_work( matrix_layout, uplo, n, ap ); }
lapack_int LAPACKE_spptrs( int matrix_order, char uplo, lapack_int n, lapack_int nrhs, const float* ap, float* b, lapack_int ldb ) { if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_spptrs", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ if( LAPACKE_spp_nancheck( n, ap ) ) { return -5; } if( LAPACKE_sge_nancheck( matrix_order, n, nrhs, b, ldb ) ) { return -6; } #endif return LAPACKE_spptrs_work( matrix_order, uplo, n, nrhs, ap, b, ldb ); }
lapack_int LAPACKE_sppsv( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, float* ap, float* b, lapack_int ldb ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_sppsv", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK if( LAPACKE_get_nancheck() ) { /* Optionally check input matrices for NaNs */ if( LAPACKE_spp_nancheck( n, ap ) ) { return -5; } if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) { return -6; } } #endif return LAPACKE_sppsv_work( matrix_layout, uplo, n, nrhs, ap, b, ldb ); }