Apply MKL team fixes to the LAPACKE interfaces (Reference-LAPACK PR 534)tags/v0.3.15
| @@ -4768,7 +4768,7 @@ void LAPACK_chegst( | |||||
| lapack_int const* itype, char const* uplo, | lapack_int const* itype, char const* uplo, | ||||
| lapack_int const* n, | lapack_int const* n, | ||||
| lapack_complex_float* A, lapack_int const* lda, | lapack_complex_float* A, lapack_int const* lda, | ||||
| lapack_complex_float* B, lapack_int const* ldb, | |||||
| const lapack_complex_float* B, lapack_int const* ldb, | |||||
| lapack_int* info ); | lapack_int* info ); | ||||
| #define LAPACK_zhegst LAPACK_GLOBAL(zhegst,ZHEGST) | #define LAPACK_zhegst LAPACK_GLOBAL(zhegst,ZHEGST) | ||||
| @@ -4776,7 +4776,7 @@ void LAPACK_zhegst( | |||||
| lapack_int const* itype, char const* uplo, | lapack_int const* itype, char const* uplo, | ||||
| lapack_int const* n, | lapack_int const* n, | ||||
| lapack_complex_double* A, lapack_int const* lda, | lapack_complex_double* A, lapack_int const* lda, | ||||
| lapack_complex_double* B, lapack_int const* ldb, | |||||
| const lapack_complex_double* B, lapack_int const* ldb, | |||||
| lapack_int* info ); | lapack_int* info ); | ||||
| #define LAPACK_chegv LAPACK_GLOBAL(chegv,CHEGV) | #define LAPACK_chegv LAPACK_GLOBAL(chegv,CHEGV) | ||||
| @@ -11556,7 +11556,7 @@ void LAPACK_zsytrs( | |||||
| void LAPACK_csytrs2( | void LAPACK_csytrs2( | ||||
| char const* uplo, | char const* uplo, | ||||
| lapack_int const* n, lapack_int const* nrhs, | lapack_int const* n, lapack_int const* nrhs, | ||||
| lapack_complex_float* A, lapack_int const* lda, lapack_int const* ipiv, | |||||
| const lapack_complex_float* A, lapack_int const* lda, lapack_int const* ipiv, | |||||
| lapack_complex_float* B, lapack_int const* ldb, | lapack_complex_float* B, lapack_int const* ldb, | ||||
| lapack_complex_float* work, | lapack_complex_float* work, | ||||
| lapack_int* info ); | lapack_int* info ); | ||||
| @@ -11565,7 +11565,7 @@ void LAPACK_csytrs2( | |||||
| void LAPACK_dsytrs2( | void LAPACK_dsytrs2( | ||||
| char const* uplo, | char const* uplo, | ||||
| lapack_int const* n, lapack_int const* nrhs, | lapack_int const* n, lapack_int const* nrhs, | ||||
| double* A, lapack_int const* lda, lapack_int const* ipiv, | |||||
| const double* A, lapack_int const* lda, lapack_int const* ipiv, | |||||
| double* B, lapack_int const* ldb, | double* B, lapack_int const* ldb, | ||||
| double* work, | double* work, | ||||
| lapack_int* info ); | lapack_int* info ); | ||||
| @@ -11574,7 +11574,7 @@ void LAPACK_dsytrs2( | |||||
| void LAPACK_ssytrs2( | void LAPACK_ssytrs2( | ||||
| char const* uplo, | char const* uplo, | ||||
| lapack_int const* n, lapack_int const* nrhs, | lapack_int const* n, lapack_int const* nrhs, | ||||
| float* A, lapack_int const* lda, lapack_int const* ipiv, | |||||
| const float* A, lapack_int const* lda, lapack_int const* ipiv, | |||||
| float* B, lapack_int const* ldb, | float* B, lapack_int const* ldb, | ||||
| float* work, | float* work, | ||||
| lapack_int* info ); | lapack_int* info ); | ||||
| @@ -11583,7 +11583,7 @@ void LAPACK_ssytrs2( | |||||
| void LAPACK_zsytrs2( | void LAPACK_zsytrs2( | ||||
| char const* uplo, | char const* uplo, | ||||
| lapack_int const* n, lapack_int const* nrhs, | lapack_int const* n, lapack_int const* nrhs, | ||||
| lapack_complex_double* A, lapack_int const* lda, lapack_int const* ipiv, | |||||
| const lapack_complex_double* A, lapack_int const* lda, lapack_int const* ipiv, | |||||
| lapack_complex_double* B, lapack_int const* ldb, | lapack_complex_double* B, lapack_int const* ldb, | ||||
| lapack_complex_double* work, | lapack_complex_double* work, | ||||
| lapack_int* info ); | lapack_int* info ); | ||||
| @@ -1867,11 +1867,11 @@ lapack_int LAPACKE_zheevx( int matrix_layout, char jobz, char range, char uplo, | |||||
| lapack_int LAPACKE_chegst( int matrix_layout, lapack_int itype, char uplo, | lapack_int LAPACKE_chegst( int matrix_layout, lapack_int itype, char uplo, | ||||
| lapack_int n, lapack_complex_float* a, | lapack_int n, lapack_complex_float* a, | ||||
| lapack_int lda, lapack_complex_float* b, | |||||
| lapack_int lda, const lapack_complex_float* b, | |||||
| lapack_int ldb ); | lapack_int ldb ); | ||||
| lapack_int LAPACKE_zhegst( int matrix_layout, lapack_int itype, char uplo, | lapack_int LAPACKE_zhegst( int matrix_layout, lapack_int itype, char uplo, | ||||
| lapack_int n, lapack_complex_double* a, | lapack_int n, lapack_complex_double* a, | ||||
| lapack_int lda, lapack_complex_double* b, | |||||
| lapack_int lda, const lapack_complex_double* b, | |||||
| lapack_int ldb ); | lapack_int ldb ); | ||||
| lapack_int LAPACKE_chegv( int matrix_layout, lapack_int itype, char jobz, | lapack_int LAPACKE_chegv( int matrix_layout, lapack_int itype, char jobz, | ||||
| @@ -6932,11 +6932,11 @@ lapack_int LAPACKE_zheevx_work( int matrix_layout, char jobz, char range, | |||||
| lapack_int LAPACKE_chegst_work( int matrix_layout, lapack_int itype, char uplo, | lapack_int LAPACKE_chegst_work( int matrix_layout, lapack_int itype, char uplo, | ||||
| lapack_int n, lapack_complex_float* a, | lapack_int n, lapack_complex_float* a, | ||||
| lapack_int lda, lapack_complex_float* b, | |||||
| lapack_int lda, const lapack_complex_float* b, | |||||
| lapack_int ldb ); | lapack_int ldb ); | ||||
| lapack_int LAPACKE_zhegst_work( int matrix_layout, lapack_int itype, char uplo, | lapack_int LAPACKE_zhegst_work( int matrix_layout, lapack_int itype, char uplo, | ||||
| lapack_int n, lapack_complex_double* a, | lapack_int n, lapack_complex_double* a, | ||||
| lapack_int lda, lapack_complex_double* b, | |||||
| lapack_int lda, const lapack_complex_double* b, | |||||
| lapack_int ldb ); | lapack_int ldb ); | ||||
| lapack_int LAPACKE_chegv_work( int matrix_layout, lapack_int itype, char jobz, | lapack_int LAPACKE_chegv_work( int matrix_layout, lapack_int itype, char jobz, | ||||
| @@ -10553,11 +10553,11 @@ lapack_int LAPACKE_csytri2x_work( int matrix_layout, char uplo, lapack_int n, | |||||
| const lapack_int* ipiv, | const lapack_int* ipiv, | ||||
| lapack_complex_float* work, lapack_int nb ); | lapack_complex_float* work, lapack_int nb ); | ||||
| lapack_int LAPACKE_csytrs2( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_csytrs2( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, lapack_complex_float* a, | |||||
| lapack_int nrhs, const lapack_complex_float* a, | |||||
| lapack_int lda, const lapack_int* ipiv, | lapack_int lda, const lapack_int* ipiv, | ||||
| lapack_complex_float* b, lapack_int ldb ); | lapack_complex_float* b, lapack_int ldb ); | ||||
| lapack_int LAPACKE_csytrs2_work( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_csytrs2_work( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, lapack_complex_float* a, | |||||
| lapack_int nrhs, const lapack_complex_float* a, | |||||
| lapack_int lda, const lapack_int* ipiv, | lapack_int lda, const lapack_int* ipiv, | ||||
| lapack_complex_float* b, lapack_int ldb, | lapack_complex_float* b, lapack_int ldb, | ||||
| lapack_complex_float* work ); | lapack_complex_float* work ); | ||||
| @@ -10718,10 +10718,10 @@ lapack_int LAPACKE_dsytri2x_work( int matrix_layout, char uplo, lapack_int n, | |||||
| const lapack_int* ipiv, double* work, | const lapack_int* ipiv, double* work, | ||||
| lapack_int nb ); | lapack_int nb ); | ||||
| lapack_int LAPACKE_dsytrs2( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_dsytrs2( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, double* a, lapack_int lda, | |||||
| lapack_int nrhs, const double* a, lapack_int lda, | |||||
| const lapack_int* ipiv, double* b, lapack_int ldb ); | const lapack_int* ipiv, double* b, lapack_int ldb ); | ||||
| lapack_int LAPACKE_dsytrs2_work( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_dsytrs2_work( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, double* a, | |||||
| lapack_int nrhs, const double* a, | |||||
| lapack_int lda, const lapack_int* ipiv, | lapack_int lda, const lapack_int* ipiv, | ||||
| double* b, lapack_int ldb, double* work ); | double* b, lapack_int ldb, double* work ); | ||||
| lapack_int LAPACKE_sbbcsd( int matrix_layout, char jobu1, char jobu2, | lapack_int LAPACKE_sbbcsd( int matrix_layout, char jobu1, char jobu2, | ||||
| @@ -10813,10 +10813,10 @@ lapack_int LAPACKE_ssytri2x_work( int matrix_layout, char uplo, lapack_int n, | |||||
| const lapack_int* ipiv, float* work, | const lapack_int* ipiv, float* work, | ||||
| lapack_int nb ); | lapack_int nb ); | ||||
| lapack_int LAPACKE_ssytrs2( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_ssytrs2( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, float* a, lapack_int lda, | |||||
| lapack_int nrhs, const float* a, lapack_int lda, | |||||
| const lapack_int* ipiv, float* b, lapack_int ldb ); | const lapack_int* ipiv, float* b, lapack_int ldb ); | ||||
| lapack_int LAPACKE_ssytrs2_work( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_ssytrs2_work( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, float* a, | |||||
| lapack_int nrhs, const float* a, | |||||
| lapack_int lda, const lapack_int* ipiv, | lapack_int lda, const lapack_int* ipiv, | ||||
| float* b, lapack_int ldb, float* work ); | float* b, lapack_int ldb, float* work ); | ||||
| lapack_int LAPACKE_zbbcsd( int matrix_layout, char jobu1, char jobu2, | lapack_int LAPACKE_zbbcsd( int matrix_layout, char jobu1, char jobu2, | ||||
| @@ -10898,11 +10898,11 @@ lapack_int LAPACKE_zsytri2x_work( int matrix_layout, char uplo, lapack_int n, | |||||
| const lapack_int* ipiv, | const lapack_int* ipiv, | ||||
| lapack_complex_double* work, lapack_int nb ); | lapack_complex_double* work, lapack_int nb ); | ||||
| lapack_int LAPACKE_zsytrs2( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_zsytrs2( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, lapack_complex_double* a, | |||||
| lapack_int nrhs, const lapack_complex_double* a, | |||||
| lapack_int lda, const lapack_int* ipiv, | lapack_int lda, const lapack_int* ipiv, | ||||
| lapack_complex_double* b, lapack_int ldb ); | lapack_complex_double* b, lapack_int ldb ); | ||||
| lapack_int LAPACKE_zsytrs2_work( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_zsytrs2_work( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, lapack_complex_double* a, | |||||
| lapack_int nrhs, const lapack_complex_double* a, | |||||
| lapack_int lda, const lapack_int* ipiv, | lapack_int lda, const lapack_int* ipiv, | ||||
| lapack_complex_double* b, lapack_int ldb, | lapack_complex_double* b, lapack_int ldb, | ||||
| lapack_complex_double* work ); | lapack_complex_double* work ); | ||||
| @@ -56,6 +56,8 @@ lapack_int LAPACKE_cgesvd_work( int matrix_layout, char jobu, char jobvt, | |||||
| ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1); | ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1); | ||||
| lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n : | lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n : | ||||
| ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1); | ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1); | ||||
| lapack_int ncols_vt = ( LAPACKE_lsame( jobvt, 'a' ) || | |||||
| LAPACKE_lsame( jobvt, 's' ) ) ? n : 1; | |||||
| lapack_int lda_t = MAX(1,m); | lapack_int lda_t = MAX(1,m); | ||||
| lapack_int ldu_t = MAX(1,nrows_u); | lapack_int ldu_t = MAX(1,nrows_u); | ||||
| lapack_int ldvt_t = MAX(1,nrows_vt); | lapack_int ldvt_t = MAX(1,nrows_vt); | ||||
| @@ -73,7 +75,7 @@ lapack_int LAPACKE_cgesvd_work( int matrix_layout, char jobu, char jobvt, | |||||
| LAPACKE_xerbla( "LAPACKE_cgesvd_work", info ); | LAPACKE_xerbla( "LAPACKE_cgesvd_work", info ); | ||||
| return info; | return info; | ||||
| } | } | ||||
| if( ldvt < n ) { | |||||
| if( ldvt < ncols_vt ) { | |||||
| info = -12; | info = -12; | ||||
| LAPACKE_xerbla( "LAPACKE_cgesvd_work", info ); | LAPACKE_xerbla( "LAPACKE_cgesvd_work", info ); | ||||
| return info; | return info; | ||||
| @@ -78,7 +78,7 @@ lapack_int LAPACKE_cheev_work( int matrix_layout, char jobz, char uplo, | |||||
| info = info - 1; | info = info - 1; | ||||
| } | } | ||||
| /* Transpose output matrices */ | /* Transpose output matrices */ | ||||
| if ( jobz == 'V') { | |||||
| if ( jobz == 'V' || jobz == 'v' ) { | |||||
| LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | ||||
| } else { | } else { | ||||
| LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | ||||
| @@ -79,7 +79,7 @@ lapack_int LAPACKE_cheevd_2stage_work( int matrix_layout, char jobz, char uplo, | |||||
| info = info - 1; | info = info - 1; | ||||
| } | } | ||||
| /* Transpose output matrices */ | /* Transpose output matrices */ | ||||
| if ( jobz == 'V') { | |||||
| if ( jobz == 'V' || jobz == 'v' ) { | |||||
| LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | ||||
| } else { | } else { | ||||
| LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | ||||
| @@ -79,7 +79,7 @@ lapack_int LAPACKE_cheevd_work( int matrix_layout, char jobz, char uplo, | |||||
| info = info - 1; | info = info - 1; | ||||
| } | } | ||||
| /* Transpose output matrices */ | /* Transpose output matrices */ | ||||
| if ( jobz == 'V') { | |||||
| if ( jobz == 'V' || jobz == 'v' ) { | |||||
| LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | ||||
| } else { | } else { | ||||
| LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | ||||
| @@ -35,7 +35,7 @@ | |||||
| lapack_int LAPACKE_chegst( int matrix_layout, lapack_int itype, char uplo, | lapack_int LAPACKE_chegst( int matrix_layout, lapack_int itype, char uplo, | ||||
| lapack_int n, lapack_complex_float* a, | lapack_int n, lapack_complex_float* a, | ||||
| lapack_int lda, lapack_complex_float* b, | |||||
| lapack_int lda, const lapack_complex_float* b, | |||||
| lapack_int ldb ) | lapack_int ldb ) | ||||
| { | { | ||||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | ||||
| @@ -35,7 +35,7 @@ | |||||
| lapack_int LAPACKE_chegst_work( int matrix_layout, lapack_int itype, char uplo, | lapack_int LAPACKE_chegst_work( int matrix_layout, lapack_int itype, char uplo, | ||||
| lapack_int n, lapack_complex_float* a, | lapack_int n, lapack_complex_float* a, | ||||
| lapack_int lda, lapack_complex_float* b, | |||||
| lapack_int lda, const lapack_complex_float* b, | |||||
| lapack_int ldb ) | lapack_int ldb ) | ||||
| { | { | ||||
| lapack_int info = 0; | lapack_int info = 0; | ||||
| @@ -50,10 +50,10 @@ lapack_int LAPACKE_chegv( int matrix_layout, lapack_int itype, char jobz, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -6; | return -6; | ||||
| } | } | ||||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_che_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -8; | return -8; | ||||
| } | } | ||||
| } | } | ||||
| @@ -50,10 +50,10 @@ lapack_int LAPACKE_chegv_2stage( int matrix_layout, lapack_int itype, char jobz, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -6; | return -6; | ||||
| } | } | ||||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_che_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -8; | return -8; | ||||
| } | } | ||||
| } | } | ||||
| @@ -55,10 +55,10 @@ lapack_int LAPACKE_chegvd( int matrix_layout, lapack_int itype, char jobz, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -6; | return -6; | ||||
| } | } | ||||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_che_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -8; | return -8; | ||||
| } | } | ||||
| } | } | ||||
| @@ -60,7 +60,7 @@ lapack_int LAPACKE_chegvx( int matrix_layout, lapack_int itype, char jobz, | |||||
| if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) { | if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) { | ||||
| return -15; | return -15; | ||||
| } | } | ||||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_che_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -9; | return -9; | ||||
| } | } | ||||
| if( LAPACKE_lsame( range, 'v' ) ) { | if( LAPACKE_lsame( range, 'v' ) ) { | ||||
| @@ -46,7 +46,7 @@ lapack_int LAPACKE_chetri2x( int matrix_layout, char uplo, lapack_int n, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -4; | return -4; | ||||
| } | } | ||||
| } | } | ||||
| @@ -42,9 +42,6 @@ lapack_int LAPACKE_clacpy_work( int matrix_layout, char uplo, lapack_int m, | |||||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | if( matrix_layout == LAPACK_COL_MAJOR ) { | ||||
| /* Call LAPACK function and adjust info */ | /* Call LAPACK function and adjust info */ | ||||
| LAPACK_clacpy( &uplo, &m, &n, a, &lda, b, &ldb ); | LAPACK_clacpy( &uplo, &m, &n, a, &lda, b, &ldb ); | ||||
| if( info < 0 ) { | |||||
| info = info - 1; | |||||
| } | |||||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | ||||
| lapack_int lda_t = MAX(1,m); | lapack_int lda_t = MAX(1,m); | ||||
| lapack_int ldb_t = MAX(1,m); | lapack_int ldb_t = MAX(1,m); | ||||
| @@ -42,9 +42,6 @@ lapack_int LAPACKE_claset_work( int matrix_layout, char uplo, lapack_int m, | |||||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | if( matrix_layout == LAPACK_COL_MAJOR ) { | ||||
| /* Call LAPACK function and adjust info */ | /* Call LAPACK function and adjust info */ | ||||
| LAPACK_claset( &uplo, &m, &n, &alpha, &beta, a, &lda ); | LAPACK_claset( &uplo, &m, &n, &alpha, &beta, a, &lda ); | ||||
| if( info < 0 ) { | |||||
| info = info - 1; | |||||
| } | |||||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | ||||
| lapack_int lda_t = MAX(1,m); | lapack_int lda_t = MAX(1,m); | ||||
| lapack_complex_float* a_t = NULL; | lapack_complex_float* a_t = NULL; | ||||
| @@ -45,7 +45,7 @@ lapack_int LAPACKE_csyconv( int matrix_layout, char uplo, char way, lapack_int n | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -5; | return -5; | ||||
| } | } | ||||
| } | } | ||||
| @@ -34,7 +34,7 @@ | |||||
| #include "lapacke_utils.h" | #include "lapacke_utils.h" | ||||
| lapack_int LAPACKE_csytrs2( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_csytrs2( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, lapack_complex_float* a, | |||||
| lapack_int nrhs, const lapack_complex_float* a, | |||||
| lapack_int lda, const lapack_int* ipiv, | lapack_int lda, const lapack_int* ipiv, | ||||
| lapack_complex_float* b, lapack_int ldb ) | lapack_complex_float* b, lapack_int ldb ) | ||||
| { | { | ||||
| @@ -34,7 +34,7 @@ | |||||
| #include "lapacke_utils.h" | #include "lapacke_utils.h" | ||||
| lapack_int LAPACKE_csytrs2_work( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_csytrs2_work( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, lapack_complex_float* a, | |||||
| lapack_int nrhs, const lapack_complex_float* a, | |||||
| lapack_int lda, const lapack_int* ipiv, | lapack_int lda, const lapack_int* ipiv, | ||||
| lapack_complex_float* b, lapack_int ldb, | lapack_complex_float* b, lapack_int ldb, | ||||
| lapack_complex_float* work ) | lapack_complex_float* work ) | ||||
| @@ -44,7 +44,7 @@ lapack_int LAPACKE_ctrttf( int matrix_layout, char transr, char uplo, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_ctr_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) { | |||||
| return -5; | return -5; | ||||
| } | } | ||||
| } | } | ||||
| @@ -44,7 +44,7 @@ lapack_int LAPACKE_ctrttp( int matrix_layout, char uplo, lapack_int n, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_ctr_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) { | |||||
| return -4; | return -4; | ||||
| } | } | ||||
| } | } | ||||
| @@ -48,7 +48,7 @@ lapack_int LAPACKE_cungtr( int matrix_layout, char uplo, lapack_int n, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -4; | return -4; | ||||
| } | } | ||||
| if( LAPACKE_c_nancheck( n-1, tau, 1 ) ) { | if( LAPACKE_c_nancheck( n-1, tau, 1 ) ) { | ||||
| @@ -52,7 +52,7 @@ lapack_int LAPACKE_cunmtr( int matrix_layout, char side, char uplo, char trans, | |||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| r = LAPACKE_lsame( side, 'l' ) ? m : n; | r = LAPACKE_lsame( side, 'l' ) ? m : n; | ||||
| if( LAPACKE_cge_nancheck( matrix_layout, r, r, a, lda ) ) { | |||||
| if( LAPACKE_che_nancheck( matrix_layout, uplo, r, a, lda ) ) { | |||||
| return -7; | return -7; | ||||
| } | } | ||||
| if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) { | if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) { | ||||
| @@ -54,6 +54,8 @@ lapack_int LAPACKE_dgesvd_work( int matrix_layout, char jobu, char jobvt, | |||||
| ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1); | ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1); | ||||
| lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n : | lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n : | ||||
| ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1); | ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1); | ||||
| lapack_int ncols_vt = ( LAPACKE_lsame( jobvt, 'a' ) || | |||||
| LAPACKE_lsame( jobvt, 's' ) ) ? n : 1; | |||||
| lapack_int lda_t = MAX(1,m); | lapack_int lda_t = MAX(1,m); | ||||
| lapack_int ldu_t = MAX(1,nrows_u); | lapack_int ldu_t = MAX(1,nrows_u); | ||||
| lapack_int ldvt_t = MAX(1,nrows_vt); | lapack_int ldvt_t = MAX(1,nrows_vt); | ||||
| @@ -71,7 +73,7 @@ lapack_int LAPACKE_dgesvd_work( int matrix_layout, char jobu, char jobvt, | |||||
| LAPACKE_xerbla( "LAPACKE_dgesvd_work", info ); | LAPACKE_xerbla( "LAPACKE_dgesvd_work", info ); | ||||
| return info; | return info; | ||||
| } | } | ||||
| if( ldvt < n ) { | |||||
| if( ldvt < ncols_vt ) { | |||||
| info = -12; | info = -12; | ||||
| LAPACKE_xerbla( "LAPACKE_dgesvd_work", info ); | LAPACKE_xerbla( "LAPACKE_dgesvd_work", info ); | ||||
| return info; | return info; | ||||
| @@ -41,9 +41,6 @@ lapack_int LAPACKE_dlacpy_work( int matrix_layout, char uplo, lapack_int m, | |||||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | if( matrix_layout == LAPACK_COL_MAJOR ) { | ||||
| /* Call LAPACK function and adjust info */ | /* Call LAPACK function and adjust info */ | ||||
| LAPACK_dlacpy( &uplo, &m, &n, a, &lda, b, &ldb ); | LAPACK_dlacpy( &uplo, &m, &n, a, &lda, b, &ldb ); | ||||
| if( info < 0 ) { | |||||
| info = info - 1; | |||||
| } | |||||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | ||||
| lapack_int lda_t = MAX(1,m); | lapack_int lda_t = MAX(1,m); | ||||
| lapack_int ldb_t = MAX(1,m); | lapack_int ldb_t = MAX(1,m); | ||||
| @@ -41,9 +41,6 @@ lapack_int LAPACKE_dlaset_work( int matrix_layout, char uplo, lapack_int m, | |||||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | if( matrix_layout == LAPACK_COL_MAJOR ) { | ||||
| /* Call LAPACK function and adjust info */ | /* Call LAPACK function and adjust info */ | ||||
| LAPACK_dlaset( &uplo, &m, &n, &alpha, &beta, a, &lda ); | LAPACK_dlaset( &uplo, &m, &n, &alpha, &beta, a, &lda ); | ||||
| if( info < 0 ) { | |||||
| info = info - 1; | |||||
| } | |||||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | ||||
| lapack_int lda_t = MAX(1,m); | lapack_int lda_t = MAX(1,m); | ||||
| double* a_t = NULL; | double* a_t = NULL; | ||||
| @@ -47,7 +47,7 @@ lapack_int LAPACKE_dorgtr( int matrix_layout, char uplo, lapack_int n, double* a | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -4; | return -4; | ||||
| } | } | ||||
| if( LAPACKE_d_nancheck( n-1, tau, 1 ) ) { | if( LAPACKE_d_nancheck( n-1, tau, 1 ) ) { | ||||
| @@ -51,7 +51,7 @@ lapack_int LAPACKE_dormtr( int matrix_layout, char side, char uplo, char trans, | |||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| r = LAPACKE_lsame( side, 'l' ) ? m : n; | r = LAPACKE_lsame( side, 'l' ) ? m : n; | ||||
| if( LAPACKE_dge_nancheck( matrix_layout, r, r, a, lda ) ) { | |||||
| if( LAPACKE_dsy_nancheck( matrix_layout, uplo, r, a, lda ) ) { | |||||
| return -7; | return -7; | ||||
| } | } | ||||
| if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) { | if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) { | ||||
| @@ -43,7 +43,7 @@ lapack_int LAPACKE_dsyconv( int matrix_layout, char uplo, char way, lapack_int n | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -5; | return -5; | ||||
| } | } | ||||
| } | } | ||||
| @@ -72,7 +72,7 @@ lapack_int LAPACKE_dsyev_work( int matrix_layout, char jobz, char uplo, | |||||
| info = info - 1; | info = info - 1; | ||||
| } | } | ||||
| /* Transpose output matrices */ | /* Transpose output matrices */ | ||||
| if ( jobz == 'V') { | |||||
| if ( jobz == 'V' || jobz == 'v' ) { | |||||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | ||||
| } else { | } else { | ||||
| LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | ||||
| @@ -76,7 +76,7 @@ lapack_int LAPACKE_dsyevd_2stage_work( int matrix_layout, char jobz, char uplo, | |||||
| info = info - 1; | info = info - 1; | ||||
| } | } | ||||
| /* Transpose output matrices */ | /* Transpose output matrices */ | ||||
| if ( jobz == 'V') { | |||||
| if ( jobz == 'V' || jobz == 'v' ) { | |||||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | ||||
| } else { | } else { | ||||
| LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | ||||
| @@ -76,7 +76,7 @@ lapack_int LAPACKE_dsyevd_work( int matrix_layout, char jobz, char uplo, | |||||
| info = info - 1; | info = info - 1; | ||||
| } | } | ||||
| /* Transpose output matrices */ | /* Transpose output matrices */ | ||||
| if ( jobz == 'V') { | |||||
| if ( jobz == 'V' || jobz == 'v' ) { | |||||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | ||||
| } else { | } else { | ||||
| LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | ||||
| @@ -47,7 +47,7 @@ lapack_int LAPACKE_dsygst( int matrix_layout, lapack_int itype, char uplo, | |||||
| if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | ||||
| return -5; | return -5; | ||||
| } | } | ||||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -7; | return -7; | ||||
| } | } | ||||
| } | } | ||||
| @@ -48,10 +48,10 @@ lapack_int LAPACKE_dsygv( int matrix_layout, lapack_int itype, char jobz, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -6; | return -6; | ||||
| } | } | ||||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -8; | return -8; | ||||
| } | } | ||||
| } | } | ||||
| @@ -48,10 +48,10 @@ lapack_int LAPACKE_dsygv_2stage( int matrix_layout, lapack_int itype, char jobz, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -6; | return -6; | ||||
| } | } | ||||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -8; | return -8; | ||||
| } | } | ||||
| } | } | ||||
| @@ -51,10 +51,10 @@ lapack_int LAPACKE_dsygvd( int matrix_layout, lapack_int itype, char jobz, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -6; | return -6; | ||||
| } | } | ||||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -8; | return -8; | ||||
| } | } | ||||
| } | } | ||||
| @@ -58,7 +58,7 @@ lapack_int LAPACKE_dsygvx( int matrix_layout, lapack_int itype, char jobz, | |||||
| if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) { | if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) { | ||||
| return -15; | return -15; | ||||
| } | } | ||||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -9; | return -9; | ||||
| } | } | ||||
| if( LAPACKE_lsame( range, 'v' ) ) { | if( LAPACKE_lsame( range, 'v' ) ) { | ||||
| @@ -34,7 +34,7 @@ | |||||
| #include "lapacke_utils.h" | #include "lapacke_utils.h" | ||||
| lapack_int LAPACKE_dsytrs2( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_dsytrs2( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, double* a, lapack_int lda, | |||||
| lapack_int nrhs, const double* a, lapack_int lda, | |||||
| const lapack_int* ipiv, double* b, lapack_int ldb ) | const lapack_int* ipiv, double* b, lapack_int ldb ) | ||||
| { | { | ||||
| lapack_int info = 0; | lapack_int info = 0; | ||||
| @@ -34,7 +34,7 @@ | |||||
| #include "lapacke_utils.h" | #include "lapacke_utils.h" | ||||
| lapack_int LAPACKE_dsytrs2_work( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_dsytrs2_work( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, double* a, | |||||
| lapack_int nrhs, const double* a, | |||||
| lapack_int lda, const lapack_int* ipiv, | lapack_int lda, const lapack_int* ipiv, | ||||
| double* b, lapack_int ldb, double* work ) | double* b, lapack_int ldb, double* work ) | ||||
| { | { | ||||
| @@ -44,7 +44,7 @@ lapack_int LAPACKE_dtrttf( int matrix_layout, char transr, char uplo, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_dtr_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) { | |||||
| return -5; | return -5; | ||||
| } | } | ||||
| } | } | ||||
| @@ -43,7 +43,7 @@ lapack_int LAPACKE_dtrttp( int matrix_layout, char uplo, lapack_int n, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_dtr_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) { | |||||
| return -4; | return -4; | ||||
| } | } | ||||
| } | } | ||||
| @@ -54,6 +54,8 @@ lapack_int LAPACKE_sgesvd_work( int matrix_layout, char jobu, char jobvt, | |||||
| ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1); | ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1); | ||||
| lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n : | lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n : | ||||
| ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1); | ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1); | ||||
| lapack_int ncols_vt = ( LAPACKE_lsame( jobvt, 'a' ) || | |||||
| LAPACKE_lsame( jobvt, 's' ) ) ? n : 1; | |||||
| lapack_int lda_t = MAX(1,m); | lapack_int lda_t = MAX(1,m); | ||||
| lapack_int ldu_t = MAX(1,nrows_u); | lapack_int ldu_t = MAX(1,nrows_u); | ||||
| lapack_int ldvt_t = MAX(1,nrows_vt); | lapack_int ldvt_t = MAX(1,nrows_vt); | ||||
| @@ -71,7 +73,7 @@ lapack_int LAPACKE_sgesvd_work( int matrix_layout, char jobu, char jobvt, | |||||
| LAPACKE_xerbla( "LAPACKE_sgesvd_work", info ); | LAPACKE_xerbla( "LAPACKE_sgesvd_work", info ); | ||||
| return info; | return info; | ||||
| } | } | ||||
| if( ldvt < n ) { | |||||
| if( ldvt < ncols_vt ) { | |||||
| info = -12; | info = -12; | ||||
| LAPACKE_xerbla( "LAPACKE_sgesvd_work", info ); | LAPACKE_xerbla( "LAPACKE_sgesvd_work", info ); | ||||
| return info; | return info; | ||||
| @@ -41,9 +41,6 @@ lapack_int LAPACKE_slacpy_work( int matrix_layout, char uplo, lapack_int m, | |||||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | if( matrix_layout == LAPACK_COL_MAJOR ) { | ||||
| /* Call LAPACK function and adjust info */ | /* Call LAPACK function and adjust info */ | ||||
| LAPACK_slacpy( &uplo, &m, &n, a, &lda, b, &ldb ); | LAPACK_slacpy( &uplo, &m, &n, a, &lda, b, &ldb ); | ||||
| if( info < 0 ) { | |||||
| info = info - 1; | |||||
| } | |||||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | ||||
| lapack_int lda_t = MAX(1,m); | lapack_int lda_t = MAX(1,m); | ||||
| lapack_int ldb_t = MAX(1,m); | lapack_int ldb_t = MAX(1,m); | ||||
| @@ -41,9 +41,6 @@ lapack_int LAPACKE_slaset_work( int matrix_layout, char uplo, lapack_int m, | |||||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | if( matrix_layout == LAPACK_COL_MAJOR ) { | ||||
| /* Call LAPACK function and adjust info */ | /* Call LAPACK function and adjust info */ | ||||
| LAPACK_slaset( &uplo, &m, &n, &alpha, &beta, a, &lda ); | LAPACK_slaset( &uplo, &m, &n, &alpha, &beta, a, &lda ); | ||||
| if( info < 0 ) { | |||||
| info = info - 1; | |||||
| } | |||||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | ||||
| lapack_int lda_t = MAX(1,m); | lapack_int lda_t = MAX(1,m); | ||||
| float* a_t = NULL; | float* a_t = NULL; | ||||
| @@ -47,7 +47,7 @@ lapack_int LAPACKE_sorgtr( int matrix_layout, char uplo, lapack_int n, float* a, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -4; | return -4; | ||||
| } | } | ||||
| if( LAPACKE_s_nancheck( n-1, tau, 1 ) ) { | if( LAPACKE_s_nancheck( n-1, tau, 1 ) ) { | ||||
| @@ -51,7 +51,7 @@ lapack_int LAPACKE_sormtr( int matrix_layout, char side, char uplo, char trans, | |||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| r = LAPACKE_lsame( side, 'l' ) ? m : n; | r = LAPACKE_lsame( side, 'l' ) ? m : n; | ||||
| if( LAPACKE_sge_nancheck( matrix_layout, r, r, a, lda ) ) { | |||||
| if( LAPACKE_ssy_nancheck( matrix_layout, uplo, r, a, lda ) ) { | |||||
| return -7; | return -7; | ||||
| } | } | ||||
| if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) { | if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) { | ||||
| @@ -43,7 +43,7 @@ lapack_int LAPACKE_ssyconv( int matrix_layout, char uplo, char way, lapack_int n | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -5; | return -5; | ||||
| } | } | ||||
| } | } | ||||
| @@ -72,7 +72,7 @@ lapack_int LAPACKE_ssyev_work( int matrix_layout, char jobz, char uplo, | |||||
| info = info - 1; | info = info - 1; | ||||
| } | } | ||||
| /* Transpose output matrices */ | /* Transpose output matrices */ | ||||
| if ( jobz == 'V') { | |||||
| if ( jobz == 'V' || jobz == 'v' ) { | |||||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | ||||
| } else { | } else { | ||||
| LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | ||||
| @@ -76,7 +76,7 @@ lapack_int LAPACKE_ssyevd_2stage_work( int matrix_layout, char jobz, char uplo, | |||||
| info = info - 1; | info = info - 1; | ||||
| } | } | ||||
| /* Transpose output matrices */ | /* Transpose output matrices */ | ||||
| if ( jobz == 'V') { | |||||
| if ( jobz == 'V' || jobz == 'v' ) { | |||||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | ||||
| } else { | } else { | ||||
| LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | ||||
| @@ -76,7 +76,7 @@ lapack_int LAPACKE_ssyevd_work( int matrix_layout, char jobz, char uplo, | |||||
| info = info - 1; | info = info - 1; | ||||
| } | } | ||||
| /* Transpose output matrices */ | /* Transpose output matrices */ | ||||
| if ( jobz == 'V') { | |||||
| if ( jobz == 'V' || jobz == 'v' ) { | |||||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | ||||
| } else { | } else { | ||||
| LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | ||||
| @@ -47,7 +47,7 @@ lapack_int LAPACKE_ssygst( int matrix_layout, lapack_int itype, char uplo, | |||||
| if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | ||||
| return -5; | return -5; | ||||
| } | } | ||||
| if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -7; | return -7; | ||||
| } | } | ||||
| } | } | ||||
| @@ -48,10 +48,10 @@ lapack_int LAPACKE_ssygv( int matrix_layout, lapack_int itype, char jobz, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -6; | return -6; | ||||
| } | } | ||||
| if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -8; | return -8; | ||||
| } | } | ||||
| } | } | ||||
| @@ -48,10 +48,10 @@ lapack_int LAPACKE_ssygv_2stage( int matrix_layout, lapack_int itype, char jobz, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -6; | return -6; | ||||
| } | } | ||||
| if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -8; | return -8; | ||||
| } | } | ||||
| } | } | ||||
| @@ -51,10 +51,10 @@ lapack_int LAPACKE_ssygvd( int matrix_layout, lapack_int itype, char jobz, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -6; | return -6; | ||||
| } | } | ||||
| if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -8; | return -8; | ||||
| } | } | ||||
| } | } | ||||
| @@ -58,7 +58,7 @@ lapack_int LAPACKE_ssygvx( int matrix_layout, lapack_int itype, char jobz, | |||||
| if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) { | if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) { | ||||
| return -15; | return -15; | ||||
| } | } | ||||
| if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -9; | return -9; | ||||
| } | } | ||||
| if( LAPACKE_lsame( range, 'v' ) ) { | if( LAPACKE_lsame( range, 'v' ) ) { | ||||
| @@ -34,7 +34,7 @@ | |||||
| #include "lapacke_utils.h" | #include "lapacke_utils.h" | ||||
| lapack_int LAPACKE_ssytrs2( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_ssytrs2( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, float* a, lapack_int lda, | |||||
| lapack_int nrhs, const float* a, lapack_int lda, | |||||
| const lapack_int* ipiv, float* b, lapack_int ldb ) | const lapack_int* ipiv, float* b, lapack_int ldb ) | ||||
| { | { | ||||
| lapack_int info = 0; | lapack_int info = 0; | ||||
| @@ -34,7 +34,7 @@ | |||||
| #include "lapacke_utils.h" | #include "lapacke_utils.h" | ||||
| lapack_int LAPACKE_ssytrs2_work( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_ssytrs2_work( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, float* a, | |||||
| lapack_int nrhs, const float* a, | |||||
| lapack_int lda, const lapack_int* ipiv, | lapack_int lda, const lapack_int* ipiv, | ||||
| float* b, lapack_int ldb, float* work ) | float* b, lapack_int ldb, float* work ) | ||||
| { | { | ||||
| @@ -44,7 +44,7 @@ lapack_int LAPACKE_strttf( int matrix_layout, char transr, char uplo, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_str_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) { | |||||
| return -5; | return -5; | ||||
| } | } | ||||
| } | } | ||||
| @@ -43,7 +43,7 @@ lapack_int LAPACKE_strttp( int matrix_layout, char uplo, lapack_int n, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_str_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) { | |||||
| return -4; | return -4; | ||||
| } | } | ||||
| } | } | ||||
| @@ -56,6 +56,8 @@ lapack_int LAPACKE_zgesvd_work( int matrix_layout, char jobu, char jobvt, | |||||
| ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1); | ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1); | ||||
| lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n : | lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n : | ||||
| ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1); | ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1); | ||||
| lapack_int ncols_vt = ( LAPACKE_lsame( jobvt, 'a' ) || | |||||
| LAPACKE_lsame( jobvt, 's' ) ) ? n : 1; | |||||
| lapack_int lda_t = MAX(1,m); | lapack_int lda_t = MAX(1,m); | ||||
| lapack_int ldu_t = MAX(1,nrows_u); | lapack_int ldu_t = MAX(1,nrows_u); | ||||
| lapack_int ldvt_t = MAX(1,nrows_vt); | lapack_int ldvt_t = MAX(1,nrows_vt); | ||||
| @@ -73,7 +75,7 @@ lapack_int LAPACKE_zgesvd_work( int matrix_layout, char jobu, char jobvt, | |||||
| LAPACKE_xerbla( "LAPACKE_zgesvd_work", info ); | LAPACKE_xerbla( "LAPACKE_zgesvd_work", info ); | ||||
| return info; | return info; | ||||
| } | } | ||||
| if( ldvt < n ) { | |||||
| if( ldvt < ncols_vt ) { | |||||
| info = -12; | info = -12; | ||||
| LAPACKE_xerbla( "LAPACKE_zgesvd_work", info ); | LAPACKE_xerbla( "LAPACKE_zgesvd_work", info ); | ||||
| return info; | return info; | ||||
| @@ -78,7 +78,7 @@ lapack_int LAPACKE_zheev_work( int matrix_layout, char jobz, char uplo, | |||||
| info = info - 1; | info = info - 1; | ||||
| } | } | ||||
| /* Transpose output matrices */ | /* Transpose output matrices */ | ||||
| if ( jobz == 'V') { | |||||
| if ( jobz == 'V' || jobz == 'v' ) { | |||||
| LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | ||||
| } else { | } else { | ||||
| LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | ||||
| @@ -79,7 +79,7 @@ lapack_int LAPACKE_zheevd_2stage_work( int matrix_layout, char jobz, char uplo, | |||||
| info = info - 1; | info = info - 1; | ||||
| } | } | ||||
| /* Transpose output matrices */ | /* Transpose output matrices */ | ||||
| if ( jobz == 'V') { | |||||
| if ( jobz == 'V' || jobz == 'v' ) { | |||||
| LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | ||||
| } else { | } else { | ||||
| LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | ||||
| @@ -79,7 +79,7 @@ lapack_int LAPACKE_zheevd_work( int matrix_layout, char jobz, char uplo, | |||||
| info = info - 1; | info = info - 1; | ||||
| } | } | ||||
| /* Transpose output matrices */ | /* Transpose output matrices */ | ||||
| if ( jobz == 'V') { | |||||
| if ( jobz == 'V' || jobz == 'v' ) { | |||||
| LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda ); | ||||
| } else { | } else { | ||||
| LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | ||||
| @@ -35,7 +35,7 @@ | |||||
| lapack_int LAPACKE_zhegst( int matrix_layout, lapack_int itype, char uplo, | lapack_int LAPACKE_zhegst( int matrix_layout, lapack_int itype, char uplo, | ||||
| lapack_int n, lapack_complex_double* a, | lapack_int n, lapack_complex_double* a, | ||||
| lapack_int lda, lapack_complex_double* b, | |||||
| lapack_int lda, const lapack_complex_double* b, | |||||
| lapack_int ldb ) | lapack_int ldb ) | ||||
| { | { | ||||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | ||||
| @@ -35,7 +35,7 @@ | |||||
| lapack_int LAPACKE_zhegst_work( int matrix_layout, lapack_int itype, char uplo, | lapack_int LAPACKE_zhegst_work( int matrix_layout, lapack_int itype, char uplo, | ||||
| lapack_int n, lapack_complex_double* a, | lapack_int n, lapack_complex_double* a, | ||||
| lapack_int lda, lapack_complex_double* b, | |||||
| lapack_int lda, const lapack_complex_double* b, | |||||
| lapack_int ldb ) | lapack_int ldb ) | ||||
| { | { | ||||
| lapack_int info = 0; | lapack_int info = 0; | ||||
| @@ -50,10 +50,10 @@ lapack_int LAPACKE_zhegv( int matrix_layout, lapack_int itype, char jobz, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -6; | return -6; | ||||
| } | } | ||||
| if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -8; | return -8; | ||||
| } | } | ||||
| } | } | ||||
| @@ -50,10 +50,10 @@ lapack_int LAPACKE_zhegv_2stage( int matrix_layout, lapack_int itype, char jobz, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -6; | return -6; | ||||
| } | } | ||||
| if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -8; | return -8; | ||||
| } | } | ||||
| } | } | ||||
| @@ -55,10 +55,10 @@ lapack_int LAPACKE_zhegvd( int matrix_layout, lapack_int itype, char jobz, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -6; | return -6; | ||||
| } | } | ||||
| if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -8; | return -8; | ||||
| } | } | ||||
| } | } | ||||
| @@ -61,7 +61,7 @@ lapack_int LAPACKE_zhegvx( int matrix_layout, lapack_int itype, char jobz, | |||||
| if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) { | if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) { | ||||
| return -15; | return -15; | ||||
| } | } | ||||
| if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) { | |||||
| if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, b, ldb ) ) { | |||||
| return -9; | return -9; | ||||
| } | } | ||||
| if( LAPACKE_lsame( range, 'v' ) ) { | if( LAPACKE_lsame( range, 'v' ) ) { | ||||
| @@ -46,7 +46,7 @@ lapack_int LAPACKE_zhetri2x( int matrix_layout, char uplo, lapack_int n, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -4; | return -4; | ||||
| } | } | ||||
| } | } | ||||
| @@ -42,9 +42,6 @@ lapack_int LAPACKE_zlacpy_work( int matrix_layout, char uplo, lapack_int m, | |||||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | if( matrix_layout == LAPACK_COL_MAJOR ) { | ||||
| /* Call LAPACK function and adjust info */ | /* Call LAPACK function and adjust info */ | ||||
| LAPACK_zlacpy( &uplo, &m, &n, a, &lda, b, &ldb ); | LAPACK_zlacpy( &uplo, &m, &n, a, &lda, b, &ldb ); | ||||
| if( info < 0 ) { | |||||
| info = info - 1; | |||||
| } | |||||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | ||||
| lapack_int lda_t = MAX(1,m); | lapack_int lda_t = MAX(1,m); | ||||
| lapack_int ldb_t = MAX(1,m); | lapack_int ldb_t = MAX(1,m); | ||||
| @@ -42,9 +42,6 @@ lapack_int LAPACKE_zlaset_work( int matrix_layout, char uplo, lapack_int m, | |||||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | if( matrix_layout == LAPACK_COL_MAJOR ) { | ||||
| /* Call LAPACK function and adjust info */ | /* Call LAPACK function and adjust info */ | ||||
| LAPACK_zlaset( &uplo, &m, &n, &alpha, &beta, a, &lda ); | LAPACK_zlaset( &uplo, &m, &n, &alpha, &beta, a, &lda ); | ||||
| if( info < 0 ) { | |||||
| info = info - 1; | |||||
| } | |||||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | ||||
| lapack_int lda_t = MAX(1,m); | lapack_int lda_t = MAX(1,m); | ||||
| lapack_complex_double* a_t = NULL; | lapack_complex_double* a_t = NULL; | ||||
| @@ -45,7 +45,7 @@ lapack_int LAPACKE_zsyconv( int matrix_layout, char uplo, char way, lapack_int n | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -5; | return -5; | ||||
| } | } | ||||
| } | } | ||||
| @@ -34,7 +34,7 @@ | |||||
| #include "lapacke_utils.h" | #include "lapacke_utils.h" | ||||
| lapack_int LAPACKE_zsytrs2( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_zsytrs2( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, lapack_complex_double* a, | |||||
| lapack_int nrhs, const lapack_complex_double* a, | |||||
| lapack_int lda, const lapack_int* ipiv, | lapack_int lda, const lapack_int* ipiv, | ||||
| lapack_complex_double* b, lapack_int ldb ) | lapack_complex_double* b, lapack_int ldb ) | ||||
| { | { | ||||
| @@ -35,7 +35,7 @@ | |||||
| lapack_int LAPACKE_zsytrs2_work( int matrix_layout, char uplo, lapack_int n, | lapack_int LAPACKE_zsytrs2_work( int matrix_layout, char uplo, lapack_int n, | ||||
| lapack_int nrhs, | lapack_int nrhs, | ||||
| lapack_complex_double* a, lapack_int lda, | |||||
| const lapack_complex_double* a, lapack_int lda, | |||||
| const lapack_int* ipiv, | const lapack_int* ipiv, | ||||
| lapack_complex_double* b, lapack_int ldb, | lapack_complex_double* b, lapack_int ldb, | ||||
| lapack_complex_double* work ) | lapack_complex_double* work ) | ||||
| @@ -44,7 +44,7 @@ lapack_int LAPACKE_ztrttf( int matrix_layout, char transr, char uplo, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_ztr_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) { | |||||
| return -5; | return -5; | ||||
| } | } | ||||
| } | } | ||||
| @@ -44,7 +44,7 @@ lapack_int LAPACKE_ztrttp( int matrix_layout, char uplo, lapack_int n, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_ztr_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) { | |||||
| return -4; | return -4; | ||||
| } | } | ||||
| } | } | ||||
| @@ -48,7 +48,7 @@ lapack_int LAPACKE_zungtr( int matrix_layout, char uplo, lapack_int n, | |||||
| #ifndef LAPACK_DISABLE_NAN_CHECK | #ifndef LAPACK_DISABLE_NAN_CHECK | ||||
| if( LAPACKE_get_nancheck() ) { | if( LAPACKE_get_nancheck() ) { | ||||
| /* Optionally check input matrices for NaNs */ | /* Optionally check input matrices for NaNs */ | ||||
| if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||||
| if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||||
| return -4; | return -4; | ||||
| } | } | ||||
| if( LAPACKE_z_nancheck( n-1, tau, 1 ) ) { | if( LAPACKE_z_nancheck( n-1, tau, 1 ) ) { | ||||