Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes from MKL team in LAPACKE interfaces #534

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions LAPACKE/include/lapack.h
Original file line number Diff line number Diff line change
Expand Up @@ -4819,15 +4819,15 @@ void LAPACK_chegst(
lapack_int const* itype, char const* uplo,
lapack_int const* n,
lapack_complex_float* A, lapack_int const* lda,
lapack_complex_float* B, lapack_int const* ldb,
const lapack_complex_float* B, lapack_int const* ldb,
lapack_int* info );

#define LAPACK_zhegst LAPACK_GLOBAL(zhegst,ZHEGST)
void LAPACK_zhegst(
lapack_int const* itype, char const* uplo,
lapack_int const* n,
lapack_complex_double* A, lapack_int const* lda,
lapack_complex_double* B, lapack_int const* ldb,
const lapack_complex_double* B, lapack_int const* ldb,
lapack_int* info );

#define LAPACK_chegv LAPACK_GLOBAL(chegv,CHEGV)
Expand Down Expand Up @@ -11625,7 +11625,7 @@ void LAPACK_zsytrs(
void LAPACK_csytrs2(
char const* uplo,
lapack_int const* n, lapack_int const* nrhs,
lapack_complex_float* A, lapack_int const* lda, lapack_int const* ipiv,
const lapack_complex_float* A, lapack_int const* lda, lapack_int const* ipiv,
lapack_complex_float* B, lapack_int const* ldb,
lapack_complex_float* work,
lapack_int* info );
Expand All @@ -11634,7 +11634,7 @@ void LAPACK_csytrs2(
void LAPACK_dsytrs2(
char const* uplo,
lapack_int const* n, lapack_int const* nrhs,
double* A, lapack_int const* lda, lapack_int const* ipiv,
const double* A, lapack_int const* lda, lapack_int const* ipiv,
double* B, lapack_int const* ldb,
double* work,
lapack_int* info );
Expand All @@ -11643,7 +11643,7 @@ void LAPACK_dsytrs2(
void LAPACK_ssytrs2(
char const* uplo,
lapack_int const* n, lapack_int const* nrhs,
float* A, lapack_int const* lda, lapack_int const* ipiv,
const float* A, lapack_int const* lda, lapack_int const* ipiv,
float* B, lapack_int const* ldb,
float* work,
lapack_int* info );
Expand All @@ -11652,7 +11652,7 @@ void LAPACK_ssytrs2(
void LAPACK_zsytrs2(
char const* uplo,
lapack_int const* n, lapack_int const* nrhs,
lapack_complex_double* A, lapack_int const* lda, lapack_int const* ipiv,
const lapack_complex_double* A, lapack_int const* lda, lapack_int const* ipiv,
lapack_complex_double* B, lapack_int const* ldb,
lapack_complex_double* work,
lapack_int* info );
Expand Down
24 changes: 12 additions & 12 deletions LAPACKE/include/lapacke.h
Original file line number Diff line number Diff line change
Expand Up @@ -1866,11 +1866,11 @@ lapack_int LAPACKE_zheevx( int matrix_layout, char jobz, char range, char uplo,

lapack_int LAPACKE_chegst( int matrix_layout, lapack_int itype, char uplo,
lapack_int n, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* b,
lapack_int lda, const lapack_complex_float* b,
lapack_int ldb );
lapack_int LAPACKE_zhegst( int matrix_layout, lapack_int itype, char uplo,
lapack_int n, lapack_complex_double* a,
lapack_int lda, lapack_complex_double* b,
lapack_int lda, const lapack_complex_double* b,
lapack_int ldb );

lapack_int LAPACKE_chegv( int matrix_layout, lapack_int itype, char jobz,
Expand Down Expand Up @@ -6949,11 +6949,11 @@ lapack_int LAPACKE_zheevx_work( int matrix_layout, char jobz, char range,

lapack_int LAPACKE_chegst_work( int matrix_layout, lapack_int itype, char uplo,
lapack_int n, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* b,
lapack_int lda, const lapack_complex_float* b,
lapack_int ldb );
lapack_int LAPACKE_zhegst_work( int matrix_layout, lapack_int itype, char uplo,
lapack_int n, lapack_complex_double* a,
lapack_int lda, lapack_complex_double* b,
lapack_int lda, const lapack_complex_double* b,
lapack_int ldb );

lapack_int LAPACKE_chegv_work( int matrix_layout, lapack_int itype, char jobz,
Expand Down Expand Up @@ -10596,11 +10596,11 @@ lapack_int LAPACKE_csytri2x_work( int matrix_layout, char uplo, lapack_int n,
const lapack_int* ipiv,
lapack_complex_float* work, lapack_int nb );
lapack_int LAPACKE_csytrs2( int matrix_layout, char uplo, lapack_int n,
lapack_int nrhs, lapack_complex_float* a,
lapack_int nrhs, const lapack_complex_float* a,
lapack_int lda, const lapack_int* ipiv,
lapack_complex_float* b, lapack_int ldb );
lapack_int LAPACKE_csytrs2_work( int matrix_layout, char uplo, lapack_int n,
lapack_int nrhs, lapack_complex_float* a,
lapack_int nrhs, const lapack_complex_float* a,
lapack_int lda, const lapack_int* ipiv,
lapack_complex_float* b, lapack_int ldb,
lapack_complex_float* work );
Expand Down Expand Up @@ -10761,10 +10761,10 @@ lapack_int LAPACKE_dsytri2x_work( int matrix_layout, char uplo, lapack_int n,
const lapack_int* ipiv, double* work,
lapack_int nb );
lapack_int LAPACKE_dsytrs2( int matrix_layout, char uplo, lapack_int n,
lapack_int nrhs, double* a, lapack_int lda,
lapack_int nrhs, const double* a, lapack_int lda,
const lapack_int* ipiv, double* b, lapack_int ldb );
lapack_int LAPACKE_dsytrs2_work( int matrix_layout, char uplo, lapack_int n,
lapack_int nrhs, double* a,
lapack_int nrhs, const double* a,
lapack_int lda, const lapack_int* ipiv,
double* b, lapack_int ldb, double* work );
lapack_int LAPACKE_sbbcsd( int matrix_layout, char jobu1, char jobu2,
Expand Down Expand Up @@ -10856,10 +10856,10 @@ lapack_int LAPACKE_ssytri2x_work( int matrix_layout, char uplo, lapack_int n,
const lapack_int* ipiv, float* work,
lapack_int nb );
lapack_int LAPACKE_ssytrs2( int matrix_layout, char uplo, lapack_int n,
lapack_int nrhs, float* a, lapack_int lda,
lapack_int nrhs, const float* a, lapack_int lda,
const lapack_int* ipiv, float* b, lapack_int ldb );
lapack_int LAPACKE_ssytrs2_work( int matrix_layout, char uplo, lapack_int n,
lapack_int nrhs, float* a,
lapack_int nrhs, const float* a,
lapack_int lda, const lapack_int* ipiv,
float* b, lapack_int ldb, float* work );
lapack_int LAPACKE_zbbcsd( int matrix_layout, char jobu1, char jobu2,
Expand Down Expand Up @@ -10941,11 +10941,11 @@ lapack_int LAPACKE_zsytri2x_work( int matrix_layout, char uplo, lapack_int n,
const lapack_int* ipiv,
lapack_complex_double* work, lapack_int nb );
lapack_int LAPACKE_zsytrs2( int matrix_layout, char uplo, lapack_int n,
lapack_int nrhs, lapack_complex_double* a,
lapack_int nrhs, const lapack_complex_double* a,
lapack_int lda, const lapack_int* ipiv,
lapack_complex_double* b, lapack_int ldb );
lapack_int LAPACKE_zsytrs2_work( int matrix_layout, char uplo, lapack_int n,
lapack_int nrhs, lapack_complex_double* a,
lapack_int nrhs, const lapack_complex_double* a,
lapack_int lda, const lapack_int* ipiv,
lapack_complex_double* b, lapack_int ldb,
lapack_complex_double* work );
Expand Down
5 changes: 4 additions & 1 deletion LAPACKE/src/lapacke_cgesvd_work.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cgesvd
* Author: Intel Corporation
* Generated November 2015
*****************************************************************************/

#include "lapacke_utils.h"
Expand Down Expand Up @@ -55,6 +56,8 @@ lapack_int LAPACKE_cgesvd_work( int matrix_layout, char jobu, char jobvt,
( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1);
lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n :
( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1);
lapack_int ncols_vt = ( LAPACKE_lsame( jobvt, 'a' ) ||
LAPACKE_lsame( jobvt, 's' ) ) ? n : 1;
lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nrows_u);
lapack_int ldvt_t = MAX(1,nrows_vt);
Expand All @@ -72,7 +75,7 @@ lapack_int LAPACKE_cgesvd_work( int matrix_layout, char jobu, char jobvt,
LAPACKE_xerbla( "LAPACKE_cgesvd_work", info );
return info;
}
if( ldvt < n ) {
if( ldvt < ncols_vt ) {
info = -12;
LAPACKE_xerbla( "LAPACKE_cgesvd_work", info );
return info;
Expand Down
3 changes: 2 additions & 1 deletion LAPACKE/src/lapacke_cheev_work.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cheev
* Author: Intel Corporation
* Generated November 2015
*****************************************************************************/

#include "lapacke_utils.h"
Expand Down Expand Up @@ -77,7 +78,7 @@ lapack_int LAPACKE_cheev_work( int matrix_layout, char jobz, char uplo,
info = info - 1;
}
/* Transpose output matrices */
if ( jobz == 'V') {
if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
Expand Down
3 changes: 2 additions & 1 deletion LAPACKE/src/lapacke_cheevd_2stage_work.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cheevd_2stage
* Author: Intel Corporation
* Generated December 2016
*****************************************************************************/

#include "lapacke_utils.h"
Expand Down Expand Up @@ -78,7 +79,7 @@ lapack_int LAPACKE_cheevd_2stage_work( int matrix_layout, char jobz, char uplo,
info = info - 1;
}
/* Transpose output matrices */
if ( jobz == 'V') {
if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
Expand Down
3 changes: 2 additions & 1 deletion LAPACKE/src/lapacke_cheevd_work.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cheevd
* Author: Intel Corporation
* Generated November 2015
*****************************************************************************/

#include "lapacke_utils.h"
Expand Down Expand Up @@ -78,7 +79,7 @@ lapack_int LAPACKE_cheevd_work( int matrix_layout, char jobz, char uplo,
info = info - 1;
}
/* Transpose output matrices */
if ( jobz == 'V') {
if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
Expand Down
5 changes: 3 additions & 2 deletions LAPACKE/src/lapacke_chegst.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function chegst
* Author: Intel Corporation
* Generated November 2015
*****************************************************************************/

#include "lapacke_utils.h"

lapack_int LAPACKE_chegst( int matrix_layout, lapack_int itype, char uplo,
lapack_int n, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* b,
lapack_int lda, const lapack_complex_float* b,
lapack_int ldb )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
Expand All @@ -47,7 +48,7 @@ lapack_int LAPACKE_chegst( int matrix_layout, lapack_int itype, char uplo,
if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -5;
}
if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
if( LAPACKE_che_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -7;
}
}
Expand Down
3 changes: 2 additions & 1 deletion LAPACKE/src/lapacke_chegst_work.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function chegst
* Author: Intel Corporation
* Generated November 2015
*****************************************************************************/

#include "lapacke_utils.h"

lapack_int LAPACKE_chegst_work( int matrix_layout, lapack_int itype, char uplo,
lapack_int n, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* b,
lapack_int lda, const lapack_complex_float* b,
lapack_int ldb )
{
lapack_int info = 0;
Expand Down
5 changes: 3 additions & 2 deletions LAPACKE/src/lapacke_chegv.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function chegv
* Author: Intel Corporation
* Generated November 2015
*****************************************************************************/

#include "lapacke_utils.h"
Expand All @@ -49,10 +50,10 @@ lapack_int LAPACKE_chegv( int matrix_layout, lapack_int itype, char jobz,
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
if( LAPACKE_che_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
Expand Down
5 changes: 3 additions & 2 deletions LAPACKE/src/lapacke_chegv_2stage.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function chegv_2stage
* Author: Intel Corporation
* Generated December 2016
*****************************************************************************/

#include "lapacke_utils.h"
Expand All @@ -49,10 +50,10 @@ lapack_int LAPACKE_chegv_2stage( int matrix_layout, lapack_int itype, char jobz,
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
if( LAPACKE_che_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
Expand Down
5 changes: 3 additions & 2 deletions LAPACKE/src/lapacke_chegvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function chegvd
* Author: Intel Corporation
* Generated November 2015
*****************************************************************************/

#include "lapacke_utils.h"
Expand All @@ -54,10 +55,10 @@ lapack_int LAPACKE_chegvd( int matrix_layout, lapack_int itype, char jobz,
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
if( LAPACKE_che_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
Expand Down
3 changes: 2 additions & 1 deletion LAPACKE/src/lapacke_chegvx.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function chegvx
* Author: Intel Corporation
* Generated November 2015
*****************************************************************************/

#include "lapacke_utils.h"
Expand Down Expand Up @@ -59,7 +60,7 @@ lapack_int LAPACKE_chegvx( int matrix_layout, lapack_int itype, char jobz,
if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
return -15;
}
if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
if( LAPACKE_che_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -9;
}
if( LAPACKE_lsame( range, 'v' ) ) {
Expand Down
3 changes: 2 additions & 1 deletion LAPACKE/src/lapacke_chetri2x.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function chetri2x
* Author: Intel Corporation
* Generated June 2016
*****************************************************************************/

#include "lapacke_utils.h"
Expand All @@ -45,7 +46,7 @@ lapack_int LAPACKE_chetri2x( int matrix_layout, char uplo, lapack_int n,
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -4;
}
}
Expand Down
4 changes: 1 addition & 3 deletions LAPACKE/src/lapacke_clacpy_work.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function clacpy
* Author: Intel Corporation
* Generated November 2015
*****************************************************************************/

#include "lapacke_utils.h"
Expand All @@ -41,9 +42,6 @@ lapack_int LAPACKE_clacpy_work( int matrix_layout, char uplo, lapack_int m,
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_clacpy( &uplo, &m, &n, a, &lda, b, &ldb );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,m);
lapack_int ldb_t = MAX(1,m);
Expand Down
4 changes: 1 addition & 3 deletions LAPACKE/src/lapacke_claset_work.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function claset
* Author: Intel Corporation
* Generated November 2015
*****************************************************************************/

#include "lapacke_utils.h"
Expand All @@ -41,9 +42,6 @@ lapack_int LAPACKE_claset_work( int matrix_layout, char uplo, lapack_int m,
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_claset( &uplo, &m, &n, &alpha, &beta, a, &lda );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,m);
lapack_complex_float* a_t = NULL;
Expand Down
Loading