Skip to content

Commit d6326d7

Browse files
committed
Fixing 2stage lapacke
Thank you @haidarazzam
1 parent 4229de1 commit d6326d7

23 files changed

+162
-162
lines changed

LAPACKE/src/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ lapacke_cheevd_2stage_work.c
194194
lapacke_cheevr_2stage.c
195195
lapacke_cheevr_2stage_work.c
196196
lapacke_cheevx_2stage.c
197-
lapacke_cheevx_work.c
197+
lapacke_cheevx_2stage_work.c
198198
lapacke_chegst.c
199199
lapacke_chegst_work.c
200200
lapacke_chegv.c

LAPACKE/src/lapacke_cheevd_2stage.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
2727
THE POSSIBILITY OF SUCH DAMAGE.
2828
*****************************************************************************
29-
* Contents: Native high-level C interface to LAPACK function cheevd
29+
* Contents: Native high-level C interface to LAPACK function cheevd_2stage
3030
* Author: Intel Corporation
3131
* Generated November 2015
3232
*****************************************************************************/
3333

3434
#include "lapacke_utils.h"
3535

36-
lapack_int LAPACKE_cheevd( int matrix_layout, char jobz, char uplo, lapack_int n,
36+
lapack_int LAPACKE_cheevd_2stage( int matrix_layout, char jobz, char uplo, lapack_int n,
3737
lapack_complex_float* a, lapack_int lda, float* w )
3838
{
3939
lapack_int info = 0;
@@ -47,7 +47,7 @@ lapack_int LAPACKE_cheevd( int matrix_layout, char jobz, char uplo, lapack_int n
4747
float rwork_query;
4848
lapack_complex_float work_query;
4949
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
50-
LAPACKE_xerbla( "LAPACKE_cheevd", -1 );
50+
LAPACKE_xerbla( "LAPACKE_cheevd_2stage", -1 );
5151
return -1;
5252
}
5353
#ifndef LAPACK_DISABLE_NAN_CHECK
@@ -57,7 +57,7 @@ lapack_int LAPACKE_cheevd( int matrix_layout, char jobz, char uplo, lapack_int n
5757
}
5858
#endif
5959
/* Query optimal working array(s) size */
60-
info = LAPACKE_cheevd_work( matrix_layout, jobz, uplo, n, a, lda, w,
60+
info = LAPACKE_cheevd_2stage_work( matrix_layout, jobz, uplo, n, a, lda, w,
6161
&work_query, lwork, &rwork_query, lrwork,
6262
&iwork_query, liwork );
6363
if( info != 0 ) {
@@ -84,7 +84,7 @@ lapack_int LAPACKE_cheevd( int matrix_layout, char jobz, char uplo, lapack_int n
8484
goto exit_level_2;
8585
}
8686
/* Call middle-level interface */
87-
info = LAPACKE_cheevd_work( matrix_layout, jobz, uplo, n, a, lda, w, work,
87+
info = LAPACKE_cheevd_2stage_work( matrix_layout, jobz, uplo, n, a, lda, w, work,
8888
lwork, rwork, lrwork, iwork, liwork );
8989
/* Release memory and exit */
9090
LAPACKE_free( work );
@@ -94,7 +94,7 @@ lapack_int LAPACKE_cheevd( int matrix_layout, char jobz, char uplo, lapack_int n
9494
LAPACKE_free( iwork );
9595
exit_level_0:
9696
if( info == LAPACK_WORK_MEMORY_ERROR ) {
97-
LAPACKE_xerbla( "LAPACKE_cheevd", info );
97+
LAPACKE_xerbla( "LAPACKE_cheevd_2stage", info );
9898
}
9999
return info;
100100
}

LAPACKE/src/lapacke_cheevd_2stage_work.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
2727
THE POSSIBILITY OF SUCH DAMAGE.
2828
*****************************************************************************
29-
* Contents: Native middle-level C interface to LAPACK function cheevd
29+
* Contents: Native middle-level C interface to LAPACK function cheevd_2stage
3030
* Author: Intel Corporation
3131
* Generated November 2015
3232
*****************************************************************************/
3333

3434
#include "lapacke_utils.h"
3535

36-
lapack_int LAPACKE_cheevd_work( int matrix_layout, char jobz, char uplo,
36+
lapack_int LAPACKE_cheevd_2stage_work( int matrix_layout, char jobz, char uplo,
3737
lapack_int n, lapack_complex_float* a,
3838
lapack_int lda, float* w,
3939
lapack_complex_float* work, lapack_int lwork,
@@ -43,7 +43,7 @@ lapack_int LAPACKE_cheevd_work( int matrix_layout, char jobz, char uplo,
4343
lapack_int info = 0;
4444
if( matrix_layout == LAPACK_COL_MAJOR ) {
4545
/* Call LAPACK function and adjust info */
46-
LAPACK_cheevd( &jobz, &uplo, &n, a, &lda, w, work, &lwork, rwork,
46+
LAPACK_cheevd_2stage( &jobz, &uplo, &n, a, &lda, w, work, &lwork, rwork,
4747
&lrwork, iwork, &liwork, &info );
4848
if( info < 0 ) {
4949
info = info - 1;
@@ -54,12 +54,12 @@ lapack_int LAPACKE_cheevd_work( int matrix_layout, char jobz, char uplo,
5454
/* Check leading dimension(s) */
5555
if( lda < n ) {
5656
info = -6;
57-
LAPACKE_xerbla( "LAPACKE_cheevd_work", info );
57+
LAPACKE_xerbla( "LAPACKE_cheevd_2stage_work", info );
5858
return info;
5959
}
6060
/* Query optimal working array(s) size if requested */
6161
if( liwork == -1 || lrwork == -1 || lwork == -1 ) {
62-
LAPACK_cheevd( &jobz, &uplo, &n, a, &lda_t, w, work, &lwork, rwork,
62+
LAPACK_cheevd_2stage( &jobz, &uplo, &n, a, &lda_t, w, work, &lwork, rwork,
6363
&lrwork, iwork, &liwork, &info );
6464
return (info < 0) ? (info - 1) : info;
6565
}
@@ -73,7 +73,7 @@ lapack_int LAPACKE_cheevd_work( int matrix_layout, char jobz, char uplo,
7373
/* Transpose input matrices */
7474
LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
7575
/* Call LAPACK function and adjust info */
76-
LAPACK_cheevd( &jobz, &uplo, &n, a_t, &lda_t, w, work, &lwork, rwork,
76+
LAPACK_cheevd_2stage( &jobz, &uplo, &n, a_t, &lda_t, w, work, &lwork, rwork,
7777
&lrwork, iwork, &liwork, &info );
7878
if( info < 0 ) {
7979
info = info - 1;
@@ -84,11 +84,11 @@ lapack_int LAPACKE_cheevd_work( int matrix_layout, char jobz, char uplo,
8484
LAPACKE_free( a_t );
8585
exit_level_0:
8686
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
87-
LAPACKE_xerbla( "LAPACKE_cheevd_work", info );
87+
LAPACKE_xerbla( "LAPACKE_cheevd_2stage_work", info );
8888
}
8989
} else {
9090
info = -1;
91-
LAPACKE_xerbla( "LAPACKE_cheevd_work", info );
91+
LAPACKE_xerbla( "LAPACKE_cheevd_2stage_work", info );
9292
}
9393
return info;
9494
}

LAPACKE/src/lapacke_cheevx_2stage.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
2727
THE POSSIBILITY OF SUCH DAMAGE.
2828
*****************************************************************************
29-
* Contents: Native high-level C interface to LAPACK function cheevx
29+
* Contents: Native high-level C interface to LAPACK function cheevx_2stage
3030
* Author: Intel Corporation
3131
* Generated November 2015
3232
*****************************************************************************/
3333

3434
#include "lapacke_utils.h"
3535

36-
lapack_int LAPACKE_cheevx( int matrix_layout, char jobz, char range, char uplo,
36+
lapack_int LAPACKE_cheevx_2stage( int matrix_layout, char jobz, char range, char uplo,
3737
lapack_int n, lapack_complex_float* a,
3838
lapack_int lda, float vl, float vu, lapack_int il,
3939
lapack_int iu, float abstol, lapack_int* m, float* w,
@@ -47,7 +47,7 @@ lapack_int LAPACKE_cheevx( int matrix_layout, char jobz, char range, char uplo,
4747
lapack_complex_float* work = NULL;
4848
lapack_complex_float work_query;
4949
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
50-
LAPACKE_xerbla( "LAPACKE_cheevx", -1 );
50+
LAPACKE_xerbla( "LAPACKE_cheevx_2stage", -1 );
5151
return -1;
5252
}
5353
#ifndef LAPACK_DISABLE_NAN_CHECK
@@ -81,7 +81,7 @@ lapack_int LAPACKE_cheevx( int matrix_layout, char jobz, char range, char uplo,
8181
goto exit_level_1;
8282
}
8383
/* Query optimal working array(s) size */
84-
info = LAPACKE_cheevx_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
84+
info = LAPACKE_cheevx_2stage_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
8585
vu, il, iu, abstol, m, w, z, ldz, &work_query,
8686
lwork, rwork, iwork, ifail );
8787
if( info != 0 ) {
@@ -96,7 +96,7 @@ lapack_int LAPACKE_cheevx( int matrix_layout, char jobz, char range, char uplo,
9696
goto exit_level_2;
9797
}
9898
/* Call middle-level interface */
99-
info = LAPACKE_cheevx_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
99+
info = LAPACKE_cheevx_2stage_work( matrix_layout, jobz, range, uplo, n, a, lda, vl,
100100
vu, il, iu, abstol, m, w, z, ldz, work, lwork,
101101
rwork, iwork, ifail );
102102
/* Release memory and exit */
@@ -107,7 +107,7 @@ lapack_int LAPACKE_cheevx( int matrix_layout, char jobz, char range, char uplo,
107107
LAPACKE_free( iwork );
108108
exit_level_0:
109109
if( info == LAPACK_WORK_MEMORY_ERROR ) {
110-
LAPACKE_xerbla( "LAPACKE_cheevx", info );
110+
LAPACKE_xerbla( "LAPACKE_cheevx_2stage", info );
111111
}
112112
return info;
113113
}

LAPACKE/src/lapacke_cheevx_2stage_work.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
2727
THE POSSIBILITY OF SUCH DAMAGE.
2828
*****************************************************************************
29-
* Contents: Native middle-level C interface to LAPACK function cheevx
29+
* Contents: Native middle-level C interface to LAPACK function cheevx_2stage
3030
* Author: Intel Corporation
3131
* Generated November 2015
3232
*****************************************************************************/
3333

3434
#include "lapacke_utils.h"
3535

36-
lapack_int LAPACKE_cheevx_work( int matrix_layout, char jobz, char range,
36+
lapack_int LAPACKE_cheevx_2stage_work( int matrix_layout, char jobz, char range,
3737
char uplo, lapack_int n,
3838
lapack_complex_float* a, lapack_int lda,
3939
float vl, float vu, lapack_int il,
@@ -46,7 +46,7 @@ lapack_int LAPACKE_cheevx_work( int matrix_layout, char jobz, char range,
4646
lapack_int info = 0;
4747
if( matrix_layout == LAPACK_COL_MAJOR ) {
4848
/* Call LAPACK function and adjust info */
49-
LAPACK_cheevx( &jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu,
49+
LAPACK_cheevx_2stage( &jobz, &range, &uplo, &n, a, &lda, &vl, &vu, &il, &iu,
5050
&abstol, m, w, z, &ldz, work, &lwork, rwork, iwork,
5151
ifail, &info );
5252
if( info < 0 ) {
@@ -63,17 +63,17 @@ lapack_int LAPACKE_cheevx_work( int matrix_layout, char jobz, char range,
6363
/* Check leading dimension(s) */
6464
if( lda < n ) {
6565
info = -7;
66-
LAPACKE_xerbla( "LAPACKE_cheevx_work", info );
66+
LAPACKE_xerbla( "LAPACKE_cheevx_2stage_work", info );
6767
return info;
6868
}
6969
if( ldz < ncols_z ) {
7070
info = -16;
71-
LAPACKE_xerbla( "LAPACKE_cheevx_work", info );
71+
LAPACKE_xerbla( "LAPACKE_cheevx_2stage_work", info );
7272
return info;
7373
}
7474
/* Query optimal working array(s) size if requested */
7575
if( lwork == -1 ) {
76-
LAPACK_cheevx( &jobz, &range, &uplo, &n, a, &lda_t, &vl, &vu, &il,
76+
LAPACK_cheevx_2stage( &jobz, &range, &uplo, &n, a, &lda_t, &vl, &vu, &il,
7777
&iu, &abstol, m, w, z, &ldz_t, work, &lwork, rwork,
7878
iwork, ifail, &info );
7979
return (info < 0) ? (info - 1) : info;
@@ -97,7 +97,7 @@ lapack_int LAPACKE_cheevx_work( int matrix_layout, char jobz, char range,
9797
/* Transpose input matrices */
9898
LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
9999
/* Call LAPACK function and adjust info */
100-
LAPACK_cheevx( &jobz, &range, &uplo, &n, a_t, &lda_t, &vl, &vu, &il,
100+
LAPACK_cheevx_2stage( &jobz, &range, &uplo, &n, a_t, &lda_t, &vl, &vu, &il,
101101
&iu, &abstol, m, w, z_t, &ldz_t, work, &lwork, rwork,
102102
iwork, ifail, &info );
103103
if( info < 0 ) {
@@ -117,11 +117,11 @@ lapack_int LAPACKE_cheevx_work( int matrix_layout, char jobz, char range,
117117
LAPACKE_free( a_t );
118118
exit_level_0:
119119
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
120-
LAPACKE_xerbla( "LAPACKE_cheevx_work", info );
120+
LAPACKE_xerbla( "LAPACKE_cheevx_2stage_work", info );
121121
}
122122
} else {
123123
info = -1;
124-
LAPACKE_xerbla( "LAPACKE_cheevx_work", info );
124+
LAPACKE_xerbla( "LAPACKE_cheevx_2stage_work", info );
125125
}
126126
return info;
127127
}

LAPACKE/src/lapacke_chegv_2stage.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
2727
THE POSSIBILITY OF SUCH DAMAGE.
2828
*****************************************************************************
29-
* Contents: Native high-level C interface to LAPACK function chegv
29+
* Contents: Native high-level C interface to LAPACK function chegv_2stage
3030
* Author: Intel Corporation
3131
* Generated November 2015
3232
*****************************************************************************/
3333

3434
#include "lapacke_utils.h"
3535

36-
lapack_int LAPACKE_chegv( int matrix_layout, lapack_int itype, char jobz,
36+
lapack_int LAPACKE_chegv_2stage( int matrix_layout, lapack_int itype, char jobz,
3737
char uplo, lapack_int n, lapack_complex_float* a,
3838
lapack_int lda, lapack_complex_float* b,
3939
lapack_int ldb, float* w )
@@ -44,7 +44,7 @@ lapack_int LAPACKE_chegv( int matrix_layout, lapack_int itype, char jobz,
4444
lapack_complex_float* work = NULL;
4545
lapack_complex_float work_query;
4646
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
47-
LAPACKE_xerbla( "LAPACKE_chegv", -1 );
47+
LAPACKE_xerbla( "LAPACKE_chegv_2stage", -1 );
4848
return -1;
4949
}
5050
#ifndef LAPACK_DISABLE_NAN_CHECK
@@ -63,7 +63,7 @@ lapack_int LAPACKE_chegv( int matrix_layout, lapack_int itype, char jobz,
6363
goto exit_level_0;
6464
}
6565
/* Query optimal working array(s) size */
66-
info = LAPACKE_chegv_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
66+
info = LAPACKE_chegv_2stage_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
6767
ldb, w, &work_query, lwork, rwork );
6868
if( info != 0 ) {
6969
goto exit_level_1;
@@ -77,15 +77,15 @@ lapack_int LAPACKE_chegv( int matrix_layout, lapack_int itype, char jobz,
7777
goto exit_level_1;
7878
}
7979
/* Call middle-level interface */
80-
info = LAPACKE_chegv_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
80+
info = LAPACKE_chegv_2stage_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
8181
ldb, w, work, lwork, rwork );
8282
/* Release memory and exit */
8383
LAPACKE_free( work );
8484
exit_level_1:
8585
LAPACKE_free( rwork );
8686
exit_level_0:
8787
if( info == LAPACK_WORK_MEMORY_ERROR ) {
88-
LAPACKE_xerbla( "LAPACKE_chegv", info );
88+
LAPACKE_xerbla( "LAPACKE_chegv_2stage", info );
8989
}
9090
return info;
9191
}

LAPACKE/src/lapacke_chegv_2stage_work.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
2727
THE POSSIBILITY OF SUCH DAMAGE.
2828
*****************************************************************************
29-
* Contents: Native middle-level C interface to LAPACK function chegv
29+
* Contents: Native middle-level C interface to LAPACK function chegv_2stage
3030
* Author: Intel Corporation
3131
* Generated November 2015
3232
*****************************************************************************/
3333

3434
#include "lapacke_utils.h"
3535

36-
lapack_int LAPACKE_chegv_work( int matrix_layout, lapack_int itype, char jobz,
36+
lapack_int LAPACKE_chegv_2stage_work( int matrix_layout, lapack_int itype, char jobz,
3737
char uplo, lapack_int n, lapack_complex_float* a,
3838
lapack_int lda, lapack_complex_float* b,
3939
lapack_int ldb, float* w,
@@ -43,7 +43,7 @@ lapack_int LAPACKE_chegv_work( int matrix_layout, lapack_int itype, char jobz,
4343
lapack_int info = 0;
4444
if( matrix_layout == LAPACK_COL_MAJOR ) {
4545
/* Call LAPACK function and adjust info */
46-
LAPACK_chegv( &itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work,
46+
LAPACK_chegv_2stage( &itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work,
4747
&lwork, rwork, &info );
4848
if( info < 0 ) {
4949
info = info - 1;
@@ -56,17 +56,17 @@ lapack_int LAPACKE_chegv_work( int matrix_layout, lapack_int itype, char jobz,
5656
/* Check leading dimension(s) */
5757
if( lda < n ) {
5858
info = -7;
59-
LAPACKE_xerbla( "LAPACKE_chegv_work", info );
59+
LAPACKE_xerbla( "LAPACKE_chegv_2stage_work", info );
6060
return info;
6161
}
6262
if( ldb < n ) {
6363
info = -9;
64-
LAPACKE_xerbla( "LAPACKE_chegv_work", info );
64+
LAPACKE_xerbla( "LAPACKE_chegv_2stage_work", info );
6565
return info;
6666
}
6767
/* Query optimal working array(s) size if requested */
6868
if( lwork == -1 ) {
69-
LAPACK_chegv( &itype, &jobz, &uplo, &n, a, &lda_t, b, &ldb_t, w,
69+
LAPACK_chegv_2stage( &itype, &jobz, &uplo, &n, a, &lda_t, b, &ldb_t, w,
7070
work, &lwork, rwork, &info );
7171
return (info < 0) ? (info - 1) : info;
7272
}
@@ -87,7 +87,7 @@ lapack_int LAPACKE_chegv_work( int matrix_layout, lapack_int itype, char jobz,
8787
LAPACKE_cge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
8888
LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t );
8989
/* Call LAPACK function and adjust info */
90-
LAPACK_chegv( &itype, &jobz, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, w,
90+
LAPACK_chegv_2stage( &itype, &jobz, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, w,
9191
work, &lwork, rwork, &info );
9292
if( info < 0 ) {
9393
info = info - 1;
@@ -101,11 +101,11 @@ lapack_int LAPACKE_chegv_work( int matrix_layout, lapack_int itype, char jobz,
101101
LAPACKE_free( a_t );
102102
exit_level_0:
103103
if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
104-
LAPACKE_xerbla( "LAPACKE_chegv_work", info );
104+
LAPACKE_xerbla( "LAPACKE_chegv_2stage_work", info );
105105
}
106106
} else {
107107
info = -1;
108-
LAPACKE_xerbla( "LAPACKE_chegv_work", info );
108+
LAPACKE_xerbla( "LAPACKE_chegv_2stage_work", info );
109109
}
110110
return info;
111111
}

0 commit comments

Comments
 (0)