aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Langou <julien.langou@ucdenver.edu>2016-12-04 16:02:37 +0100
committerJulien Langou <julien.langou@ucdenver.edu>2016-12-04 16:02:37 +0100
commit9f636dabec2dca29f5dacbf2e5b872953c3aaafb (patch)
tree5e81aa2bb4074977f346e8bef3359ae4a4810759
parent5c749d8db87b7fb1ad669ee4c017a5b41d1d6edb (diff)
parent490e38c0fb94455efe327feb5e5fc1f3c63b066c (diff)
Merge branch 'master' of https://github.com/Reference-LAPACK/lapack
-rw-r--r--LAPACKE/include/lapacke.h87
-rw-r--r--LAPACKE/src/CMakeLists.txt12
-rw-r--r--LAPACKE/src/Makefile12
-rw-r--r--LAPACKE/src/lapacke_csysv_aa.c82
-rw-r--r--LAPACKE/src/lapacke_csysv_aa_work.c111
-rw-r--r--LAPACKE/src/lapacke_csytrf_aa.c78
-rw-r--r--LAPACKE/src/lapacke_csytrf_aa_work.c89
-rw-r--r--LAPACKE/src/lapacke_csytrs_aa.c82
-rw-r--r--LAPACKE/src/lapacke_csytrs_aa_work.c103
-rw-r--r--LAPACKE/src/lapacke_zsysv_aa.c82
-rw-r--r--LAPACKE/src/lapacke_zsysv_aa_work.c111
-rw-r--r--LAPACKE/src/lapacke_zsytrf_aa.c78
-rw-r--r--LAPACKE/src/lapacke_zsytrf_aa_work.c89
-rw-r--r--LAPACKE/src/lapacke_zsytrs_aa.c82
-rw-r--r--LAPACKE/src/lapacke_zsytrs_aa_work.c104
-rw-r--r--SRC/chetrd_hb2st.F39
-rw-r--r--SRC/dsytrd_sb2st.F72
-rw-r--r--SRC/iparam2stage.F278
-rw-r--r--SRC/ssytrd_sb2st.F72
-rw-r--r--SRC/zhetrd_hb2st.F41
20 files changed, 1374 insertions, 330 deletions
diff --git a/LAPACKE/include/lapacke.h b/LAPACKE/include/lapacke.h
index b191d380..a319a469 100644
--- a/LAPACKE/include/lapacke.h
+++ b/LAPACKE/include/lapacke.h
@@ -11439,6 +11439,24 @@ 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_csysv_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_csysv_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_zsysv_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_zsysv_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_chesv_aa( int matrix_layout, char uplo, lapack_int n,
lapack_int nrhs, lapack_complex_float* a,
lapack_int lda, lapack_int* ipiv,
@@ -11462,6 +11480,12 @@ lapack_int LAPACKE_ssytrf_aa( int matrix_layout, char uplo, lapack_int n, float*
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_csytrf_aa( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int* ipiv );
+lapack_int LAPACKE_zsytrf_aa( int matrix_layout, char uplo, lapack_int n,
+ lapack_complex_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 );
@@ -11475,6 +11499,14 @@ lapack_int LAPACKE_ssytrf_aa_work( int matrix_layout, char uplo, lapack_int n,
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_csytrf_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_zsytrf_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_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,
@@ -11485,6 +11517,15 @@ lapack_int LAPACKE_zhetrf_aa_work( int matrix_layout, char uplo, lapack_int n,
lapack_int lwork );
+lapack_int LAPACKE_csytrs_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_csytrs_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_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,
@@ -11508,6 +11549,15 @@ 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_zsytrs_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_zsytrs_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,
+ lapack_complex_double* work, lapack_int lwork);
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,
@@ -12629,14 +12679,20 @@ lapack_int LAPACKE_zhetrs_aa_work( int matrix_layout, char uplo, lapack_int n,
// LAPACK 3.7.0
#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_csysv_aa LAPACK_GLOBAL(chesv_aa,CHESV_AA)
+#define LAPACK_zsysv_aa LAPACK_GLOBAL(zsysv_aa,ZSYSV_AA)
+#define LAPACK_chesv_aa LAPACK_GLOBAL(csysv_aa,CSYSV_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_csytrs_aa LAPACK_GLOBAL(csytrs_aa,CSYTRS_AA)
+#define LAPACK_zsytrs_aa LAPACK_GLOBAL(zsytrs_aa,ZSYTRS_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_csytrf_aa LAPACK_GLOBAL(csytrf_aa,CSYTRF_AA)
+#define LAPACK_zsytrf_aa LAPACK_GLOBAL(zsytrf_aa,ZSYTRF_AA)
#define LAPACK_chetrf_aa LAPACK_GLOBAL(chetrf_aa,CHETRF_AA)
#define LAPACK_zhetrf_aa LAPACK_GLOBAL(zhetrf_aa,ZHETRF_AA)
@@ -17662,6 +17718,16 @@ 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_csysv_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_zsysv_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_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,
@@ -17679,6 +17745,14 @@ void LAPACK_ssytrf_aa( char* uplo, lapack_int* n, float* a, lapack_int* lda,
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_csytrf_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_zsytrf_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_chetrf_aa( char* uplo, lapack_int* n, lapack_complex_float* a,
lapack_int* lda, lapack_int* ipiv,
lapack_complex_float* work, lapack_int* lwork,
@@ -17696,6 +17770,17 @@ 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_csytrs_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_zsytrs_aa( 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_complex_double* work, lapack_int* lwork, lapack_int *info );
void LAPACK_chetrs_aa( char* uplo, lapack_int* n,
lapack_int* nrhs, const lapack_complex_float* a,
lapack_int* lda, const lapack_int* ipiv,
diff --git a/LAPACKE/src/CMakeLists.txt b/LAPACKE/src/CMakeLists.txt
index 632a0f83..5ebebbaf 100644
--- a/LAPACKE/src/CMakeLists.txt
+++ b/LAPACKE/src/CMakeLists.txt
@@ -403,6 +403,8 @@ lapacke_csysv.c
lapacke_csysv_rook.c
lapacke_csysv_rook_work.c
lapacke_csysv_work.c
+lapacke_csysv_aa.c
+lapacke_csysv_aa_work.c
lapacke_csysvx.c
lapacke_csysvx_work.c
lapacke_csyswapr.c
@@ -411,6 +413,8 @@ lapacke_csytrf.c
lapacke_csytrf_work.c
lapacke_csytrf_rook.c
lapacke_csytrf_rook_work.c
+lapacke_csytrf_aa.c
+lapacke_csytrf_aa_work.c
lapacke_csytri.c
lapacke_csytri2.c
lapacke_csytri2_work.c
@@ -423,6 +427,8 @@ lapacke_csytrs2.c
lapacke_csytrs2_work.c
lapacke_csytrs_work.c
lapacke_csytrs_rook_work.c
+lapacke_csytrs_aa.c
+lapacke_csytrs_aa_work.c
lapacke_ctbcon.c
lapacke_ctbcon_work.c
lapacke_ctbrfs.c
@@ -1971,6 +1977,8 @@ lapacke_zsysv.c
lapacke_zsysv_rook.c
lapacke_zsysv_rook_work.c
lapacke_zsysv_work.c
+lapacke_zsysv_aa.c
+lapacke_zsysv_aa_work.c
lapacke_zsysvx.c
lapacke_zsysvx_work.c
lapacke_zsyswapr.c
@@ -1979,6 +1987,8 @@ lapacke_zsytrf.c
lapacke_zsytrf_work.c
lapacke_zsytrf_rook.c
lapacke_zsytrf_rook_work.c
+lapacke_zsytrf_aa.c
+lapacke_zsytrf_aa_work.c
lapacke_zsytri.c
lapacke_zsytri2.c
lapacke_zsytri2_work.c
@@ -1991,6 +2001,8 @@ lapacke_zsytrs2.c
lapacke_zsytrs2_work.c
lapacke_zsytrs_work.c
lapacke_zsytrs_rook_work.c
+lapacke_zsytrs_aa.c
+lapacke_zsytrs_aa_work.c
lapacke_ztbcon.c
lapacke_ztbcon_work.c
lapacke_ztbrfs.c
diff --git a/LAPACKE/src/Makefile b/LAPACKE/src/Makefile
index 0d3c6b0d..e3266aed 100644
--- a/LAPACKE/src/Makefile
+++ b/LAPACKE/src/Makefile
@@ -437,6 +437,8 @@ lapacke_csysv.o \
lapacke_csysv_rook.o \
lapacke_csysv_rook_work.o \
lapacke_csysv_work.o \
+lapacke_csysv_aa.o \
+lapacke_csysv_aa_work.o \
lapacke_csysvx.o \
lapacke_csysvx_work.o \
lapacke_csyswapr.o \
@@ -445,6 +447,8 @@ lapacke_csytrf.o \
lapacke_csytrf_work.o \
lapacke_csytrf_rook.o \
lapacke_csytrf_rook_work.o \
+lapacke_csytrf_aa.o \
+lapacke_csytrf_aa_work.o \
lapacke_csytri.o \
lapacke_csytri2.o \
lapacke_csytri2_work.o \
@@ -457,6 +461,8 @@ lapacke_csytrs2.o \
lapacke_csytrs2_work.o \
lapacke_csytrs_work.o \
lapacke_csytrs_rook_work.o \
+lapacke_csytrs_aa.o \
+lapacke_csytrs_aa_work.o \
lapacke_ctbcon.o \
lapacke_ctbcon_work.o \
lapacke_ctbrfs.o \
@@ -2005,6 +2011,8 @@ lapacke_zsysv.o \
lapacke_zsysv_rook.o \
lapacke_zsysv_rook_work.o \
lapacke_zsysv_work.o \
+lapacke_zsysv_aa.o \
+lapacke_zsysv_aa_work.o \
lapacke_zsysvx.o \
lapacke_zsysvx_work.o \
lapacke_zsyswapr.o \
@@ -2013,6 +2021,8 @@ lapacke_zsytrf.o \
lapacke_zsytrf_work.o \
lapacke_zsytrf_rook.o \
lapacke_zsytrf_rook_work.o \
+lapacke_zsytrf_aa.o \
+lapacke_zsytrf_aa_work.o \
lapacke_zsytri.o \
lapacke_zsytri2.o \
lapacke_zsytri2_work.o \
@@ -2025,6 +2035,8 @@ lapacke_zsytrs2.o \
lapacke_zsytrs2_work.o \
lapacke_zsytrs_work.o \
lapacke_zsytrs_rook_work.o \
+lapacke_zsytrs_aa.o \
+lapacke_zsytrs_aa_work.o \
lapacke_ztbcon.o \
lapacke_ztbcon_work.o \
lapacke_ztbrfs.o \
diff --git a/LAPACKE/src/lapacke_csysv_aa.c b/LAPACKE/src/lapacke_csysv_aa.c
new file mode 100644
index 00000000..8f03a0ca
--- /dev/null
+++ b/LAPACKE/src/lapacke_csysv_aa.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ 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 csysv_aa
+* Author: Intel Corporation
+* Generated November 2016
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csysv_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 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_csysv_aa", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally csyck input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_csysv_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, &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_csysv_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_csysv_aa", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csysv_aa_work.c b/LAPACKE/src/lapacke_csysv_aa_work.c
new file mode 100644
index 00000000..370fe3f6
--- /dev/null
+++ b/LAPACKE/src/lapacke_csysv_aa_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ 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 csysv_aa
+* Author: Intel Corporation
+* Generated November 2015
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csysv_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 info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csysv_aa( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_csysv_aa_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_csysv_aa_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_csysv_aa( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, 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;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_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_csysv_aa( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csysv_aa_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csysv_aa_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytrf_aa.c b/LAPACKE/src/lapacke_csytrf_aa.c
new file mode 100644
index 00000000..a3bd58f8
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytrf_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 csytrf
+* Author: Intel Corporation
+* Generated November 2015
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytrf( 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_csytrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally csyck input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_csytrf_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_csytrf_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_csytrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytrf_aa_work.c b/LAPACKE/src/lapacke_csytrf_aa_work.c
new file mode 100644
index 00000000..a5f1cf22
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytrf_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 csytrf
+* Author: Intel Corporation
+* Generated November 2015
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytrf_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_csytrf( &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_csytrf_aa_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_csytrf( &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_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_csytrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_csy_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_csytrf_aa_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csytrf_aa_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytrs_aa.c b/LAPACKE/src/lapacke_csytrs_aa.c
new file mode 100644
index 00000000..561e5f84
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytrs_aa.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ 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 csytrs_aa
+* Author: Intel Corporation
+* Generated November 2015
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytrs_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 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_csytrs_aa", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally csyck input matrices for NaNs */
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_csytrs_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, &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_csytrs_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_csytrs_aa", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_csytrs_aa_work.c b/LAPACKE/src/lapacke_csytrs_aa_work.c
new file mode 100644
index 00000000..0dc6e28b
--- /dev/null
+++ b/LAPACKE/src/lapacke_csytrs_aa_work.c
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ 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 csytrs_aa
+* Author: Intel Corporation
+* Generated November 2015
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytrs_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 info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_csytrs_aa( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_csytrs_aa_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_csytrs_aa_work", info );
+ return 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;
+ }
+ b_t = (lapack_complex_float*)
+ LAPACKE_malloc( sizeof(lapack_complex_float) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_csy_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_csytrs_aa( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_csytrs_aa_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_csytrs_aa_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsysv_aa.c b/LAPACKE/src/lapacke_zsysv_aa.c
new file mode 100644
index 00000000..7045d279
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsysv_aa.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ 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 zsysv_aa
+* Author: Intel Corporation
+* Generated November 2015
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsysv_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 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_zsysv_aa", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zsysv_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, &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_zsysv_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_zsysv_aa", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsysv_aa_work.c b/LAPACKE/src/lapacke_zsysv_aa_work.c
new file mode 100644
index 00000000..bd2beef7
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsysv_aa_work.c
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ 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 zsysv_aa
+* Author: Intel Corporation
+* Generated November 2015
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsysv_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 info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsysv_aa( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork,
+ &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zsysv_aa_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zsysv_aa_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zsysv_aa( &uplo, &n, &nrhs, a, &lda_t, ipiv, b, &ldb_t, 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;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_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_zsysv_aa( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsysv_aa_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsysv_aa_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytrf_aa.c b/LAPACKE/src/lapacke_zsytrf_aa.c
new file mode 100644
index 00000000..28c0b9ec
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytrf_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 zsytrf
+* Author: Intel Corporation
+* Generated November 2015
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytrf( 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_zsytrf", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -4;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zsytrf_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_zsytrf_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_zsytrf", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytrf_aa_work.c b/LAPACKE/src/lapacke_zsytrf_aa_work.c
new file mode 100644
index 00000000..9fa8e68d
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytrf_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 zsytrf
+* Author: Intel Corporation
+* Generated November 2015
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytrf_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_zsytrf( &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_zsytrf_aa_work", info );
+ return info;
+ }
+ /* Query optimal working array(s) size if requested */
+ if( lwork == -1 ) {
+ LAPACK_zsytrf( &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_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsytrf( &uplo, &n, a_t, &lda_t, ipiv, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zsy_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_zsytrf_aa_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsytrf_aa_work", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytrs_aa.c b/LAPACKE/src/lapacke_zsytrs_aa.c
new file mode 100644
index 00000000..b5cbe4bb
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytrs_aa.c
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ 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 zsytrs_aa
+* Author: Intel Corporation
+* Generated November 2015
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytrs_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 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_zsytrs_aa", -1 );
+ return -1;
+ }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+ /* Optionally check input matrices for NaNs */
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+ return -5;
+ }
+ if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+ return -8;
+ }
+#endif
+ /* Query optimal working array(s) size */
+ info = LAPACKE_zsytrs_aa_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
+ ldb, &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_zsytrs_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_zsytrs_aa", info );
+ }
+ return info;
+}
diff --git a/LAPACKE/src/lapacke_zsytrs_aa_work.c b/LAPACKE/src/lapacke_zsytrs_aa_work.c
new file mode 100644
index 00000000..1b7f7d7f
--- /dev/null
+++ b/LAPACKE/src/lapacke_zsytrs_aa_work.c
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ 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 zsytrs_aa
+* Author: Intel Corporation
+* Generated November 2015
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytrs_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,
+ lapack_complex_double* work, lapack_int lwork )
+{
+ lapack_int info = 0;
+ if( matrix_layout == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zsytrs_aa( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, work, &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
+ lapack_int ldb_t = MAX(1,n);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* b_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+ info = -6;
+ LAPACKE_xerbla( "LAPACKE_zsytrs_aa_work", info );
+ return info;
+ }
+ if( ldb < nrhs ) {
+ info = -9;
+ LAPACKE_xerbla( "LAPACKE_zsytrs_aa_work", info );
+ return 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;
+ }
+ b_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) *
+ ldb_t * MAX(1,nrhs) );
+ if( b_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_1;
+ }
+ /* Transpose input matrices */
+ LAPACKE_zsy_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_zsytrs_aa( &uplo, &n, &nrhs, a_t, &lda_t, ipiv, b_t, &ldb_t, work,
+ &lwork, &info );
+ if( info < 0 ) {
+ info = info - 1;
+ }
+ /* Transpose output matrices */
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+ /* Release memory and exit */
+ LAPACKE_free( b_t );
+exit_level_1:
+ LAPACKE_free( a_t );
+exit_level_0:
+ if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+ LAPACKE_xerbla( "LAPACKE_zsytrs_aa_work", info );
+ }
+ } else {
+ info = -1;
+ LAPACKE_xerbla( "LAPACKE_zsytrs_aa_work", info );
+ }
+ return info;
+}
diff --git a/SRC/chetrd_hb2st.F b/SRC/chetrd_hb2st.F
index 6f253278..c4d44803 100644
--- a/SRC/chetrd_hb2st.F
+++ b/SRC/chetrd_hb2st.F
@@ -1,6 +1,4 @@
-*> \brief \b CHBTRD
-*
-* @generated from zhetrd_hb2st.F, fortran z -> c, Sun Nov 6 19:34:06 2016
+*> \brief \b CHBTRD_HB2ST reduces a complex Hermitian band matrix A to real symmetric tridiagonal form T
*
* =========== DOCUMENTATION ===========
*
@@ -8,12 +6,12 @@
* http://www.netlib.org/lapack/explore-html/
*
*> \htmlonly
-*> Download CHBTRD + dependencies
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/chbtrd.f">
+*> Download CHBTRD_HB2ST + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/chbtrd_hb2st.f">
*> [TGZ]</a>
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/chbtrd.f">
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/chbtrd_hb2st.f">
*> [ZIP]</a>
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/chbtrd.f">
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/chbtrd_hb2st.f">
*> [TXT]</a>
*> \endhtmlonly
*
@@ -23,8 +21,6 @@
* SUBROUTINE CHETRD_HB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB,
* D, E, HOUS, LHOUS, WORK, LWORK, INFO )
*
-* #define PRECISION_COMPLEX
-*
* #if defined(_OPENMP)
* use omp_lib
* #endif
@@ -46,7 +42,7 @@
*>
*> \verbatim
*>
-*> CHBTRD reduces a complex Hermitian band matrix A to real symmetric
+*> CHETRD_HB2ST reduces a complex Hermitian band matrix A to real symmetric
*> tridiagonal form T by a unitary similarity transformation:
*> Q**H * A * Q = T.
*> \endverbatim
@@ -234,7 +230,6 @@
SUBROUTINE CHETRD_HB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB,
$ D, E, HOUS, LHOUS, WORK, LWORK, INFO )
*
-#define PRECISION_COMPLEX
*
#if defined(_OPENMP)
use omp_lib
@@ -274,10 +269,8 @@
$ ABDPOS, ABOFDPOS, DPOS, OFDPOS, AWPOS,
$ INDA, INDW, APOS, SIZEA, LDA, INDV, INDTAU,
$ SICEV, SIZETAU, LDV, LHMIN, LWMIN
-#if defined (PRECISION_COMPLEX)
REAL ABSTMP
COMPLEX TMP
-#endif
* ..
* .. External Subroutines ..
EXTERNAL CHB2ST_KERNELS, CLACPY, CLASET
@@ -389,7 +382,7 @@
DO 40 I = 1, N-1
E( I ) = RZERO
40 CONTINUE
- GOTO 200
+ RETURN
END IF
*
* Case KD=1:
@@ -402,12 +395,10 @@
* updating the Q matrix will be required and based if Q is generated
* or not this might complicate the story.
*
-C IF( KD.EQ.1 .AND. N.GT.(KD+1) .AND. AFTERS1 ) THEN
IF( KD.EQ.1 ) THEN
DO 50 I = 1, N
D( I ) = REAL( AB( ABDPOS, I ) )
50 CONTINUE
-#if defined (PRECISION_COMPLEX)
*
* make off-diagonal elements real and copy them to E
*
@@ -446,18 +437,7 @@ C CALL CSCAL( N, TMP, Q( 1, I+1 ), 1 )
C END IF
70 CONTINUE
ENDIF
-#else
- IF( UPPER ) THEN
- DO 60 I = 1, N-1
- E( I ) = REAL( AB( ABOFDPOS, I+1 ) )
- 60 CONTINUE
- ELSE
- DO 70 I = 1, N-1
- E( I ) = REAL( AB( ABOFDPOS, I ) )
- 70 CONTINUE
- ENDIF
-#endif
- GOTO 200
+ RETURN
END IF
*
* Main code start here.
@@ -590,8 +570,6 @@ C END IF
170 CONTINUE
ENDIF
*
- 200 CONTINUE
-*
HOUS( 1 ) = LHMIN
WORK( 1 ) = LWMIN
RETURN
@@ -599,5 +577,4 @@ C END IF
* End of CHETRD_HB2ST
*
END
-#undef PRECISION_COMPLEX
diff --git a/SRC/dsytrd_sb2st.F b/SRC/dsytrd_sb2st.F
index d50debe1..6925b525 100644
--- a/SRC/dsytrd_sb2st.F
+++ b/SRC/dsytrd_sb2st.F
@@ -1,6 +1,4 @@
-*> \brief \b DSBTRD
-*
-* @generated from zhetrd_hb2st.F, fortran z -> d, Sun Nov 6 19:34:06 2016
+*> \brief \b DSYTRD_SB2ST reduces a real symmetric band matrix A to real symmetric tridiagonal form T
*
* =========== DOCUMENTATION ===========
*
@@ -8,12 +6,12 @@
* http://www.netlib.org/lapack/explore-html/
*
*> \htmlonly
-*> Download DSBTRD + dependencies
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbtrd.f">
+*> Download DSYTRD_SB2ST + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytrd_sb2st.f">
*> [TGZ]</a>
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbtrd.f">
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytrd_sb2st.f">
*> [ZIP]</a>
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbtrd.f">
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytrd_sb2st.f">
*> [TXT]</a>
*> \endhtmlonly
*
@@ -23,8 +21,6 @@
* SUBROUTINE DSYTRD_SB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB,
* D, E, HOUS, LHOUS, WORK, LWORK, INFO )
*
-* #define PRECISION_REAL
-*
* #if defined(_OPENMP)
* use omp_lib
* #endif
@@ -46,7 +42,7 @@
*>
*> \verbatim
*>
-*> DSBTRD reduces a real symmetric band matrix A to real symmetric
+*> DSYTRD_SB2ST reduces a real symmetric band matrix A to real symmetric
*> tridiagonal form T by a orthogonal similarity transformation:
*> Q**T * A * Q = T.
*> \endverbatim
@@ -234,15 +230,13 @@
SUBROUTINE DSYTRD_SB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB,
$ D, E, HOUS, LHOUS, WORK, LWORK, INFO )
*
-#define PRECISION_REAL
-*
#if defined(_OPENMP)
use omp_lib
#endif
*
IMPLICIT NONE
*
-* -- LAPACK computational routine (version 3.4.0) --
+* -- LAPACK computational routine (version 3.7.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2016
@@ -274,10 +268,6 @@
$ ABDPOS, ABOFDPOS, DPOS, OFDPOS, AWPOS,
$ INDA, INDW, APOS, SIZEA, LDA, INDV, INDTAU,
$ SIDEV, SIZETAU, LDV, LHMIN, LWMIN
-#if defined (PRECISION_COMPLEX)
- DOUBLE PRECISION ABSTMP
- DOUBLE PRECISION TMP
-#endif
* ..
* .. External Subroutines ..
EXTERNAL DSB2ST_KERNELS, DLACPY, DLASET
@@ -389,7 +379,7 @@
DO 40 I = 1, N-1
E( I ) = RZERO
40 CONTINUE
- GOTO 200
+ RETURN
END IF
*
* Case KD=1:
@@ -402,52 +392,12 @@
* updating the Q matrix will be required and based if Q is generated
* or not this might complicate the story.
*
-C IF( KD.EQ.1 .AND. N.GT.(KD+1) .AND. AFTERS1 ) THEN
IF( KD.EQ.1 ) THEN
DO 50 I = 1, N
D( I ) = ( AB( ABDPOS, I ) )
50 CONTINUE
-#if defined (PRECISION_COMPLEX)
-*
-* make off-diagonal elements real and copy them to E
*
IF( UPPER ) THEN
- DO 60 I = 1, N - 1
- TMP = AB( ABOFDPOS, I+1 )
- ABSTMP = ABS( TMP )
- AB( ABOFDPOS, I+1 ) = ABSTMP
- E( I ) = ABSTMP
- IF( ABSTMP.NE.RZERO ) THEN
- TMP = TMP / ABSTMP
- ELSE
- TMP = ONE
- END IF
- IF( I.LT.N-1 )
- $ AB( ABOFDPOS, I+2 ) = AB( ABOFDPOS, I+2 )*TMP
-C IF( WANTZ ) THEN
-C CALL DSCAL( N, ( TMP ), Q( 1, I+1 ), 1 )
-C END IF
- 60 CONTINUE
- ELSE
- DO 70 I = 1, N - 1
- TMP = AB( ABOFDPOS, I )
- ABSTMP = ABS( TMP )
- AB( ABOFDPOS, I ) = ABSTMP
- E( I ) = ABSTMP
- IF( ABSTMP.NE.RZERO ) THEN
- TMP = TMP / ABSTMP
- ELSE
- TMP = ONE
- END IF
- IF( I.LT.N-1 )
- $ AB( ABOFDPOS, I+1 ) = AB( ABOFDPOS, I+1 )*TMP
-C IF( WANTQ ) THEN
-C CALL DSCAL( N, TMP, Q( 1, I+1 ), 1 )
-C END IF
- 70 CONTINUE
- ENDIF
-#else
- IF( UPPER ) THEN
DO 60 I = 1, N-1
E( I ) = ( AB( ABOFDPOS, I+1 ) )
60 CONTINUE
@@ -456,8 +406,7 @@ C END IF
E( I ) = ( AB( ABOFDPOS, I ) )
70 CONTINUE
ENDIF
-#endif
- GOTO 200
+ RETURN
END IF
*
* Main code start here.
@@ -590,8 +539,6 @@ C END IF
170 CONTINUE
ENDIF
*
- 200 CONTINUE
-*
HOUS( 1 ) = LHMIN
WORK( 1 ) = LWMIN
RETURN
@@ -599,5 +546,4 @@ C END IF
* End of DSYTRD_SB2ST
*
END
-#undef PRECISION_REAL
diff --git a/SRC/iparam2stage.F b/SRC/iparam2stage.F
index 6443f16e..e725a0ce 100644
--- a/SRC/iparam2stage.F
+++ b/SRC/iparam2stage.F
@@ -199,132 +199,131 @@
!$OMP END PARALLEL
#endif
* WRITE(*,*) 'IPARAM VOICI NTHREADS ISPEC ',NTHREADS, ISPEC
- IF( ISPEC.EQ.19 ) GOTO 19
*
-* Convert NAME to upper case if the first character is lower case.
-*
- IPARAM2STAGE = -1
- SUBNAM = NAME
- IC = ICHAR( SUBNAM( 1: 1 ) )
- IZ = ICHAR( 'Z' )
- IF( IZ.EQ.90 .OR. IZ.EQ.122 ) THEN
-*
-* ASCII character set
-*
- IF( IC.GE.97 .AND. IC.LE.122 ) THEN
- SUBNAM( 1: 1 ) = CHAR( IC-32 )
- DO 100 I = 2, 12
- IC = ICHAR( SUBNAM( I: I ) )
- IF( IC.GE.97 .AND. IC.LE.122 )
- $ SUBNAM( I: I ) = CHAR( IC-32 )
- 100 CONTINUE
+ IF( ISPEC .NE. 19 ) THEN
+*
+* Convert NAME to upper case if the first character is lower case.
+*
+ IPARAM2STAGE = -1
+ SUBNAM = NAME
+ IC = ICHAR( SUBNAM( 1: 1 ) )
+ IZ = ICHAR( 'Z' )
+ IF( IZ.EQ.90 .OR. IZ.EQ.122 ) THEN
+*
+* ASCII character set
+*
+ IF( IC.GE.97 .AND. IC.LE.122 ) THEN
+ SUBNAM( 1: 1 ) = CHAR( IC-32 )
+ DO 100 I = 2, 12
+ IC = ICHAR( SUBNAM( I: I ) )
+ IF( IC.GE.97 .AND. IC.LE.122 )
+ $ SUBNAM( I: I ) = CHAR( IC-32 )
+ 100 CONTINUE
+ END IF
+*
+ ELSE IF( IZ.EQ.233 .OR. IZ.EQ.169 ) THEN
+*
+* EBCDIC character set
+*
+ IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR.
+ $ ( IC.GE.145 .AND. IC.LE.153 ) .OR.
+ $ ( IC.GE.162 .AND. IC.LE.169 ) ) THEN
+ SUBNAM( 1: 1 ) = CHAR( IC+64 )
+ DO 110 I = 2, 12
+ IC = ICHAR( SUBNAM( I: I ) )
+ IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR.
+ $ ( IC.GE.145 .AND. IC.LE.153 ) .OR.
+ $ ( IC.GE.162 .AND. IC.LE.169 ) )SUBNAM( I:
+ $ I ) = CHAR( IC+64 )
+ 110 CONTINUE
+ END IF
+*
+ ELSE IF( IZ.EQ.218 .OR. IZ.EQ.250 ) THEN
+*
+* Prime machines: ASCII+128
+*
+ IF( IC.GE.225 .AND. IC.LE.250 ) THEN
+ SUBNAM( 1: 1 ) = CHAR( IC-32 )
+ DO 120 I = 2, 12
+ IC = ICHAR( SUBNAM( I: I ) )
+ IF( IC.GE.225 .AND. IC.LE.250 )
+ $ SUBNAM( I: I ) = CHAR( IC-32 )
+ 120 CONTINUE
+ END IF
END IF
*
- ELSE IF( IZ.EQ.233 .OR. IZ.EQ.169 ) THEN
-*
-* EBCDIC character set
-*
- IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR.
- $ ( IC.GE.145 .AND. IC.LE.153 ) .OR.
- $ ( IC.GE.162 .AND. IC.LE.169 ) ) THEN
- SUBNAM( 1: 1 ) = CHAR( IC+64 )
- DO 110 I = 2, 12
- IC = ICHAR( SUBNAM( I: I ) )
- IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR.
- $ ( IC.GE.145 .AND. IC.LE.153 ) .OR.
- $ ( IC.GE.162 .AND. IC.LE.169 ) )SUBNAM( I:
- $ I ) = CHAR( IC+64 )
- 110 CONTINUE
- END IF
-*
- ELSE IF( IZ.EQ.218 .OR. IZ.EQ.250 ) THEN
-*
-* Prime machines: ASCII+128
+ PREC = SUBNAM( 1: 1 )
+ ALGO = SUBNAM( 4: 6 )
+ STAG = SUBNAM( 8:12 )
+ RPREC = PREC.EQ.'S' .OR. PREC.EQ.'D'
+ CPREC = PREC.EQ.'C' .OR. PREC.EQ.'Z'
*
- IF( IC.GE.225 .AND. IC.LE.250 ) THEN
- SUBNAM( 1: 1 ) = CHAR( IC-32 )
- DO 120 I = 2, 12
- IC = ICHAR( SUBNAM( I: I ) )
- IF( IC.GE.225 .AND. IC.LE.250 )
- $ SUBNAM( I: I ) = CHAR( IC-32 )
- 120 CONTINUE
- END IF
- END IF
-*
- PREC = SUBNAM( 1: 1 )
- ALGO = SUBNAM( 4: 6 )
- STAG = SUBNAM( 8:12 )
- RPREC = PREC.EQ.'S' .OR. PREC.EQ.'D'
- CPREC = PREC.EQ.'C' .OR. PREC.EQ.'Z'
-*
-* Invalid value for PRECISION
+* Invalid value for PRECISION
*
- IF( .NOT.( RPREC .OR. CPREC ) ) THEN
- IPARAM2STAGE = -1
- RETURN
+ IF( .NOT.( RPREC .OR. CPREC ) ) THEN
+ IPARAM2STAGE = -1
+ RETURN
+ ENDIF
ENDIF
* WRITE(*,*),'RPREC,CPREC ',RPREC,CPREC,
* $ ' ALGO ',ALGO,' STAGE ',STAG
*
- GO TO ( 17, 17, 19, 20, 21 ) ISPEC-16
*
- 17 CONTINUE
+ IF (( ISPEC .EQ. 17 ) .OR. ( ISPEC .EQ. 18 )) THEN
*
* ISPEC = 17, 18: block size KD, IB
* Could be also dependent from N but for now it
* depend only on sequential or parallel
*
- IF( NTHREADS.GT.4 ) THEN
- IF( CPREC ) THEN
- KD = 128
- IB = 32
- ELSE
- KD = 160
- IB = 40
- ENDIF
- ELSE IF( NTHREADS.GT.1 ) THEN
- IF( CPREC ) THEN
- KD = 64
- IB = 32
- ELSE
- KD = 64
- IB = 32
- ENDIF
- ELSE
- IF( CPREC ) THEN
- KD = 16
- IB = 16
- ELSE
- KD = 32
- IB = 16
- ENDIF
- ENDIF
- IF( ISPEC.EQ.17 ) IPARAM2STAGE = KD
- IF( ISPEC.EQ.18 ) IPARAM2STAGE = IB
- RETURN
-*
- 19 CONTINUE
+ IF( NTHREADS.GT.4 ) THEN
+ IF( CPREC ) THEN
+ KD = 128
+ IB = 32
+ ELSE
+ KD = 160
+ IB = 40
+ ENDIF
+ ELSE IF( NTHREADS.GT.1 ) THEN
+ IF( CPREC ) THEN
+ KD = 64
+ IB = 32
+ ELSE
+ KD = 64
+ IB = 32
+ ENDIF
+ ELSE
+ IF( CPREC ) THEN
+ KD = 16
+ IB = 16
+ ELSE
+ KD = 32
+ IB = 16
+ ENDIF
+ ENDIF
+ IF( ISPEC.EQ.17 ) IPARAM2STAGE = KD
+ IF( ISPEC.EQ.18 ) IPARAM2STAGE = IB
+*
+ ELSE IF ( ISPEC .EQ. 19 ) THEN
*
* ISPEC = 19:
* LHOUS length of the Houselholder representation
* matrix (V,T) of the second stage. should be >= 1.
*
* Will add the VECT OPTION HERE next release
- VECT = OPTS(1:1)
- IF( VECT.EQ.'N' ) THEN
- LHOUS = MAX( 1, 4*NI )
- ELSE
-* This is not correct, it need to call the ALGO and the stage2
- LHOUS = MAX( 1, 4*NI ) + IBI
- ENDIF
- IF( LHOUS.GE.0 ) THEN
- IPARAM2STAGE = LHOUS
- ELSE
- IPARAM2STAGE = -1
- ENDIF
- RETURN
-*
- 20 CONTINUE
+ VECT = OPTS(1:1)
+ IF( VECT.EQ.'N' ) THEN
+ LHOUS = MAX( 1, 4*NI )
+ ELSE
+* This is not correct, it need to call the ALGO and the stage2
+ LHOUS = MAX( 1, 4*NI ) + IBI
+ ENDIF
+ IF( LHOUS.GE.0 ) THEN
+ IPARAM2STAGE = LHOUS
+ ELSE
+ IPARAM2STAGE = -1
+ ENDIF
+*
+ ELSE IF ( ISPEC .EQ. 20 ) THEN
*
* ISPEC = 20: (21 for future use)
* LWORK length of the workspace for
@@ -339,49 +338,48 @@
* = N*KD + N*max(KD+1,FACTOPTNB)
* + max(2*KD*KD, KD*NTHREADS)
* + (KD+1)*N
- LWORK = -1
- SUBNAM(1:1) = PREC
- SUBNAM(2:6) = 'GEQRF'
- QROPTNB = ILAENV( 1, SUBNAM, ' ', NI, NBI, -1, -1 )
- SUBNAM(2:6) = 'GELQF'
- LQOPTNB = ILAENV( 1, SUBNAM, ' ', NBI, NI, -1, -1 )
-* Could be QR or LQ for TRD and the max for BRD
- FACTOPTNB = MAX(QROPTNB, LQOPTNB)
- IF( ALGO.EQ.'TRD' ) THEN
- IF( STAG.EQ.'2STAG' ) THEN
- LWORK = NI*NBI + NI*MAX(NBI+1,FACTOPTNB)
+ LWORK = -1
+ SUBNAM(1:1) = PREC
+ SUBNAM(2:6) = 'GEQRF'
+ QROPTNB = ILAENV( 1, SUBNAM, ' ', NI, NBI, -1, -1 )
+ SUBNAM(2:6) = 'GELQF'
+ LQOPTNB = ILAENV( 1, SUBNAM, ' ', NBI, NI, -1, -1 )
+* Could be QR or LQ for TRD and the max for BRD
+ FACTOPTNB = MAX(QROPTNB, LQOPTNB)
+ IF( ALGO.EQ.'TRD' ) THEN
+ IF( STAG.EQ.'2STAG' ) THEN
+ LWORK = NI*NBI + NI*MAX(NBI+1,FACTOPTNB)
$ + MAX(2*NBI*NBI, NBI*NTHREADS)
$ + (NBI+1)*NI
- ELSE IF( (STAG.EQ.'HE2HB').OR.(STAG.EQ.'SY2SB') ) THEN
- LWORK = NI*NBI + NI*MAX(NBI,FACTOPTNB) + 2*NBI*NBI
- ELSE IF( (STAG.EQ.'HB2ST').OR.(STAG.EQ.'SB2ST') ) THEN
- LWORK = (2*NBI+1)*NI + NBI*NTHREADS
- ENDIF
- ELSE IF( ALGO.EQ.'BRD' ) THEN
- IF( STAG.EQ.'2STAG' ) THEN
- LWORK = 2*NI*NBI + NI*MAX(NBI+1,FACTOPTNB)
+ ELSE IF( (STAG.EQ.'HE2HB').OR.(STAG.EQ.'SY2SB') ) THEN
+ LWORK = NI*NBI + NI*MAX(NBI,FACTOPTNB) + 2*NBI*NBI
+ ELSE IF( (STAG.EQ.'HB2ST').OR.(STAG.EQ.'SB2ST') ) THEN
+ LWORK = (2*NBI+1)*NI + NBI*NTHREADS
+ ENDIF
+ ELSE IF( ALGO.EQ.'BRD' ) THEN
+ IF( STAG.EQ.'2STAG' ) THEN
+ LWORK = 2*NI*NBI + NI*MAX(NBI+1,FACTOPTNB)
$ + MAX(2*NBI*NBI, NBI*NTHREADS)
$ + (NBI+1)*NI
- ELSE IF( STAG.EQ.'GE2GB' ) THEN
- LWORK = NI*NBI + NI*MAX(NBI,FACTOPTNB) + 2*NBI*NBI
- ELSE IF( STAG.EQ.'GB2BD' ) THEN
- LWORK = (3*NBI+1)*NI + NBI*NTHREADS
- ENDIF
- ENDIF
- LWORK = MAX ( 1, LWORK )
+ ELSE IF( STAG.EQ.'GE2GB' ) THEN
+ LWORK = NI*NBI + NI*MAX(NBI,FACTOPTNB) + 2*NBI*NBI
+ ELSE IF( STAG.EQ.'GB2BD' ) THEN
+ LWORK = (3*NBI+1)*NI + NBI*NTHREADS
+ ENDIF
+ ENDIF
+ LWORK = MAX ( 1, LWORK )
- IF( LWORK.GT.0 ) THEN
- IPARAM2STAGE = LWORK
- ELSE
- IPARAM2STAGE = -1
- ENDIF
- RETURN
+ IF( LWORK.GT.0 ) THEN
+ IPARAM2STAGE = LWORK
+ ELSE
+ IPARAM2STAGE = -1
+ ENDIF
*
- 21 CONTINUE
+ ELSE IF ( ISPEC .EQ. 21 ) THEN
*
* ISPEC = 21 for future use
- IPARAM2STAGE = NXI
- RETURN
+ IPARAM2STAGE = NXI
+ ENDIF
*
* ==== End of IPARAM2STAGE ====
*
diff --git a/SRC/ssytrd_sb2st.F b/SRC/ssytrd_sb2st.F
index edbcf125..b3e5d69c 100644
--- a/SRC/ssytrd_sb2st.F
+++ b/SRC/ssytrd_sb2st.F
@@ -1,6 +1,4 @@
-*> \brief \b SSBTRD
-*
-* @generated from zhetrd_hb2st.F, fortran z -> s, Sun Nov 6 19:34:06 2016
+*> \brief \b SSYTRD_SB2ST reduces a real symmetric band matrix A to real symmetric tridiagonal form T
*
* =========== DOCUMENTATION ===========
*
@@ -8,12 +6,12 @@
* http://www.netlib.org/lapack/explore-html/
*
*> \htmlonly
-*> Download SSBTRD + dependencies
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ssbtrd.f">
+*> Download SSYTRD_SB2ST + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ssytrd_sb2t.f">
*> [TGZ]</a>
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ssbtrd.f">
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ssytrd_sb2t.f">
*> [ZIP]</a>
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ssbtrd.f">
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ssytrd_sb2t.f">
*> [TXT]</a>
*> \endhtmlonly
*
@@ -23,8 +21,6 @@
* SUBROUTINE SSYTRD_SB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB,
* D, E, HOUS, LHOUS, WORK, LWORK, INFO )
*
-* #define PRECISION_REAL
-*
* #if defined(_OPENMP)
* use omp_lib
* #endif
@@ -46,7 +42,7 @@
*>
*> \verbatim
*>
-*> SSBTRD reduces a real symmetric band matrix A to real symmetric
+*> SSYTRD_SB2ST reduces a real symmetric band matrix A to real symmetric
*> tridiagonal form T by a orthogonal similarity transformation:
*> Q**T * A * Q = T.
*> \endverbatim
@@ -234,15 +230,13 @@
SUBROUTINE SSYTRD_SB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB,
$ D, E, HOUS, LHOUS, WORK, LWORK, INFO )
*
-#define PRECISION_REAL
-*
#if defined(_OPENMP)
use omp_lib
#endif
*
IMPLICIT NONE
*
-* -- LAPACK computational routine (version 3.4.0) --
+* -- LAPACK computational routine (version 3.7.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2016
@@ -274,10 +268,6 @@
$ ABDPOS, ABOFDPOS, DPOS, OFDPOS, AWPOS,
$ INDA, INDW, APOS, SIZEA, LDA, INDV, INDTAU,
$ SISEV, SIZETAU, LDV, LHMIN, LWMIN
-#if defined (PRECISION_COMPLEX)
- REAL ABSTMP
- REAL TMP
-#endif
* ..
* .. External Subroutines ..
EXTERNAL SSB2ST_KERNELS, SLACPY, SLASET
@@ -389,7 +379,7 @@
DO 40 I = 1, N-1
E( I ) = RZERO
40 CONTINUE
- GOTO 200
+ RETURN
END IF
*
* Case KD=1:
@@ -402,52 +392,12 @@
* updating the Q matrix will be required and based if Q is generated
* or not this might complicate the story.
*
-C IF( KD.EQ.1 .AND. N.GT.(KD+1) .AND. AFTERS1 ) THEN
IF( KD.EQ.1 ) THEN
DO 50 I = 1, N
D( I ) = ( AB( ABDPOS, I ) )
50 CONTINUE
-#if defined (PRECISION_COMPLEX)
-*
-* make off-diagonal elements real and copy them to E
*
IF( UPPER ) THEN
- DO 60 I = 1, N - 1
- TMP = AB( ABOFDPOS, I+1 )
- ABSTMP = ABS( TMP )
- AB( ABOFDPOS, I+1 ) = ABSTMP
- E( I ) = ABSTMP
- IF( ABSTMP.NE.RZERO ) THEN
- TMP = TMP / ABSTMP
- ELSE
- TMP = ONE
- END IF
- IF( I.LT.N-1 )
- $ AB( ABOFDPOS, I+2 ) = AB( ABOFDPOS, I+2 )*TMP
-C IF( WANTZ ) THEN
-C CALL SSCAL( N, ( TMP ), Q( 1, I+1 ), 1 )
-C END IF
- 60 CONTINUE
- ELSE
- DO 70 I = 1, N - 1
- TMP = AB( ABOFDPOS, I )
- ABSTMP = ABS( TMP )
- AB( ABOFDPOS, I ) = ABSTMP
- E( I ) = ABSTMP
- IF( ABSTMP.NE.RZERO ) THEN
- TMP = TMP / ABSTMP
- ELSE
- TMP = ONE
- END IF
- IF( I.LT.N-1 )
- $ AB( ABOFDPOS, I+1 ) = AB( ABOFDPOS, I+1 )*TMP
-C IF( WANTQ ) THEN
-C CALL SSCAL( N, TMP, Q( 1, I+1 ), 1 )
-C END IF
- 70 CONTINUE
- ENDIF
-#else
- IF( UPPER ) THEN
DO 60 I = 1, N-1
E( I ) = ( AB( ABOFDPOS, I+1 ) )
60 CONTINUE
@@ -456,8 +406,7 @@ C END IF
E( I ) = ( AB( ABOFDPOS, I ) )
70 CONTINUE
ENDIF
-#endif
- GOTO 200
+ RETURN
END IF
*
* Main code start here.
@@ -590,8 +539,6 @@ C END IF
170 CONTINUE
ENDIF
*
- 200 CONTINUE
-*
HOUS( 1 ) = LHMIN
WORK( 1 ) = LWMIN
RETURN
@@ -599,5 +546,4 @@ C END IF
* End of SSYTRD_SB2ST
*
END
-#undef PRECISION_REAL
diff --git a/SRC/zhetrd_hb2st.F b/SRC/zhetrd_hb2st.F
index 5d62e30d..71419481 100644
--- a/SRC/zhetrd_hb2st.F
+++ b/SRC/zhetrd_hb2st.F
@@ -1,6 +1,4 @@
-*> \brief \b ZHBTRD
-*
-* @precisions fortran z -> s d c
+*> \brief \b ZHETRD_HB2ST reduces a complex Hermitian band matrix A to real symmetric tridiagonal form T
*
* =========== DOCUMENTATION ===========
*
@@ -8,12 +6,12 @@
* http://www.netlib.org/lapack/explore-html/
*
*> \htmlonly
-*> Download ZHBTRD + dependencies
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhbtrd.f">
+*> Download ZHETRD_HB2ST + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhbtrd_hb2st.f">
*> [TGZ]</a>
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhbtrd.f">
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhbtrd_hb2st.f">
*> [ZIP]</a>
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhbtrd.f">
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhbtrd_hb2st.f">
*> [TXT]</a>
*> \endhtmlonly
*
@@ -23,8 +21,6 @@
* SUBROUTINE ZHETRD_HB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB,
* D, E, HOUS, LHOUS, WORK, LWORK, INFO )
*
-* #define PRECISION_COMPLEX
-*
* #if defined(_OPENMP)
* use omp_lib
* #endif
@@ -46,7 +42,7 @@
*>
*> \verbatim
*>
-*> ZHBTRD reduces a complex Hermitian band matrix A to real symmetric
+*> ZHETRD_HB2ST reduces a complex Hermitian band matrix A to real symmetric
*> tridiagonal form T by a unitary similarity transformation:
*> Q**H * A * Q = T.
*> \endverbatim
@@ -234,7 +230,6 @@
SUBROUTINE ZHETRD_HB2ST( STAGE1, VECT, UPLO, N, KD, AB, LDAB,
$ D, E, HOUS, LHOUS, WORK, LWORK, INFO )
*
-#define PRECISION_COMPLEX
*
#if defined(_OPENMP)
use omp_lib
@@ -242,7 +237,7 @@
*
IMPLICIT NONE
*
-* -- LAPACK computational routine (version 3.4.0) --
+* -- LAPACK computational routine (version 3.7.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2016
@@ -274,10 +269,8 @@
$ ABDPOS, ABOFDPOS, DPOS, OFDPOS, AWPOS,
$ INDA, INDW, APOS, SIZEA, LDA, INDV, INDTAU,
$ SIZEV, SIZETAU, LDV, LHMIN, LWMIN
-#if defined (PRECISION_COMPLEX)
DOUBLE PRECISION ABSTMP
COMPLEX*16 TMP
-#endif
* ..
* .. External Subroutines ..
EXTERNAL ZHB2ST_KERNELS, ZLACPY, ZLASET
@@ -389,7 +382,7 @@
DO 40 I = 1, N-1
E( I ) = RZERO
40 CONTINUE
- GOTO 200
+ RETURN
END IF
*
* Case KD=1:
@@ -402,12 +395,10 @@
* updating the Q matrix will be required and based if Q is generated
* or not this might complicate the story.
*
-C IF( KD.EQ.1 .AND. N.GT.(KD+1) .AND. AFTERS1 ) THEN
IF( KD.EQ.1 ) THEN
DO 50 I = 1, N
D( I ) = DBLE( AB( ABDPOS, I ) )
50 CONTINUE
-#if defined (PRECISION_COMPLEX)
*
* make off-diagonal elements real and copy them to E
*
@@ -446,18 +437,7 @@ C CALL ZSCAL( N, TMP, Q( 1, I+1 ), 1 )
C END IF
70 CONTINUE
ENDIF
-#else
- IF( UPPER ) THEN
- DO 60 I = 1, N-1
- E( I ) = DBLE( AB( ABOFDPOS, I+1 ) )
- 60 CONTINUE
- ELSE
- DO 70 I = 1, N-1
- E( I ) = DBLE( AB( ABOFDPOS, I ) )
- 70 CONTINUE
- ENDIF
-#endif
- GOTO 200
+ RETURN
END IF
*
* Main code start here.
@@ -590,8 +570,6 @@ C END IF
170 CONTINUE
ENDIF
*
- 200 CONTINUE
-*
HOUS( 1 ) = LHMIN
WORK( 1 ) = LWMIN
RETURN
@@ -599,5 +577,4 @@ C END IF
* End of ZHETRD_HB2ST
*
END
-#undef PRECISION_COMPLEX