diff options
author | Julie <julie@cs.utk.edu> | 2016-11-11 01:02:56 -0600 |
---|---|---|
committer | Julie <julie@cs.utk.edu> | 2016-11-11 01:02:56 -0600 |
commit | 857e3680330b24d07629a66120937437e45d4938 (patch) | |
tree | aaae5bf03dd917cffc51a718697629477077a0fe /LAPACKE | |
parent | 4da53d9e73211a35a57bfd42cc827caf45188450 (diff) |
Name change for Aasen in LAPACKE plus adding TRS_AA
Diffstat (limited to 'LAPACKE')
-rw-r--r-- | LAPACKE/include/lapacke.h | 108 | ||||
-rw-r--r-- | LAPACKE/src/CMakeLists.txt | 40 | ||||
-rw-r--r-- | LAPACKE/src/Makefile | 40 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_chesv_aa.c (renamed from LAPACKE/src/lapacke_chesv_aasen.c) | 12 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_chesv_aa_work.c (renamed from LAPACKE/src/lapacke_chesv_aasen_work.c) | 18 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_chetrf_aa.c | 78 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_chetrf_aa_work.c | 89 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_chetrs_aa.c (renamed from LAPACKE/src/lapacke_chetrs_aasen.c) | 12 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_chetrs_aa_work.c (renamed from LAPACKE/src/lapacke_chetrs_aasen_work.c) | 16 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_dsysv_aa.c (renamed from LAPACKE/src/lapacke_dsysv_aasen.c) | 12 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_dsysv_aa_work.c (renamed from LAPACKE/src/lapacke_dsysv_aasen_work.c) | 18 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_dsytrf_aa.c | 76 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_dsytrf_aa_work.c | 87 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_dsytrs_aa.c (renamed from LAPACKE/src/lapacke_dsytrs_aasen.c) | 12 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_dsytrs_aa_work.c (renamed from LAPACKE/src/lapacke_dsytrs_aasen_work.c) | 16 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_ssysv_aa.c (renamed from LAPACKE/src/lapacke_ssysv_aasen.c) | 12 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_ssysv_aa_work.c (renamed from LAPACKE/src/lapacke_ssysv_aasen_work.c) | 18 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_ssytrf_aa.c | 76 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_ssytrf_aa_work.c | 87 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_ssytrs_aa.c (renamed from LAPACKE/src/lapacke_ssytrs_aasen.c) | 12 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_ssytrs_aa_work.c (renamed from LAPACKE/src/lapacke_ssytrs_aasen_work.c) | 16 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_zhesv_aa.c (renamed from LAPACKE/src/lapacke_zhesv_aasen.c) | 12 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_zhesv_aa_work.c (renamed from LAPACKE/src/lapacke_zhesv_aasen_work.c) | 18 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_zhetrf_aa.c | 78 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_zhetrf_aa_work.c | 89 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_zhetrs_aa.c (renamed from LAPACKE/src/lapacke_zhetrs_aasen.c) | 12 | ||||
-rw-r--r-- | LAPACKE/src/lapacke_zhetrs_aa_work.c (renamed from LAPACKE/src/lapacke_zhetrs_aasen_work.c) | 16 |
27 files changed, 900 insertions, 180 deletions
diff --git a/LAPACKE/include/lapacke.h b/LAPACKE/include/lapacke.h index 6caac79c..b191d380 100644 --- a/LAPACKE/include/lapacke.h +++ b/LAPACKE/include/lapacke.h @@ -11425,69 +11425,94 @@ void LAPACKE_ilaver( lapack_int* vers_major, lapack_int* vers_minor, lapack_int* vers_patch ); // LAPACK 3.7.0 -lapack_int LAPACKE_ssysv_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_ssysv_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, float* a, lapack_int lda, lapack_int* ipiv, float* b, lapack_int ldb ); -lapack_int LAPACKE_ssysv_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_ssysv_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, float* a, lapack_int lda, lapack_int* ipiv, float* b, lapack_int ldb, float* work, lapack_int lwork ); -lapack_int LAPACKE_dsysv_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_dsysv_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, double* a, lapack_int lda, lapack_int* ipiv, double* b, lapack_int ldb ); -lapack_int LAPACKE_dsysv_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_dsysv_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, double* a, lapack_int lda, lapack_int* ipiv, double* b, lapack_int ldb, double* work, lapack_int lwork ); -lapack_int LAPACKE_chesv_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_chesv_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, lapack_complex_float* a, lapack_int lda, lapack_int* ipiv, lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_chesv_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_chesv_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, lapack_complex_float* a, lapack_int lda, lapack_int* ipiv, lapack_complex_float* b, lapack_int ldb, lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_zhesv_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_zhesv_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, lapack_complex_double* a, lapack_int lda, lapack_int* ipiv, lapack_complex_double* b, lapack_int ldb ); -lapack_int LAPACKE_zhesv_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_zhesv_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, lapack_complex_double* a, lapack_int lda, lapack_int* ipiv, lapack_complex_double* b, lapack_int ldb, lapack_complex_double* work, lapack_int lwork ); +lapack_int LAPACKE_ssytrf_aa( int matrix_layout, char uplo, lapack_int n, float* a, + lapack_int lda, lapack_int* ipiv ); +lapack_int LAPACKE_dsytrf_aa( int matrix_layout, char uplo, lapack_int n, double* a, + lapack_int lda, lapack_int* ipiv ); +lapack_int LAPACKE_chetrf_aa( int matrix_layout, char uplo, lapack_int n, + lapack_complex_float* a, lapack_int lda, + lapack_int* ipiv ); +lapack_int LAPACKE_zhetrf_aa( int matrix_layout, char uplo, lapack_int n, + lapack_complex_double* a, lapack_int lda, + lapack_int* ipiv ); + +lapack_int LAPACKE_ssytrf_aa_work( int matrix_layout, char uplo, lapack_int n, + float* a, lapack_int lda, lapack_int* ipiv, + float* work, lapack_int lwork ); +lapack_int LAPACKE_dsytrf_aa_work( int matrix_layout, char uplo, lapack_int n, + double* a, lapack_int lda, lapack_int* ipiv, + double* work, lapack_int lwork ); +lapack_int LAPACKE_chetrf_aa_work( int matrix_layout, char uplo, lapack_int n, + lapack_complex_float* a, lapack_int lda, + lapack_int* ipiv, lapack_complex_float* work, + lapack_int lwork ); +lapack_int LAPACKE_zhetrf_aa_work( int matrix_layout, char uplo, lapack_int n, + lapack_complex_double* a, lapack_int lda, + lapack_int* ipiv, lapack_complex_double* work, + lapack_int lwork ); -lapack_int LAPACKE_chetrs_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_chetrs_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const lapack_complex_float* a, lapack_int lda, const lapack_int* ipiv, lapack_complex_float* b, lapack_int ldb ); -lapack_int LAPACKE_chetrs_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_chetrs_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const lapack_complex_float* a, lapack_int lda, const lapack_int* ipiv, lapack_complex_float* b, lapack_int ldb, lapack_complex_float* work, lapack_int lwork ); -lapack_int LAPACKE_dsytrs_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_dsytrs_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const double* a, lapack_int lda, const lapack_int* ipiv, double* b, lapack_int ldb ); -lapack_int LAPACKE_dsytrs_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_dsytrs_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const double* a, lapack_int lda, const lapack_int* ipiv, double* b, lapack_int ldb, double* work, lapack_int lwork ); -lapack_int LAPACKE_ssytrs_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_ssytrs_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const float* a, lapack_int lda, const lapack_int* ipiv, float* b, lapack_int ldb ); -lapack_int LAPACKE_ssytrs_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_ssytrs_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const float* a, lapack_int lda, const lapack_int* ipiv, float* b, lapack_int ldb, float* work, lapack_int lwork ); -lapack_int LAPACKE_zhetrs_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_zhetrs_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const lapack_complex_double* a, lapack_int lda, const lapack_int* ipiv, lapack_complex_double* b, lapack_int ldb ); -lapack_int LAPACKE_zhetrs_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_zhetrs_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const lapack_complex_double* a, lapack_int lda, const lapack_int* ipiv, lapack_complex_double* b, lapack_int ldb, @@ -12602,14 +12627,18 @@ lapack_int LAPACKE_zhetrs_aasen_work( int matrix_layout, char uplo, lapack_int n #define LAPACK_cggsvd3 LAPACK_GLOBAL(cggsvd3,CGGSVD3) #define LAPACK_zggsvd3 LAPACK_GLOBAL(zggsvd3,ZGGSVD3) // LAPACK 3.7.0 -#define LAPACK_ssysv_aasen LAPACK_GLOBAL(ssysv_aasen,SSYSV_AASEN) -#define LAPACK_dsysv_aasen LAPACK_GLOBAL(dsysv_aasen,DSYSV_AASEN) -#define LAPACK_chesv_aasen LAPACK_GLOBAL(chesv_aasen,CHESV_AASEN) -#define LAPACK_zhesv_aasen LAPACK_GLOBAL(zhesv_aasen,ZHESV_AASEN) -#define LAPACK_ssytrs_aasen LAPACK_GLOBAL(ssytrs_aasen,SSYTRS_AASEN) -#define LAPACK_dsytrs_aasen LAPACK_GLOBAL(dsytrs_aasen,DSYTRS_AASEN) -#define LAPACK_chetrs_aasen LAPACK_GLOBAL(chetrs_aasen,CHETRS_AASEN) -#define LAPACK_zhetrs_aasen LAPACK_GLOBAL(zhetrs_aasen,ZHETRS_AASEN) +#define LAPACK_ssysv_aa LAPACK_GLOBAL(ssysv_aa,SSYSV_AA) +#define LAPACK_dsysv_aa LAPACK_GLOBAL(dsysv_aa,DSYSV_AA) +#define LAPACK_chesv_aa LAPACK_GLOBAL(chesv_aa,CHESV_AA) +#define LAPACK_zhesv_aa LAPACK_GLOBAL(zhesv_aa,ZHESV_AA) +#define LAPACK_ssytrs_aa LAPACK_GLOBAL(ssytrs_aa,SSYTRS_AA) +#define LAPACK_dsytrs_aa LAPACK_GLOBAL(dsytrs_aa,DSYTRS_AA) +#define LAPACK_chetrs_aa LAPACK_GLOBAL(chetrs_aa,CHETRS_AA) +#define LAPACK_zhetrs_aa LAPACK_GLOBAL(zhetrs_aa,ZHETRS_AA) +#define LAPACK_ssytrf_aa LAPACK_GLOBAL(ssytrf_aa,SSYTRF_AA) +#define LAPACK_dsytrf_aa LAPACK_GLOBAL(dsytrf_aa,DSYTRF_AA) +#define LAPACK_chetrf_aa LAPACK_GLOBAL(chetrf_aa,CHETRF_AA) +#define LAPACK_zhetrf_aa LAPACK_GLOBAL(zhetrf_aa,ZHETRF_AA) @@ -17626,38 +17655,53 @@ void LAPACK_ilaver( const lapack_int* vers_major, const lapack_int* vers_minor, const lapack_int* vers_patch ); // LAPACK 3.7.0 -void LAPACK_ssysv_aasen( char* uplo, lapack_int* n, lapack_int* nrhs, float* a, +void LAPACK_ssysv_aa( char* uplo, lapack_int* n, lapack_int* nrhs, float* a, lapack_int* lda, lapack_int* ipiv, float* b, lapack_int* ldb, float* work, lapack_int* lwork, lapack_int *info ); -void LAPACK_dsysv_aasen( char* uplo, lapack_int* n, lapack_int* nrhs, double* a, +void LAPACK_dsysv_aa( char* uplo, lapack_int* n, lapack_int* nrhs, double* a, lapack_int* lda, lapack_int* ipiv, double* b, lapack_int* ldb, double* work, lapack_int* lwork, lapack_int *info ); -void LAPACK_chesv_aasen( char* uplo, lapack_int* n, lapack_int* nrhs, +void LAPACK_chesv_aa( char* uplo, lapack_int* n, lapack_int* nrhs, lapack_complex_float* a, lapack_int* lda, lapack_int* ipiv, lapack_complex_float* b, lapack_int* ldb, lapack_complex_float* work, lapack_int* lwork, lapack_int *info ); -void LAPACK_zhesv_aasen( char* uplo, lapack_int* n, lapack_int* nrhs, +void LAPACK_zhesv_aa( char* uplo, lapack_int* n, lapack_int* nrhs, lapack_complex_double* a, lapack_int* lda, lapack_int* ipiv, lapack_complex_double* b, lapack_int* ldb, lapack_complex_double* work, lapack_int* lwork, lapack_int *info ); -void LAPACK_ssytrs_aasen( char* uplo, lapack_int* n, +void LAPACK_ssytrf_aa( char* uplo, lapack_int* n, float* a, lapack_int* lda, + lapack_int* ipiv, float* work, lapack_int* lwork, + lapack_int *info ); +void LAPACK_dsytrf_aa( char* uplo, lapack_int* n, double* a, lapack_int* lda, + lapack_int* ipiv, double* work, lapack_int* lwork, + lapack_int *info ); +void LAPACK_chetrf_aa( char* uplo, lapack_int* n, lapack_complex_float* a, + lapack_int* lda, lapack_int* ipiv, + lapack_complex_float* work, lapack_int* lwork, + lapack_int *info ); +void LAPACK_zhetrf_aa( char* uplo, lapack_int* n, lapack_complex_double* a, + lapack_int* lda, lapack_int* ipiv, + lapack_complex_double* work, lapack_int* lwork, + lapack_int *info ); + +void LAPACK_ssytrs_aa( char* uplo, lapack_int* n, lapack_int* nrhs, const float* a, lapack_int* lda, const lapack_int* ipiv, float* b, lapack_int* ldb, float* work, lapack_int* lwork, lapack_int *info ); -void LAPACK_dsytrs_aasen( char* uplo, lapack_int* n, +void LAPACK_dsytrs_aa( char* uplo, lapack_int* n, lapack_int* nrhs, const double* a, lapack_int* lda, const lapack_int* ipiv, double* b, lapack_int* ldb, double* work, lapack_int* lwork, lapack_int *info ); -void LAPACK_chetrs_aasen( char* uplo, lapack_int* n, +void LAPACK_chetrs_aa( char* uplo, lapack_int* n, lapack_int* nrhs, const lapack_complex_float* a, lapack_int* lda, const lapack_int* ipiv, lapack_complex_float* b, lapack_int* ldb, lapack_complex_float* work , lapack_int* lwork, lapack_int *info ); -void LAPACK_zhetrs_aasen( char* uplo, lapack_int* n, +void LAPACK_zhetrs_aa( char* uplo, lapack_int* n, lapack_int* nrhs, const lapack_complex_double* a, lapack_int* lda, const lapack_int* ipiv, diff --git a/LAPACKE/src/CMakeLists.txt b/LAPACKE/src/CMakeLists.txt index 642bd55d..fe590a35 100644 --- a/LAPACKE/src/CMakeLists.txt +++ b/LAPACKE/src/CMakeLists.txt @@ -187,8 +187,8 @@ lapacke_cherfs.c lapacke_cherfs_work.c lapacke_chesv.c lapacke_chesv_work.c -lapacke_chesv_aasen.c -lapacke_chesv_aasen_work.c +lapacke_chesv_aa.c +lapacke_chesv_aa_work.c lapacke_chesvx.c lapacke_chesvx_work.c lapacke_cheswapr.c @@ -199,6 +199,8 @@ lapacke_chetrf.c lapacke_chetrf_rook.c lapacke_chetrf_work.c lapacke_chetrf_rook_work.c +lapacke_chetrf_aa.c +lapacke_chetrf_aa_work.c lapacke_chetri.c lapacke_chetri2.c lapacke_chetri2_work.c @@ -211,8 +213,8 @@ lapacke_chetrs2.c lapacke_chetrs2_work.c lapacke_chetrs_work.c lapacke_chetrs_rook_work.c -lapacke_chetrs_aasen.c -lapacke_chetrs_aasen_work.c +lapacke_chetrs_aa.c +lapacke_chetrs_aa_work.c lapacke_chfrk.c lapacke_chfrk_work.c lapacke_chgeqz.c @@ -951,8 +953,8 @@ lapacke_dsysv.c lapacke_dsysv_rook.c lapacke_dsysv_rook_work.c lapacke_dsysv_work.c -lapacke_dsysv_aasen.c -lapacke_dsysv_aasen_work.c +lapacke_dsysv_aa.c +lapacke_dsysv_aa_work.c lapacke_dsysvx.c lapacke_dsysvx_work.c lapacke_dsyswapr.c @@ -963,6 +965,8 @@ lapacke_dsytrf.c lapacke_dsytrf_work.c lapacke_dsytrf_rook.c lapacke_dsytrf_rook_work.c +lapacke_dsytrf_aa.c +lapacke_dsytrf_aa_work.c lapacke_dsytri.c lapacke_dsytri2.c lapacke_dsytri2_work.c @@ -973,8 +977,8 @@ lapacke_dsytrs.c lapacke_dsytrs_rook.c lapacke_dsytrs2.c lapacke_dsytrs2_work.c -lapacke_dsytrs_aasen.c -lapacke_dsytrs_aasen_work.c +lapacke_dsytrs_aa.c +lapacke_dsytrs_aa_work.c lapacke_dsytrs_work.c lapacke_dsytrs_rook_work.c lapacke_dtbcon.c @@ -1463,8 +1467,8 @@ lapacke_ssysv.c lapacke_ssysv_rook.c lapacke_ssysv_rook_work.c lapacke_ssysv_work.c -lapacke_ssysv_aasen.c -lapacke_ssysv_aasen_work.c +lapacke_ssysv_aa.c +lapacke_ssysv_aa_work.c lapacke_ssysvx.c lapacke_ssysvx_work.c lapacke_ssyswapr.c @@ -1475,6 +1479,8 @@ lapacke_ssytrf.c lapacke_ssytrf_work.c lapacke_ssytrf_rook.c lapacke_ssytrf_rook_work.c +lapacke_ssytrf_aa.c +lapacke_ssytrf_aa_work.c lapacke_ssytri.c lapacke_ssytri2.c lapacke_ssytri2_work.c @@ -1485,8 +1491,8 @@ lapacke_ssytrs.c lapacke_ssytrs_rook.c lapacke_ssytrs2.c lapacke_ssytrs2_work.c -lapacke_ssytrs_aasen.c -lapacke_ssytrs_aasen_work.c +lapacke_ssytrs_aa.c +lapacke_ssytrs_aa_work.c lapacke_ssytrs_work.c lapacke_ssytrs_rook_work.c lapacke_stbcon.c @@ -1749,8 +1755,8 @@ lapacke_zherfs.c lapacke_zherfs_work.c lapacke_zhesv.c lapacke_zhesv_work.c -lapacke_zhesv_aasen.c -lapacke_zhesv_aasen_work.c +lapacke_zhesv_aa.c +lapacke_zhesv_aa_work.c lapacke_zhesvx.c lapacke_zhesvx_work.c lapacke_zheswapr.c @@ -1761,6 +1767,8 @@ lapacke_zhetrf.c lapacke_zhetrf_rook.c lapacke_zhetrf_work.c lapacke_zhetrf_rook_work.c +lapacke_zhetrf_aa.c +lapacke_zhetrf_aa_work.c lapacke_zhetri.c lapacke_zhetri2.c lapacke_zhetri2_work.c @@ -1772,8 +1780,8 @@ lapacke_zhetrs_rook.c lapacke_zhetrs2.c lapacke_zhetrs2_work.c lapacke_zhetrs_work.c -lapacke_zhetrs_aasen.c -lapacke_zhetrs_aasen_work.c +lapacke_zhetrs_aa.c +lapacke_zhetrs_aa_work.c lapacke_zhetrs_rook_work.c lapacke_zhfrk.c lapacke_zhfrk_work.c diff --git a/LAPACKE/src/Makefile b/LAPACKE/src/Makefile index a27ae2de..e308b031 100644 --- a/LAPACKE/src/Makefile +++ b/LAPACKE/src/Makefile @@ -221,8 +221,8 @@ lapacke_cherfs.o \ lapacke_cherfs_work.o \ lapacke_chesv.o \ lapacke_chesv_work.o \ -lapacke_chesv_aasen.o \ -lapacke_chesv_aasen_work.o \ +lapacke_chesv_aa.o \ +lapacke_chesv_aa_work.o \ lapacke_chesvx.o \ lapacke_chesvx_work.o \ lapacke_cheswapr.o \ @@ -233,6 +233,8 @@ lapacke_chetrf.o \ lapacke_chetrf_rook.o \ lapacke_chetrf_work.o \ lapacke_chetrf_rook_work.o \ +lapacke_chetrf_aa.o \ +lapacke_chetrf_aa_work.o \ lapacke_chetri.o \ lapacke_chetri2.o \ lapacke_chetri2_work.o \ @@ -245,8 +247,8 @@ lapacke_chetrs2.o \ lapacke_chetrs2_work.o \ lapacke_chetrs_work.o \ lapacke_chetrs_rook_work.o \ -lapacke_chetrs_aasen.o \ -lapacke_chetrs_aasen_work.o \ +lapacke_chetrs_aa.o \ +lapacke_chetrs_aa_work.o \ lapacke_chfrk.o \ lapacke_chfrk_work.o \ lapacke_chgeqz.o \ @@ -985,8 +987,8 @@ lapacke_dsysv.o \ lapacke_dsysv_rook.o \ lapacke_dsysv_rook_work.o \ lapacke_dsysv_work.o \ -lapacke_dsysv_aasen.o \ -lapacke_dsysv_aasen_work.o \ +lapacke_dsysv_aa.o \ +lapacke_dsysv_aa_work.o \ lapacke_dsysvx.o \ lapacke_dsysvx_work.o \ lapacke_dsyswapr.o \ @@ -997,6 +999,8 @@ lapacke_dsytrf.o \ lapacke_dsytrf_work.o \ lapacke_dsytrf_rook.o \ lapacke_dsytrf_rook_work.o \ +lapacke_dsytrf_aa.o \ +lapacke_dsytrf_aa_work.o \ lapacke_dsytri.o \ lapacke_dsytri2.o \ lapacke_dsytri2_work.o \ @@ -1009,8 +1013,8 @@ lapacke_dsytrs2.o \ lapacke_dsytrs2_work.o \ lapacke_dsytrs_work.o \ lapacke_dsytrs_rook_work.o \ -lapacke_dsytrs_aasen.o \ -lapacke_dsytrs_aasen_work.o \ +lapacke_dsytrs_aa.o \ +lapacke_dsytrs_aa_work.o \ lapacke_dtbcon.o \ lapacke_dtbcon_work.o \ lapacke_dtbrfs.o \ @@ -1497,8 +1501,8 @@ lapacke_ssysv.o \ lapacke_ssysv_rook.o \ lapacke_ssysv_rook_work.o \ lapacke_ssysv_work.o \ -lapacke_ssysv_aasen.o \ -lapacke_ssysv_aasen_work.o \ +lapacke_ssysv_aa.o \ +lapacke_ssysv_aa_work.o \ lapacke_ssysvx.o \ lapacke_ssysvx_work.o \ lapacke_ssyswapr.o \ @@ -1509,6 +1513,8 @@ lapacke_ssytrf.o \ lapacke_ssytrf_work.o \ lapacke_ssytrf_rook.o \ lapacke_ssytrf_rook_work.o \ +lapacke_ssytrf_aa.o \ +lapacke_ssytrf_aa_work.o \ lapacke_ssytri.o \ lapacke_ssytri2.o \ lapacke_ssytri2_work.o \ @@ -1521,8 +1527,8 @@ lapacke_ssytrs2.o \ lapacke_ssytrs2_work.o \ lapacke_ssytrs_work.o \ lapacke_ssytrs_rook_work.o \ -lapacke_ssytrs_aasen.o \ -lapacke_ssytrs_aasen_work.o \ +lapacke_ssytrs_aa.o \ +lapacke_ssytrs_aa_work.o \ lapacke_stbcon.o \ lapacke_stbcon_work.o \ lapacke_stbrfs.o \ @@ -1783,8 +1789,8 @@ lapacke_zherfs.o \ lapacke_zherfs_work.o \ lapacke_zhesv.o \ lapacke_zhesv_work.o \ -lapacke_zhesv_aasen.o \ -lapacke_zhesv_aasen_work.o \ +lapacke_zhesv_aa.o \ +lapacke_zhesv_aa_work.o \ lapacke_zhesvx.o \ lapacke_zhesvx_work.o \ lapacke_zheswapr.o \ @@ -1795,6 +1801,8 @@ lapacke_zhetrf.o \ lapacke_zhetrf_rook.o \ lapacke_zhetrf_work.o \ lapacke_zhetrf_rook_work.o \ +lapacke_zhetrf_aa.o \ +lapacke_zhetrf_aa_work.o \ lapacke_zhetri.o \ lapacke_zhetri2.o \ lapacke_zhetri2_work.o \ @@ -1807,8 +1815,8 @@ lapacke_zhetrs2.o \ lapacke_zhetrs2_work.o \ lapacke_zhetrs_work.o \ lapacke_zhetrs_rook_work.o \ -lapacke_zhetrs_aasen.o \ -lapacke_zhetrs_aasen_work.o \ +lapacke_zhetrs_aa.o \ +lapacke_zhetrs_aa_work.o \ lapacke_zhfrk.o \ lapacke_zhfrk_work.o \ lapacke_zhgeqz.o \ diff --git a/LAPACKE/src/lapacke_chesv_aasen.c b/LAPACKE/src/lapacke_chesv_aa.c index 5accff8f..d5a39c63 100644 --- a/LAPACKE/src/lapacke_chesv_aasen.c +++ b/LAPACKE/src/lapacke_chesv_aa.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native high-level C interface to LAPACK function chesv_aasen +* Contents: Native high-level C interface to LAPACK function chesv_aa * Author: Intel Corporation * Generated November 2016 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_chesv_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_chesv_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, lapack_complex_float* a, lapack_int lda, lapack_int* ipiv, lapack_complex_float* b, lapack_int ldb ) @@ -43,7 +43,7 @@ lapack_int LAPACKE_chesv_aasen( int matrix_layout, char uplo, lapack_int n, lapack_complex_float* work = NULL; lapack_complex_float work_query; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { - LAPACKE_xerbla( "LAPACKE_chesv_aasen", -1 ); + LAPACKE_xerbla( "LAPACKE_chesv_aa", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK @@ -56,7 +56,7 @@ lapack_int LAPACKE_chesv_aasen( int matrix_layout, char uplo, lapack_int n, } #endif /* Query optimal working array(s) size */ - info = LAPACKE_chesv_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_chesv_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, &work_query, lwork ); if( info != 0 ) { goto exit_level_0; @@ -70,13 +70,13 @@ lapack_int LAPACKE_chesv_aasen( int matrix_layout, char uplo, lapack_int n, goto exit_level_0; } /* Call middle-level interface */ - info = LAPACKE_chesv_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_chesv_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork ); /* Release memory and exit */ LAPACKE_free( work ); exit_level_0: if( info == LAPACK_WORK_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_chesv_aasen", info ); + LAPACKE_xerbla( "LAPACKE_chesv_aa", info ); } return info; } diff --git a/LAPACKE/src/lapacke_chesv_aasen_work.c b/LAPACKE/src/lapacke_chesv_aa_work.c index f4a5b055..52df0867 100644 --- a/LAPACKE/src/lapacke_chesv_aasen_work.c +++ b/LAPACKE/src/lapacke_chesv_aa_work.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native middle-level C interface to LAPACK function chesv_aasen +* Contents: Native middle-level C interface to LAPACK function chesv_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_chesv_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_chesv_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, lapack_complex_float* a, lapack_int lda, lapack_int* ipiv, lapack_complex_float* b, lapack_int ldb, @@ -42,7 +42,7 @@ lapack_int LAPACKE_chesv_aasen_work( int matrix_layout, char uplo, lapack_int n, lapack_int info = 0; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ - LAPACK_chesv_aasen( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, + LAPACK_chesv_aa( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info ); if( info < 0 ) { info = info - 1; @@ -55,17 +55,17 @@ lapack_int LAPACKE_chesv_aasen_work( int matrix_layout, char uplo, lapack_int n, /* Check leading dimension(s) */ if( lda < n ) { info = -6; - LAPACKE_xerbla( "LAPACKE_chesv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_chesv_aa_work", info ); return info; } if( ldb < nrhs ) { info = -9; - LAPACKE_xerbla( "LAPACKE_chesv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_chesv_aa_work", info ); return info; } /* Query optimal working array(s) size if requested */ if( lwork == -1 ) { - LAPACK_chesv_aasen( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, work, + LAPACK_chesv_aa( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, work, &lwork, &info ); return (info < 0) ? (info - 1) : info; } @@ -87,7 +87,7 @@ lapack_int LAPACKE_chesv_aasen_work( int matrix_layout, char uplo, lapack_int n, LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t ); /* Call LAPACK function and adjust info */ - LAPACK_chesv_aasen( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, + LAPACK_chesv_aa( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, &lwork, &info ); if( info < 0 ) { info = info - 1; @@ -101,11 +101,11 @@ exit_level_1: LAPACKE_free( a_t ); exit_level_0: if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_chesv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_chesv_aa_work", info ); } } else { info = -1; - LAPACKE_xerbla( "LAPACKE_chesv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_chesv_aa_work", info ); } return info; } diff --git a/LAPACKE/src/lapacke_chetrf_aa.c b/LAPACKE/src/lapacke_chetrf_aa.c new file mode 100644 index 00000000..5c5d1c25 --- /dev/null +++ b/LAPACKE/src/lapacke_chetrf_aa.c @@ -0,0 +1,78 @@ +/***************************************************************************** + Copyright (c) 2014, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native high-level C interface to LAPACK function chetrf +* Author: Intel Corporation +* Generated November 2015 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_chetrf( int matrix_layout, char uplo, lapack_int n, + lapack_complex_float* a, lapack_int lda, + lapack_int* ipiv ) +{ + lapack_int info = 0; + lapack_int lwork = -1; + lapack_complex_float* work = NULL; + lapack_complex_float work_query; + if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { + LAPACKE_xerbla( "LAPACKE_chetrf", -1 ); + return -1; + } +#ifndef LAPACK_DISABLE_NAN_CHECK + /* Optionally check input matrices for NaNs */ + if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) { + return -4; + } +#endif + /* Query optimal working array(s) size */ + info = LAPACKE_chetrf_aa_work( matrix_layout, uplo, n, a, lda, ipiv, + &work_query, lwork ); + if( info != 0 ) { + goto exit_level_0; + } + lwork = LAPACK_C2INT( work_query ); + /* Allocate memory for work arrays */ + work = (lapack_complex_float*) + LAPACKE_malloc( sizeof(lapack_complex_float) * lwork ); + if( work == NULL ) { + info = LAPACK_WORK_MEMORY_ERROR; + goto exit_level_0; + } + /* Call middle-level interface */ + info = LAPACKE_chetrf_aa_work( matrix_layout, uplo, n, a, lda, ipiv, work, + lwork ); + /* Release memory and exit */ + LAPACKE_free( work ); +exit_level_0: + if( info == LAPACK_WORK_MEMORY_ERROR ) { + LAPACKE_xerbla( "LAPACKE_chetrf", info ); + } + return info; +} diff --git a/LAPACKE/src/lapacke_chetrf_aa_work.c b/LAPACKE/src/lapacke_chetrf_aa_work.c new file mode 100644 index 00000000..6740924b --- /dev/null +++ b/LAPACKE/src/lapacke_chetrf_aa_work.c @@ -0,0 +1,89 @@ +/***************************************************************************** + Copyright (c) 2014, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native middle-level C interface to LAPACK function chetrf +* Author: Intel Corporation +* Generated November 2015 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_chetrf_aa_work( int matrix_layout, char uplo, lapack_int n, + lapack_complex_float* a, lapack_int lda, + lapack_int* ipiv, lapack_complex_float* work, + lapack_int lwork ) +{ + lapack_int info = 0; + if( matrix_layout == LAPACK_COL_MAJOR ) { + /* Call LAPACK function and adjust info */ + LAPACK_chetrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info ); + if( info < 0 ) { + info = info - 1; + } + } else if( matrix_layout == LAPACK_ROW_MAJOR ) { + lapack_int lda_t = MAX(1,n); + lapack_complex_float* a_t = NULL; + /* Check leading dimension(s) */ + if( lda < n ) { + info = -5; + LAPACKE_xerbla( "LAPACKE_chetrf_aa_work", info ); + return info; + } + /* Query optimal working array(s) size if requested */ + if( lwork == -1 ) { + LAPACK_chetrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info ); + return (info < 0) ? (info - 1) : info; + } + /* Allocate memory for temporary array(s) */ + a_t = (lapack_complex_float*) + LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) ); + if( a_t == NULL ) { + info = LAPACK_TRANSPOSE_MEMORY_ERROR; + goto exit_level_0; + } + /* Transpose input matrices */ + LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); + /* Call LAPACK function and adjust info */ + LAPACK_chetrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info ); + if( info < 0 ) { + info = info - 1; + } + /* Transpose output matrices */ + LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); + /* Release memory and exit */ + LAPACKE_free( a_t ); +exit_level_0: + if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { + LAPACKE_xerbla( "LAPACKE_chetrf_aa_work", info ); + } + } else { + info = -1; + LAPACKE_xerbla( "LAPACKE_chetrf_aa_work", info ); + } + return info; +} diff --git a/LAPACKE/src/lapacke_chetrs_aasen.c b/LAPACKE/src/lapacke_chetrs_aa.c index 424750d5..a3386a92 100644 --- a/LAPACKE/src/lapacke_chetrs_aasen.c +++ b/LAPACKE/src/lapacke_chetrs_aa.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native high-level C interface to LAPACK function chetrs_aasen +* Contents: Native high-level C interface to LAPACK function chetrs_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_chetrs_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_chetrs_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const lapack_complex_float* a, lapack_int lda, const lapack_int* ipiv, lapack_complex_float* b, lapack_int ldb ) @@ -43,7 +43,7 @@ lapack_int LAPACKE_chetrs_aasen( int matrix_layout, char uplo, lapack_int n, lapack_complex_float* work = NULL; lapack_complex_float work_query; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { - LAPACKE_xerbla( "LAPACKE_chetrs_aasen", -1 ); + LAPACKE_xerbla( "LAPACKE_chetrs_aa", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK @@ -56,7 +56,7 @@ lapack_int LAPACKE_chetrs_aasen( int matrix_layout, char uplo, lapack_int n, } #endif /* Query optimal working array(s) size */ - info = LAPACKE_chetrs_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_chetrs_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, &work_query, lwork ); if( info != 0 ) { goto exit_level_0; @@ -70,13 +70,13 @@ lapack_int LAPACKE_chetrs_aasen( int matrix_layout, char uplo, lapack_int n, goto exit_level_0; } /* Call middle-level interface */ - info = LAPACKE_chetrs_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_chetrs_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork ); /* Release memory and exit */ LAPACKE_free( work ); exit_level_0: if( info == LAPACK_WORK_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_chetrs_aasen", info ); + LAPACKE_xerbla( "LAPACKE_chetrs_aa", info ); } return info; } diff --git a/LAPACKE/src/lapacke_chetrs_aasen_work.c b/LAPACKE/src/lapacke_chetrs_aa_work.c index 4d14c2b7..1d5ceacf 100644 --- a/LAPACKE/src/lapacke_chetrs_aasen_work.c +++ b/LAPACKE/src/lapacke_chetrs_aa_work.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native middle-level C interface to LAPACK function chetrs_aasen +* Contents: Native middle-level C interface to LAPACK function chetrs_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_chetrs_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_chetrs_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const lapack_complex_float* a, lapack_int lda, const lapack_int* ipiv, lapack_complex_float* b, lapack_int ldb, @@ -42,7 +42,7 @@ lapack_int LAPACKE_chetrs_aasen_work( int matrix_layout, char uplo, lapack_int n lapack_int info = 0; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ - LAPACK_chetrs_aasen( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info ); + LAPACK_chetrs_aa( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info ); if( info < 0 ) { info = info - 1; } @@ -54,12 +54,12 @@ lapack_int LAPACKE_chetrs_aasen_work( int matrix_layout, char uplo, lapack_int n /* Check leading dimension(s) */ if( lda < n ) { info = -6; - LAPACKE_xerbla( "LAPACKE_chetrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_chetrs_aa_work", info ); return info; } if( ldb < nrhs ) { info = -9; - LAPACKE_xerbla( "LAPACKE_chetrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_chetrs_aa_work", info ); return info; } /* Allocate memory for temporary array(s) */ @@ -80,7 +80,7 @@ lapack_int LAPACKE_chetrs_aasen_work( int matrix_layout, char uplo, lapack_int n LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t ); /* Call LAPACK function and adjust info */ - LAPACK_chetrs_aasen( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, + LAPACK_chetrs_aa( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, &lwork, &info ); if( info < 0 ) { info = info - 1; @@ -93,11 +93,11 @@ exit_level_1: LAPACKE_free( a_t ); exit_level_0: if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_chetrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_chetrs_aa_work", info ); } } else { info = -1; - LAPACKE_xerbla( "LAPACKE_chetrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_chetrs_aa_work", info ); } return info; } diff --git a/LAPACKE/src/lapacke_dsysv_aasen.c b/LAPACKE/src/lapacke_dsysv_aa.c index d6e4d29a..2210c514 100644 --- a/LAPACKE/src/lapacke_dsysv_aasen.c +++ b/LAPACKE/src/lapacke_dsysv_aa.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native high-level C interface to LAPACK function dsysv_aasen +* Contents: Native high-level C interface to LAPACK function dsysv_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_dsysv_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_dsysv_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, double* a, lapack_int lda, lapack_int* ipiv, double* b, lapack_int ldb ) { @@ -42,7 +42,7 @@ lapack_int LAPACKE_dsysv_aasen( int matrix_layout, char uplo, lapack_int n, double* work = NULL; double work_query; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { - LAPACKE_xerbla( "LAPACKE_dsysv_aasen", -1 ); + LAPACKE_xerbla( "LAPACKE_dsysv_aa", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK @@ -55,7 +55,7 @@ lapack_int LAPACKE_dsysv_aasen( int matrix_layout, char uplo, lapack_int n, } #endif /* Query optimal working array(s) size */ - info = LAPACKE_dsysv_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_dsysv_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, &work_query, lwork ); if( info != 0 ) { goto exit_level_0; @@ -68,13 +68,13 @@ lapack_int LAPACKE_dsysv_aasen( int matrix_layout, char uplo, lapack_int n, goto exit_level_0; } /* Call middle-level interface */ - info = LAPACKE_dsysv_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_dsysv_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork ); /* Release memory and exit */ LAPACKE_free( work ); exit_level_0: if( info == LAPACK_WORK_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_dsysv_aasen", info ); + LAPACKE_xerbla( "LAPACKE_dsysv_aa", info ); } return info; } diff --git a/LAPACKE/src/lapacke_dsysv_aasen_work.c b/LAPACKE/src/lapacke_dsysv_aa_work.c index 94c4ce78..f7c116f5 100644 --- a/LAPACKE/src/lapacke_dsysv_aasen_work.c +++ b/LAPACKE/src/lapacke_dsysv_aa_work.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native middle-level C interface to LAPACK function dsysv_aasen +* Contents: Native middle-level C interface to LAPACK function dsysv_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_dsysv_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_dsysv_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, double* a, lapack_int lda, lapack_int* ipiv, double* b, lapack_int ldb, double* work, lapack_int lwork ) @@ -41,7 +41,7 @@ lapack_int LAPACKE_dsysv_aasen_work( int matrix_layout, char uplo, lapack_int n, lapack_int info = 0; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ - LAPACK_dsysv_aasen( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, + LAPACK_dsysv_aa( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info ); if( info < 0 ) { info = info - 1; @@ -54,17 +54,17 @@ lapack_int LAPACKE_dsysv_aasen_work( int matrix_layout, char uplo, lapack_int n, /* Check leading dimension(s) */ if( lda < n ) { info = -6; - LAPACKE_xerbla( "LAPACKE_dsysv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_dsysv_aa_work", info ); return info; } if( ldb < nrhs ) { info = -9; - LAPACKE_xerbla( "LAPACKE_dsysv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_dsysv_aa_work", info ); return info; } /* Query optimal working array(s) size if requested */ if( lwork == -1 ) { - LAPACK_dsysv_aasen( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, work, + LAPACK_dsysv_aa( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, work, &lwork, &info ); return (info < 0) ? (info - 1) : info; } @@ -83,7 +83,7 @@ lapack_int LAPACKE_dsysv_aasen_work( int matrix_layout, char uplo, lapack_int n, LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t ); /* Call LAPACK function and adjust info */ - LAPACK_dsysv_aasen( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, + LAPACK_dsysv_aa( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, &lwork, &info ); if( info < 0 ) { info = info - 1; @@ -97,11 +97,11 @@ exit_level_1: LAPACKE_free( a_t ); exit_level_0: if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_dsysv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_dsysv_aa_work", info ); } } else { info = -1; - LAPACKE_xerbla( "LAPACKE_dsysv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_dsysv_aa_work", info ); } return info; } diff --git a/LAPACKE/src/lapacke_dsytrf_aa.c b/LAPACKE/src/lapacke_dsytrf_aa.c new file mode 100644 index 00000000..972c078e --- /dev/null +++ b/LAPACKE/src/lapacke_dsytrf_aa.c @@ -0,0 +1,76 @@ +/***************************************************************************** + Copyright (c) 2014, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native high-level C interface to LAPACK function dsytrf +* Author: Intel Corporation +* Generated November 2015 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_dsytrf( int matrix_layout, char uplo, lapack_int n, double* a, + lapack_int lda, lapack_int* ipiv ) +{ + lapack_int info = 0; + lapack_int lwork = -1; + double* work = NULL; + double work_query; + if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { + LAPACKE_xerbla( "LAPACKE_dsytrf", -1 ); + return -1; + } +#ifndef LAPACK_DISABLE_NAN_CHECK + /* Optionally check input matrices for NaNs */ + if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { + return -4; + } +#endif + /* Query optimal working array(s) size */ + info = LAPACKE_dsytrf_aa_work( matrix_layout, uplo, n, a, lda, ipiv, + &work_query, lwork ); + if( info != 0 ) { + goto exit_level_0; + } + lwork = (lapack_int)work_query; + /* Allocate memory for work arrays */ + work = (double*)LAPACKE_malloc( sizeof(double) * lwork ); + if( work == NULL ) { + info = LAPACK_WORK_MEMORY_ERROR; + goto exit_level_0; + } + /* Call middle-level interface */ + info = LAPACKE_dsytrf_aa_work( matrix_layout, uplo, n, a, lda, ipiv, work, + lwork ); + /* Release memory and exit */ + LAPACKE_free( work ); +exit_level_0: + if( info == LAPACK_WORK_MEMORY_ERROR ) { + LAPACKE_xerbla( "LAPACKE_dsytrf", info ); + } + return info; +} diff --git a/LAPACKE/src/lapacke_dsytrf_aa_work.c b/LAPACKE/src/lapacke_dsytrf_aa_work.c new file mode 100644 index 00000000..4b6f97bd --- /dev/null +++ b/LAPACKE/src/lapacke_dsytrf_aa_work.c @@ -0,0 +1,87 @@ +/***************************************************************************** + Copyright (c) 2014, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native middle-level C interface to LAPACK function dsytrf +* Author: Intel Corporation +* Generated November 2015 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_dsytrf_aa_work( int matrix_layout, char uplo, lapack_int n, + double* a, lapack_int lda, lapack_int* ipiv, + double* work, lapack_int lwork ) +{ + lapack_int info = 0; + if( matrix_layout == LAPACK_COL_MAJOR ) { + /* Call LAPACK function and adjust info */ + LAPACK_dsytrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info ); + if( info < 0 ) { + info = info - 1; + } + } else if( matrix_layout == LAPACK_ROW_MAJOR ) { + lapack_int lda_t = MAX(1,n); + double* a_t = NULL; + /* Check leading dimension(s) */ + if( lda < n ) { + info = -5; + LAPACKE_xerbla( "LAPACKE_dsytrf_aa_work", info ); + return info; + } + /* Query optimal working array(s) size if requested */ + if( lwork == -1 ) { + LAPACK_dsytrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info ); + return (info < 0) ? (info - 1) : info; + } + /* Allocate memory for temporary array(s) */ + a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) ); + if( a_t == NULL ) { + info = LAPACK_TRANSPOSE_MEMORY_ERROR; + goto exit_level_0; + } + /* Transpose input matrices */ + LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); + /* Call LAPACK function and adjust info */ + LAPACK_dsytrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info ); + if( info < 0 ) { + info = info - 1; + } + /* Transpose output matrices */ + LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); + /* Release memory and exit */ + LAPACKE_free( a_t ); +exit_level_0: + if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { + LAPACKE_xerbla( "LAPACKE_dsytrf_aa_work", info ); + } + } else { + info = -1; + LAPACKE_xerbla( "LAPACKE_dsytrf_aa_work", info ); + } + return info; +} diff --git a/LAPACKE/src/lapacke_dsytrs_aasen.c b/LAPACKE/src/lapacke_dsytrs_aa.c index 865f4232..0f4c00b6 100644 --- a/LAPACKE/src/lapacke_dsytrs_aasen.c +++ b/LAPACKE/src/lapacke_dsytrs_aa.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native high-level C interface to LAPACK function dsytrs_aasen +* Contents: Native high-level C interface to LAPACK function dsytrs_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_dsytrs_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_dsytrs_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const double* a, lapack_int lda, const lapack_int* ipiv, double* b, lapack_int ldb ) { @@ -42,7 +42,7 @@ lapack_int LAPACKE_dsytrs_aasen( int matrix_layout, char uplo, lapack_int n, double* work = NULL; double work_query; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { - LAPACKE_xerbla( "LAPACKE_dsytrs_aasen", -1 ); + LAPACKE_xerbla( "LAPACKE_dsytrs_aa", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK @@ -55,7 +55,7 @@ lapack_int LAPACKE_dsytrs_aasen( int matrix_layout, char uplo, lapack_int n, } #endif /* Query optimal working array(s) size */ - info = LAPACKE_dsytrs_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_dsytrs_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, &work_query, lwork ); if( info != 0 ) { goto exit_level_0; @@ -69,13 +69,13 @@ lapack_int LAPACKE_dsytrs_aasen( int matrix_layout, char uplo, lapack_int n, goto exit_level_0; } /* Call middle-level interface */ - info = LAPACKE_dsytrs_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_dsytrs_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork ); /* Release memory and exit */ LAPACKE_free( work ); exit_level_0: if( info == LAPACK_WORK_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_dsytrs_aasen", info ); + LAPACKE_xerbla( "LAPACKE_dsytrs_aa", info ); } return info; } diff --git a/LAPACKE/src/lapacke_dsytrs_aasen_work.c b/LAPACKE/src/lapacke_dsytrs_aa_work.c index d00c877a..0915d898 100644 --- a/LAPACKE/src/lapacke_dsytrs_aasen_work.c +++ b/LAPACKE/src/lapacke_dsytrs_aa_work.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native middle-level C interface to LAPACK function dsytrs_aasen +* Contents: Native middle-level C interface to LAPACK function dsytrs_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_dsytrs_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_dsytrs_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const double* a, lapack_int lda, const lapack_int* ipiv, double* b, lapack_int ldb, double* work, lapack_int lwork ) @@ -41,7 +41,7 @@ lapack_int LAPACKE_dsytrs_aasen_work( int matrix_layout, char uplo, lapack_int n lapack_int info = 0; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ - LAPACK_dsytrs_aasen( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info ); + LAPACK_dsytrs_aa( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info ); if( info < 0 ) { info = info - 1; } @@ -53,12 +53,12 @@ lapack_int LAPACKE_dsytrs_aasen_work( int matrix_layout, char uplo, lapack_int n /* Check leading dimension(s) */ if( lda < n ) { info = -6; - LAPACKE_xerbla( "LAPACKE_dsytrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_dsytrs_aa_work", info ); return info; } if( ldb < nrhs ) { info = -9; - LAPACKE_xerbla( "LAPACKE_dsytrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_dsytrs_aa_work", info ); return info; } /* Allocate memory for temporary array(s) */ @@ -76,7 +76,7 @@ lapack_int LAPACKE_dsytrs_aasen_work( int matrix_layout, char uplo, lapack_int n LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t ); /* Call LAPACK function and adjust info */ - LAPACK_dsytrs_aasen( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, + LAPACK_dsytrs_aa( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, &lwork, &info ); if( info < 0 ) { info = info - 1; @@ -89,11 +89,11 @@ exit_level_1: LAPACKE_free( a_t ); exit_level_0: if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_dsytrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_dsytrs_aa_work", info ); } } else { info = -1; - LAPACKE_xerbla( "LAPACKE_dsytrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_dsytrs_aa_work", info ); } return info; } diff --git a/LAPACKE/src/lapacke_ssysv_aasen.c b/LAPACKE/src/lapacke_ssysv_aa.c index 553a93f6..d1b12f45 100644 --- a/LAPACKE/src/lapacke_ssysv_aasen.c +++ b/LAPACKE/src/lapacke_ssysv_aa.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native high-level C interface to LAPACK function ssysv_aasen +* Contents: Native high-level C interface to LAPACK function ssysv_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_ssysv_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_ssysv_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, float* a, lapack_int lda, lapack_int* ipiv, float* b, lapack_int ldb ) { @@ -42,7 +42,7 @@ lapack_int LAPACKE_ssysv_aasen( int matrix_layout, char uplo, lapack_int n, float* work = NULL; float work_query; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { - LAPACKE_xerbla( "LAPACKE_ssysv_aasen", -1 ); + LAPACKE_xerbla( "LAPACKE_ssysv_aa", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK @@ -55,7 +55,7 @@ lapack_int LAPACKE_ssysv_aasen( int matrix_layout, char uplo, lapack_int n, } #endif /* Query optimal working array(s) size */ - info = LAPACKE_ssysv_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_ssysv_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, &work_query, lwork ); if( info != 0 ) { goto exit_level_0; @@ -68,13 +68,13 @@ lapack_int LAPACKE_ssysv_aasen( int matrix_layout, char uplo, lapack_int n, goto exit_level_0; } /* Call middle-level interface */ - info = LAPACKE_ssysv_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_ssysv_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork ); /* Release memory and exit */ LAPACKE_free( work ); exit_level_0: if( info == LAPACK_WORK_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_ssysv_aasen", info ); + LAPACKE_xerbla( "LAPACKE_ssysv_aa", info ); } return info; } diff --git a/LAPACKE/src/lapacke_ssysv_aasen_work.c b/LAPACKE/src/lapacke_ssysv_aa_work.c index 8ad92b8a..e807b7c4 100644 --- a/LAPACKE/src/lapacke_ssysv_aasen_work.c +++ b/LAPACKE/src/lapacke_ssysv_aa_work.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native middle-level C interface to LAPACK function ssysv_aasen +* Contents: Native middle-level C interface to LAPACK function ssysv_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_ssysv_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_ssysv_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, float* a, lapack_int lda, lapack_int* ipiv, float* b, lapack_int ldb, float* work, lapack_int lwork ) @@ -41,7 +41,7 @@ lapack_int LAPACKE_ssysv_aasen_work( int matrix_layout, char uplo, lapack_int n, lapack_int info = 0; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ - LAPACK_ssysv_aasen( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, + LAPACK_ssysv_aa( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info ); if( info < 0 ) { info = info - 1; @@ -54,17 +54,17 @@ lapack_int LAPACKE_ssysv_aasen_work( int matrix_layout, char uplo, lapack_int n, /* Check leading dimension(s) */ if( lda < n ) { info = -6; - LAPACKE_xerbla( "LAPACKE_ssysv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_ssysv_aa_work", info ); return info; } if( ldb < nrhs ) { info = -9; - LAPACKE_xerbla( "LAPACKE_ssysv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_ssysv_aa_work", info ); return info; } /* Query optimal working array(s) size if requested */ if( lwork == -1 ) { - LAPACK_ssysv_aasen( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, work, + LAPACK_ssysv_aa( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, work, &lwork, &info ); return (info < 0) ? (info - 1) : info; } @@ -83,7 +83,7 @@ lapack_int LAPACKE_ssysv_aasen_work( int matrix_layout, char uplo, lapack_int n, LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t ); /* Call LAPACK function and adjust info */ - LAPACK_ssysv_aasen( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, + LAPACK_ssysv_aa( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, &lwork, &info ); if( info < 0 ) { info = info - 1; @@ -97,11 +97,11 @@ exit_level_1: LAPACKE_free( a_t ); exit_level_0: if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_ssysv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_ssysv_aa_work", info ); } } else { info = -1; - LAPACKE_xerbla( "LAPACKE_ssysv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_ssysv_aa_work", info ); } return info; } diff --git a/LAPACKE/src/lapacke_ssytrf_aa.c b/LAPACKE/src/lapacke_ssytrf_aa.c new file mode 100644 index 00000000..a48ce3be --- /dev/null +++ b/LAPACKE/src/lapacke_ssytrf_aa.c @@ -0,0 +1,76 @@ +/***************************************************************************** + Copyright (c) 2014, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native high-level C interface to LAPACK function ssytrf +* Author: Intel Corporation +* Generated November 2015 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_ssytrf( int matrix_layout, char uplo, lapack_int n, float* a, + lapack_int lda, lapack_int* ipiv ) +{ + lapack_int info = 0; + lapack_int lwork = -1; + float* work = NULL; + float work_query; + if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { + LAPACKE_xerbla( "LAPACKE_ssytrf", -1 ); + return -1; + } +#ifndef LAPACK_DISABLE_NAN_CHECK + /* Optionally check input matrices for NaNs */ + if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) { + return -4; + } +#endif + /* Query optimal working array(s) size */ + info = LAPACKE_ssytrf_aa_work( matrix_layout, uplo, n, a, lda, ipiv, + &work_query, lwork ); + if( info != 0 ) { + goto exit_level_0; + } + lwork = (lapack_int)work_query; + /* Allocate memory for work arrays */ + work = (float*)LAPACKE_malloc( sizeof(float) * lwork ); + if( work == NULL ) { + info = LAPACK_WORK_MEMORY_ERROR; + goto exit_level_0; + } + /* Call middle-level interface */ + info = LAPACKE_ssytrf_aa_work( matrix_layout, uplo, n, a, lda, ipiv, work, + lwork ); + /* Release memory and exit */ + LAPACKE_free( work ); +exit_level_0: + if( info == LAPACK_WORK_MEMORY_ERROR ) { + LAPACKE_xerbla( "LAPACKE_ssytrf", info ); + } + return info; +} diff --git a/LAPACKE/src/lapacke_ssytrf_aa_work.c b/LAPACKE/src/lapacke_ssytrf_aa_work.c new file mode 100644 index 00000000..1e56ba5a --- /dev/null +++ b/LAPACKE/src/lapacke_ssytrf_aa_work.c @@ -0,0 +1,87 @@ +/***************************************************************************** + Copyright (c) 2014, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native middle-level C interface to LAPACK function ssytrf +* Author: Intel Corporation +* Generated November 2015 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_ssytrf_aa_work( int matrix_layout, char uplo, lapack_int n, + float* a, lapack_int lda, lapack_int* ipiv, + float* work, lapack_int lwork ) +{ + lapack_int info = 0; + if( matrix_layout == LAPACK_COL_MAJOR ) { + /* Call LAPACK function and adjust info */ + LAPACK_ssytrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info ); + if( info < 0 ) { + info = info - 1; + } + } else if( matrix_layout == LAPACK_ROW_MAJOR ) { + lapack_int lda_t = MAX(1,n); + float* a_t = NULL; + /* Check leading dimension(s) */ + if( lda < n ) { + info = -5; + LAPACKE_xerbla( "LAPACKE_ssytrf_aa_work", info ); + return info; + } + /* Query optimal working array(s) size if requested */ + if( lwork == -1 ) { + LAPACK_ssytrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info ); + return (info < 0) ? (info - 1) : info; + } + /* Allocate memory for temporary array(s) */ + a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) ); + if( a_t == NULL ) { + info = LAPACK_TRANSPOSE_MEMORY_ERROR; + goto exit_level_0; + } + /* Transpose input matrices */ + LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); + /* Call LAPACK function and adjust info */ + LAPACK_ssytrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info ); + if( info < 0 ) { + info = info - 1; + } + /* Transpose output matrices */ + LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); + /* Release memory and exit */ + LAPACKE_free( a_t ); +exit_level_0: + if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { + LAPACKE_xerbla( "LAPACKE_ssytrf_aa_work", info ); + } + } else { + info = -1; + LAPACKE_xerbla( "LAPACKE_ssytrf_aa_work", info ); + } + return info; +} diff --git a/LAPACKE/src/lapacke_ssytrs_aasen.c b/LAPACKE/src/lapacke_ssytrs_aa.c index fd98070f..b0fc7cc7 100644 --- a/LAPACKE/src/lapacke_ssytrs_aasen.c +++ b/LAPACKE/src/lapacke_ssytrs_aa.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native high-level C interface to LAPACK function ssytrs_aasen +* Contents: Native high-level C interface to LAPACK function ssytrs_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_ssytrs_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_ssytrs_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const float* a, lapack_int lda, const lapack_int* ipiv, float* b, lapack_int ldb ) { @@ -42,7 +42,7 @@ lapack_int LAPACKE_ssytrs_aasen( int matrix_layout, char uplo, lapack_int n, float* work = NULL; float work_query; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { - LAPACKE_xerbla( "LAPACKE_ssytrs_aasen", -1 ); + LAPACKE_xerbla( "LAPACKE_ssytrs_aa", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK @@ -55,7 +55,7 @@ lapack_int LAPACKE_ssytrs_aasen( int matrix_layout, char uplo, lapack_int n, } #endif /* Query optimal working array(s) size */ - info = LAPACKE_ssytrs_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_ssytrs_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, &work_query, lwork ); if( info != 0 ) { goto exit_level_0; @@ -69,13 +69,13 @@ lapack_int LAPACKE_ssytrs_aasen( int matrix_layout, char uplo, lapack_int n, goto exit_level_0; } /* Call middle-level interface */ - info = LAPACKE_ssytrs_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_ssytrs_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork ); /* Release memory and exit */ LAPACKE_free( work ); exit_level_0: if( info == LAPACK_WORK_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_ssytrs_aasen", info ); + LAPACKE_xerbla( "LAPACKE_ssytrs_aa", info ); } return info; } diff --git a/LAPACKE/src/lapacke_ssytrs_aasen_work.c b/LAPACKE/src/lapacke_ssytrs_aa_work.c index f02ab966..e7d0d74b 100644 --- a/LAPACKE/src/lapacke_ssytrs_aasen_work.c +++ b/LAPACKE/src/lapacke_ssytrs_aa_work.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native middle-level C interface to LAPACK function ssytrs_aasen +* Contents: Native middle-level C interface to LAPACK function ssytrs_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_ssytrs_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_ssytrs_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const float* a, lapack_int lda, const lapack_int* ipiv, float* b, lapack_int ldb, float* work, lapack_int lwork ) @@ -41,7 +41,7 @@ lapack_int LAPACKE_ssytrs_aasen_work( int matrix_layout, char uplo, lapack_int n lapack_int info = 0; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ - LAPACK_ssytrs_aasen( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info ); + LAPACK_ssytrs_aa( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info ); if( info < 0 ) { info = info - 1; } @@ -53,12 +53,12 @@ lapack_int LAPACKE_ssytrs_aasen_work( int matrix_layout, char uplo, lapack_int n /* Check leading dimension(s) */ if( lda < n ) { info = -6; - LAPACKE_xerbla( "LAPACKE_ssytrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_ssytrs_aa_work", info ); return info; } if( ldb < nrhs ) { info = -9; - LAPACKE_xerbla( "LAPACKE_ssytrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_ssytrs_aa_work", info ); return info; } /* Allocate memory for temporary array(s) */ @@ -76,7 +76,7 @@ lapack_int LAPACKE_ssytrs_aasen_work( int matrix_layout, char uplo, lapack_int n LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t ); /* Call LAPACK function and adjust info */ - LAPACK_ssytrs_aasen( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, + LAPACK_ssytrs_aa( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, &lwork, &info ); if( info < 0 ) { info = info - 1; @@ -89,11 +89,11 @@ exit_level_1: LAPACKE_free( a_t ); exit_level_0: if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_ssytrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_ssytrs_aa_work", info ); } } else { info = -1; - LAPACKE_xerbla( "LAPACKE_ssytrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_ssytrs_aa_work", info ); } return info; } diff --git a/LAPACKE/src/lapacke_zhesv_aasen.c b/LAPACKE/src/lapacke_zhesv_aa.c index a33aa5b6..2c7b3855 100644 --- a/LAPACKE/src/lapacke_zhesv_aasen.c +++ b/LAPACKE/src/lapacke_zhesv_aa.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native high-level C interface to LAPACK function zhesv_aasen +* Contents: Native high-level C interface to LAPACK function zhesv_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_zhesv_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_zhesv_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, lapack_complex_double* a, lapack_int lda, lapack_int* ipiv, lapack_complex_double* b, lapack_int ldb ) @@ -43,7 +43,7 @@ lapack_int LAPACKE_zhesv_aasen( int matrix_layout, char uplo, lapack_int n, lapack_complex_double* work = NULL; lapack_complex_double work_query; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { - LAPACKE_xerbla( "LAPACKE_zhesv_aasen", -1 ); + LAPACKE_xerbla( "LAPACKE_zhesv_aa", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK @@ -56,7 +56,7 @@ lapack_int LAPACKE_zhesv_aasen( int matrix_layout, char uplo, lapack_int n, } #endif /* Query optimal working array(s) size */ - info = LAPACKE_zhesv_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_zhesv_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, &work_query, lwork ); if( info != 0 ) { goto exit_level_0; @@ -70,13 +70,13 @@ lapack_int LAPACKE_zhesv_aasen( int matrix_layout, char uplo, lapack_int n, goto exit_level_0; } /* Call middle-level interface */ - info = LAPACKE_zhesv_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_zhesv_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork ); /* Release memory and exit */ LAPACKE_free( work ); exit_level_0: if( info == LAPACK_WORK_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_zhesv_aasen", info ); + LAPACKE_xerbla( "LAPACKE_zhesv_aa", info ); } return info; } diff --git a/LAPACKE/src/lapacke_zhesv_aasen_work.c b/LAPACKE/src/lapacke_zhesv_aa_work.c index 5af00e93..983af985 100644 --- a/LAPACKE/src/lapacke_zhesv_aasen_work.c +++ b/LAPACKE/src/lapacke_zhesv_aa_work.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native middle-level C interface to LAPACK function zhesv_aasen +* Contents: Native middle-level C interface to LAPACK function zhesv_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_zhesv_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_zhesv_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, lapack_complex_double* a, lapack_int lda, lapack_int* ipiv, lapack_complex_double* b, lapack_int ldb, @@ -42,7 +42,7 @@ lapack_int LAPACKE_zhesv_aasen_work( int matrix_layout, char uplo, lapack_int n, lapack_int info = 0; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ - LAPACK_zhesv_aasen( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, + LAPACK_zhesv_aa( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info ); if( info < 0 ) { info = info - 1; @@ -55,17 +55,17 @@ lapack_int LAPACKE_zhesv_aasen_work( int matrix_layout, char uplo, lapack_int n, /* Check leading dimension(s) */ if( lda < n ) { info = -6; - LAPACKE_xerbla( "LAPACKE_zhesv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_zhesv_aa_work", info ); return info; } if( ldb < nrhs ) { info = -9; - LAPACKE_xerbla( "LAPACKE_zhesv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_zhesv_aa_work", info ); return info; } /* Query optimal working array(s) size if requested */ if( lwork == -1 ) { - LAPACK_zhesv_aasen( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, work, + LAPACK_zhesv_aa( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, work, &lwork, &info ); return (info < 0) ? (info - 1) : info; } @@ -87,7 +87,7 @@ lapack_int LAPACKE_zhesv_aasen_work( int matrix_layout, char uplo, lapack_int n, LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t ); /* Call LAPACK function and adjust info */ - LAPACK_zhesv_aasen( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, + LAPACK_zhesv_aa( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, &lwork, &info ); if( info < 0 ) { info = info - 1; @@ -101,11 +101,11 @@ exit_level_1: LAPACKE_free( a_t ); exit_level_0: if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_zhesv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_zhesv_aa_work", info ); } } else { info = -1; - LAPACKE_xerbla( "LAPACKE_zhesv_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_zhesv_aa_work", info ); } return info; } diff --git a/LAPACKE/src/lapacke_zhetrf_aa.c b/LAPACKE/src/lapacke_zhetrf_aa.c new file mode 100644 index 00000000..7282db46 --- /dev/null +++ b/LAPACKE/src/lapacke_zhetrf_aa.c @@ -0,0 +1,78 @@ +/***************************************************************************** + Copyright (c) 2014, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native high-level C interface to LAPACK function zhetrf +* Author: Intel Corporation +* Generated November 2015 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_zhetrf( int matrix_layout, char uplo, lapack_int n, + lapack_complex_double* a, lapack_int lda, + lapack_int* ipiv ) +{ + lapack_int info = 0; + lapack_int lwork = -1; + lapack_complex_double* work = NULL; + lapack_complex_double work_query; + if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { + LAPACKE_xerbla( "LAPACKE_zhetrf", -1 ); + return -1; + } +#ifndef LAPACK_DISABLE_NAN_CHECK + /* Optionally check input matrices for NaNs */ + if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) { + return -4; + } +#endif + /* Query optimal working array(s) size */ + info = LAPACKE_zhetrf_aa_work( matrix_layout, uplo, n, a, lda, ipiv, + &work_query, lwork ); + if( info != 0 ) { + goto exit_level_0; + } + lwork = LAPACK_Z2INT( work_query ); + /* Allocate memory for work arrays */ + 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_zhetrf_aa_work( matrix_layout, uplo, n, a, lda, ipiv, work, + lwork ); + /* Release memory and exit */ + LAPACKE_free( work ); +exit_level_0: + if( info == LAPACK_WORK_MEMORY_ERROR ) { + LAPACKE_xerbla( "LAPACKE_zhetrf", info ); + } + return info; +} diff --git a/LAPACKE/src/lapacke_zhetrf_aa_work.c b/LAPACKE/src/lapacke_zhetrf_aa_work.c new file mode 100644 index 00000000..d1b46674 --- /dev/null +++ b/LAPACKE/src/lapacke_zhetrf_aa_work.c @@ -0,0 +1,89 @@ +/***************************************************************************** + Copyright (c) 2014, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native middle-level C interface to LAPACK function zhetrf +* Author: Intel Corporation +* Generated November 2015 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_zhetrf_aa_work( int matrix_layout, char uplo, lapack_int n, + lapack_complex_double* a, lapack_int lda, + lapack_int* ipiv, lapack_complex_double* work, + lapack_int lwork ) +{ + lapack_int info = 0; + if( matrix_layout == LAPACK_COL_MAJOR ) { + /* Call LAPACK function and adjust info */ + LAPACK_zhetrf( &uplo, &n, a, &lda, ipiv, work, &lwork, &info ); + if( info < 0 ) { + info = info - 1; + } + } else if( matrix_layout == LAPACK_ROW_MAJOR ) { + lapack_int lda_t = MAX(1,n); + lapack_complex_double* a_t = NULL; + /* Check leading dimension(s) */ + if( lda < n ) { + info = -5; + LAPACKE_xerbla( "LAPACKE_zhetrf_aa_work", info ); + return info; + } + /* Query optimal working array(s) size if requested */ + if( lwork == -1 ) { + LAPACK_zhetrf( &uplo, &n, a, &lda_t, ipiv, work, &lwork, &info ); + return (info < 0) ? (info - 1) : info; + } + /* Allocate memory for temporary array(s) */ + a_t = (lapack_complex_double*) + LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) ); + if( a_t == NULL ) { + info = LAPACK_TRANSPOSE_MEMORY_ERROR; + goto exit_level_0; + } + /* Transpose input matrices */ + LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); + /* Call LAPACK function and adjust info */ + LAPACK_zhetrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info ); + if( info < 0 ) { + info = info - 1; + } + /* Transpose output matrices */ + LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); + /* Release memory and exit */ + LAPACKE_free( a_t ); +exit_level_0: + if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { + LAPACKE_xerbla( "LAPACKE_zhetrf_aa_work", info ); + } + } else { + info = -1; + LAPACKE_xerbla( "LAPACKE_zhetrf_aa_work", info ); + } + return info; +} diff --git a/LAPACKE/src/lapacke_zhetrs_aasen.c b/LAPACKE/src/lapacke_zhetrs_aa.c index 6286e250..d74ba6a6 100644 --- a/LAPACKE/src/lapacke_zhetrs_aasen.c +++ b/LAPACKE/src/lapacke_zhetrs_aa.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native high-level C interface to LAPACK function zhetrs_aasen +* Contents: Native high-level C interface to LAPACK function zhetrs_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_zhetrs_aasen( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_zhetrs_aa( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const lapack_complex_double* a, lapack_int lda, const lapack_int* ipiv, lapack_complex_double* b, lapack_int ldb ) @@ -43,7 +43,7 @@ lapack_int LAPACKE_zhetrs_aasen( int matrix_layout, char uplo, lapack_int n, lapack_complex_double* work = NULL; lapack_complex_double work_query; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { - LAPACKE_xerbla( "LAPACKE_zhetrs_aasen", -1 ); + LAPACKE_xerbla( "LAPACKE_zhetrs_aa", -1 ); return -1; } #ifndef LAPACK_DISABLE_NAN_CHECK @@ -56,7 +56,7 @@ lapack_int LAPACKE_zhetrs_aasen( int matrix_layout, char uplo, lapack_int n, } #endif /* Query optimal working array(s) size */ - info = LAPACKE_zhetrs_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_zhetrs_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, &work_query, lwork ); if( info != 0 ) { goto exit_level_0; @@ -70,13 +70,13 @@ lapack_int LAPACKE_zhetrs_aasen( int matrix_layout, char uplo, lapack_int n, goto exit_level_0; } /* Call middle-level interface */ - info = LAPACKE_zhetrs_aasen_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, + info = LAPACKE_zhetrs_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork ); /* Release memory and exit */ LAPACKE_free( work ); exit_level_0: if( info == LAPACK_WORK_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_zhetrs_aasen", info ); + LAPACKE_xerbla( "LAPACKE_zhetrs_aa", info ); } return info; } diff --git a/LAPACKE/src/lapacke_zhetrs_aasen_work.c b/LAPACKE/src/lapacke_zhetrs_aa_work.c index 49c4aed4..8536dfc1 100644 --- a/LAPACKE/src/lapacke_zhetrs_aasen_work.c +++ b/LAPACKE/src/lapacke_zhetrs_aa_work.c @@ -26,14 +26,14 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************** -* Contents: Native middle-level C interface to LAPACK function zhetrs_aasen +* Contents: Native middle-level C interface to LAPACK function zhetrs_aa * Author: Intel Corporation * Generated November 2015 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_zhetrs_aasen_work( int matrix_layout, char uplo, lapack_int n, +lapack_int LAPACKE_zhetrs_aa_work( int matrix_layout, char uplo, lapack_int n, lapack_int nrhs, const lapack_complex_double* a, lapack_int lda, const lapack_int* ipiv, @@ -43,7 +43,7 @@ lapack_int LAPACKE_zhetrs_aasen_work( int matrix_layout, char uplo, lapack_int n lapack_int info = 0; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ - LAPACK_zhetrs_aasen( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info ); + LAPACK_zhetrs_aa( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info ); if( info < 0 ) { info = info - 1; } @@ -55,12 +55,12 @@ lapack_int LAPACKE_zhetrs_aasen_work( int matrix_layout, char uplo, lapack_int n /* Check leading dimension(s) */ if( lda < n ) { info = -6; - LAPACKE_xerbla( "LAPACKE_zhetrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_zhetrs_aa_work", info ); return info; } if( ldb < nrhs ) { info = -9; - LAPACKE_xerbla( "LAPACKE_zhetrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_zhetrs_aa_work", info ); return info; } /* Allocate memory for temporary array(s) */ @@ -81,7 +81,7 @@ lapack_int LAPACKE_zhetrs_aasen_work( int matrix_layout, char uplo, lapack_int n LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t ); /* Call LAPACK function and adjust info */ - LAPACK_zhetrs_aasen( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, + LAPACK_zhetrs_aa( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work, &lwork, &info ); if( info < 0 ) { info = info - 1; @@ -94,11 +94,11 @@ exit_level_1: LAPACKE_free( a_t ); exit_level_0: if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_zhetrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_zhetrs_aa_work", info ); } } else { info = -1; - LAPACKE_xerbla( "LAPACKE_zhetrs_aasen_work", info ); + LAPACKE_xerbla( "LAPACKE_zhetrs_aa_work", info ); } return info; } |