lapack_int LAPACKE_zppsvx( int matrix_order, char fact, char uplo, lapack_int n, lapack_int nrhs, lapack_complex_double* ap, lapack_complex_double* afp, char* equed, double* s, lapack_complex_double* b, lapack_int ldb, lapack_complex_double* x, lapack_int ldx, double* rcond, double* ferr, double* berr ) { lapack_int info = 0; double* rwork = NULL; lapack_complex_double* work = NULL; if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zppsvx", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ if( LAPACKE_lsame( fact, 'f' ) ) { if( LAPACKE_zpp_nancheck( n, afp ) ) { return -7; } } if( LAPACKE_zpp_nancheck( n, ap ) ) { return -6; } if( LAPACKE_zge_nancheck( matrix_order, n, nrhs, b, ldb ) ) { return -10; } if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) { if( LAPACKE_d_nancheck( n, s, 1 ) ) { return -9; } } #endif /* Allocate memory for working array(s) */ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) ); if( rwork == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_0; } work = (lapack_complex_double*) LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_1; } /* Call middle-level interface */ info = LAPACKE_zppsvx_work( matrix_order, fact, uplo, n, nrhs, ap, afp, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork ); /* Release memory and exit */ LAPACKE_free( work ); exit_level_1: LAPACKE_free( rwork ); exit_level_0: if( info == LAPACK_WORK_MEMORY_ERROR ) { LAPACKE_xerbla( "LAPACKE_zppsvx", info ); } return info; }
lapack_int LAPACKE_zupmtr( int matrix_order, char side, char uplo, char trans, lapack_int m, lapack_int n, const lapack_complex_double* ap, const lapack_complex_double* tau, lapack_complex_double* c, lapack_int ldc ) { lapack_int info = 0; /* Additional scalars declarations for work arrays */ lapack_int lwork; lapack_complex_double* work = NULL; if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zupmtr", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n; if( LAPACKE_zpp_nancheck( r, ap ) ) { return -7; } if( LAPACKE_zge_nancheck( matrix_order, m, n, c, ldc ) ) { return -9; } if( LAPACKE_z_nancheck( m-1, tau, 1 ) ) { return -8; } #endif /* Additional scalars initializations for work arrays */ if( LAPACKE_lsame( side, 'l' ) ) { lwork = MAX(1,n); } else if( LAPACKE_lsame( side, 'r' ) ) { lwork = MAX(1,m); } else { lwork = 1; /* Any value */ } /* Allocate memory for working array(s) */ work = (lapack_complex_double*) LAPACKE_malloc( sizeof(lapack_complex_double) * lwork ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_0; } /* Call middle-level interface */ info = LAPACKE_zupmtr_work( matrix_order, side, uplo, trans, m, n, ap, tau, c, ldc, work ); /* Release memory and exit */ LAPACKE_free( work ); exit_level_0: if( info == LAPACK_WORK_MEMORY_ERROR ) { LAPACKE_xerbla( "LAPACKE_zupmtr", info ); } return info; }
lapack_int LAPACKE_zpptri( int matrix_order, char uplo, lapack_int n, lapack_complex_double* ap ) { if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zpptri", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ if( LAPACKE_zpp_nancheck( n, ap ) ) { return -4; } #endif return LAPACKE_zpptri_work( matrix_order, uplo, n, ap ); }
lapack_int LAPACKE_ztpttf( int matrix_layout, char transr, char uplo, lapack_int n, const lapack_complex_double* ap, lapack_complex_double* arf ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_ztpttf", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ if( LAPACKE_zpp_nancheck( n, ap ) ) { return -5; } #endif return LAPACKE_ztpttf_work( matrix_layout, transr, uplo, n, ap, arf ); }
lapack_int LAPACKE_zppcon( int matrix_order, char uplo, lapack_int n, const lapack_complex_double* ap, double anorm, double* rcond ) { lapack_int info = 0; double* rwork = NULL; lapack_complex_double* work = NULL; if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zppcon", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) { return -5; } if( LAPACKE_zpp_nancheck( n, ap ) ) { return -4; } #endif /* Allocate memory for working array(s) */ rwork = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) ); if( rwork == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_0; } work = (lapack_complex_double*) LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,2*n) ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_1; } /* Call middle-level interface */ info = LAPACKE_zppcon_work( matrix_order, uplo, n, ap, anorm, rcond, work, rwork ); /* Release memory and exit */ LAPACKE_free( work ); exit_level_1: LAPACKE_free( rwork ); exit_level_0: if( info == LAPACK_WORK_MEMORY_ERROR ) { LAPACKE_xerbla( "LAPACKE_zppcon", info ); } return info; }