Update LAPACK to 3.9.0
This commit is contained in:
parent
6725bbf4dd
commit
d7c84c1fdf
|
@ -64,7 +64,7 @@ lapack_int LAPACKE_sstevd( int matrix_layout, char jobz, lapack_int n, float* d,
|
|||
if( info != 0 ) {
|
||||
goto exit_level_0;
|
||||
}
|
||||
liwork = (lapack_int)iwork_query;
|
||||
liwork = iwork_query;
|
||||
lwork = (lapack_int)work_query;
|
||||
/* Allocate memory for work arrays */
|
||||
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
|
||||
|
|
|
@ -81,7 +81,7 @@ lapack_int LAPACKE_sstevr( int matrix_layout, char jobz, char range,
|
|||
if( info != 0 ) {
|
||||
goto exit_level_0;
|
||||
}
|
||||
liwork = (lapack_int)iwork_query;
|
||||
liwork = iwork_query;
|
||||
lwork = (lapack_int)work_query;
|
||||
/* Allocate memory for work arrays */
|
||||
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
|
||||
|
|
|
@ -65,14 +65,14 @@ lapack_int LAPACKE_ssyev_work( int matrix_layout, char jobz, char uplo,
|
|||
goto exit_level_0;
|
||||
}
|
||||
/* Transpose input matrices */
|
||||
LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
|
||||
LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
|
||||
/* Call LAPACK function and adjust info */
|
||||
LAPACK_ssyev( &jobz, &uplo, &n, a_t, &lda_t, w, work, &lwork, &info );
|
||||
if( info < 0 ) {
|
||||
info = info - 1;
|
||||
}
|
||||
/* Transpose output matrices */
|
||||
LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
|
||||
LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
|
||||
/* Release memory and exit */
|
||||
LAPACKE_free( a_t );
|
||||
exit_level_0:
|
||||
|
|
|
@ -50,7 +50,7 @@ lapack_int LAPACKE_ssyevd( int matrix_layout, char jobz, char uplo, lapack_int n
|
|||
#ifndef LAPACK_DISABLE_NAN_CHECK
|
||||
if( LAPACKE_get_nancheck() ) {
|
||||
/* Optionally check input matrices for NaNs */
|
||||
if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
|
||||
if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
|
||||
return -5;
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ lapack_int LAPACKE_ssyevd( int matrix_layout, char jobz, char uplo, lapack_int n
|
|||
if( info != 0 ) {
|
||||
goto exit_level_0;
|
||||
}
|
||||
liwork = (lapack_int)iwork_query;
|
||||
liwork = iwork_query;
|
||||
lwork = (lapack_int)work_query;
|
||||
/* Allocate memory for work arrays */
|
||||
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
|
||||
|
|
|
@ -50,7 +50,7 @@ lapack_int LAPACKE_ssyevd_2stage( int matrix_layout, char jobz, char uplo, lapac
|
|||
#ifndef LAPACK_DISABLE_NAN_CHECK
|
||||
if( LAPACKE_get_nancheck() ) {
|
||||
/* Optionally check input matrices for NaNs */
|
||||
if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
|
||||
if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
|
||||
return -5;
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ lapack_int LAPACKE_ssyevd_2stage( int matrix_layout, char jobz, char uplo, lapac
|
|||
if( info != 0 ) {
|
||||
goto exit_level_0;
|
||||
}
|
||||
liwork = (lapack_int)iwork_query;
|
||||
liwork = iwork_query;
|
||||
lwork = (lapack_int)work_query;
|
||||
/* Allocate memory for work arrays */
|
||||
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
|
||||
|
|
|
@ -68,7 +68,7 @@ lapack_int LAPACKE_ssyevd_2stage_work( int matrix_layout, char jobz, char uplo,
|
|||
goto exit_level_0;
|
||||
}
|
||||
/* Transpose input matrices */
|
||||
LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
|
||||
LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
|
||||
/* Call LAPACK function and adjust info */
|
||||
LAPACK_ssyevd_2stage( &jobz, &uplo, &n, a_t, &lda_t, w, work, &lwork, iwork,
|
||||
&liwork, &info );
|
||||
|
@ -76,7 +76,7 @@ lapack_int LAPACKE_ssyevd_2stage_work( int matrix_layout, char jobz, char uplo,
|
|||
info = info - 1;
|
||||
}
|
||||
/* Transpose output matrices */
|
||||
LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
|
||||
LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
|
||||
/* Release memory and exit */
|
||||
LAPACKE_free( a_t );
|
||||
exit_level_0:
|
||||
|
|
|
@ -68,7 +68,7 @@ lapack_int LAPACKE_ssyevd_work( int matrix_layout, char jobz, char uplo,
|
|||
goto exit_level_0;
|
||||
}
|
||||
/* Transpose input matrices */
|
||||
LAPACKE_sge_trans( matrix_layout, n, n, a, lda, a_t, lda_t );
|
||||
LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
|
||||
/* Call LAPACK function and adjust info */
|
||||
LAPACK_ssyevd( &jobz, &uplo, &n, a_t, &lda_t, w, work, &lwork, iwork,
|
||||
&liwork, &info );
|
||||
|
@ -76,7 +76,7 @@ lapack_int LAPACKE_ssyevd_work( int matrix_layout, char jobz, char uplo,
|
|||
info = info - 1;
|
||||
}
|
||||
/* Transpose output matrices */
|
||||
LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
|
||||
LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
|
||||
/* Release memory and exit */
|
||||
LAPACKE_free( a_t );
|
||||
exit_level_0:
|
||||
|
|
|
@ -78,7 +78,7 @@ lapack_int LAPACKE_ssyevr( int matrix_layout, char jobz, char range, char uplo,
|
|||
if( info != 0 ) {
|
||||
goto exit_level_0;
|
||||
}
|
||||
liwork = (lapack_int)iwork_query;
|
||||
liwork = iwork_query;
|
||||
lwork = (lapack_int)work_query;
|
||||
/* Allocate memory for work arrays */
|
||||
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
|
||||
|
|
|
@ -78,7 +78,7 @@ lapack_int LAPACKE_ssyevr_2stage( int matrix_layout, char jobz, char range, char
|
|||
if( info != 0 ) {
|
||||
goto exit_level_0;
|
||||
}
|
||||
liwork = (lapack_int)iwork_query;
|
||||
liwork = iwork_query;
|
||||
lwork = (lapack_int)work_query;
|
||||
/* Allocate memory for work arrays */
|
||||
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
|
||||
|
|
|
@ -66,7 +66,7 @@ lapack_int LAPACKE_ssygvd( int matrix_layout, lapack_int itype, char jobz,
|
|||
if( info != 0 ) {
|
||||
goto exit_level_0;
|
||||
}
|
||||
liwork = (lapack_int)iwork_query;
|
||||
liwork = iwork_query;
|
||||
lwork = (lapack_int)work_query;
|
||||
/* Allocate memory for work arrays */
|
||||
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "lapacke_utils.h"
|
||||
|
||||
lapack_int LAPACKE_ssytrs2( int matrix_layout, char uplo, lapack_int n,
|
||||
lapack_int nrhs, const float* a, lapack_int lda,
|
||||
lapack_int nrhs, float* a, lapack_int lda,
|
||||
const lapack_int* ipiv, float* b, lapack_int ldb )
|
||||
{
|
||||
lapack_int info = 0;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "lapacke_utils.h"
|
||||
|
||||
lapack_int LAPACKE_ssytrs2_work( int matrix_layout, char uplo, lapack_int n,
|
||||
lapack_int nrhs, const float* a,
|
||||
lapack_int nrhs, float* a,
|
||||
lapack_int lda, const lapack_int* ipiv,
|
||||
float* b, lapack_int ldb, float* work )
|
||||
{
|
||||
|
|
|
@ -81,7 +81,7 @@ lapack_int LAPACKE_stgsen( int matrix_layout, lapack_int ijob,
|
|||
if( info != 0 ) {
|
||||
goto exit_level_0;
|
||||
}
|
||||
liwork = (lapack_int)iwork_query;
|
||||
liwork = iwork_query;
|
||||
lwork = (lapack_int)work_query;
|
||||
/* Allocate memory for work arrays */
|
||||
if( ijob != 0 ) {
|
||||
|
|
|
@ -39,7 +39,7 @@ lapack_int LAPACKE_stprfb( int matrix_layout, char side, char trans, char direct
|
|||
lapack_int ldv, const float* t, lapack_int ldt,
|
||||
float* a, lapack_int lda, float* b, lapack_int ldb)
|
||||
{
|
||||
lapack_int ncols_v, nrows_v;
|
||||
lapack_int ncols_v, nrows_v, ncols_a, nrows_a;
|
||||
lapack_int info = 0;
|
||||
lapack_int ldwork;
|
||||
lapack_int work_size;
|
||||
|
@ -50,20 +50,33 @@ lapack_int LAPACKE_stprfb( int matrix_layout, char side, char trans, char direct
|
|||
}
|
||||
#ifndef LAPACK_DISABLE_NAN_CHECK
|
||||
if( LAPACKE_get_nancheck() ) {
|
||||
/* Optionally check input matrices for NaNs */
|
||||
/* Optionally check input matrices for NaNs
|
||||
* V is m-by-k (left, columnwise)
|
||||
* or n-by-k (right, columnwise)
|
||||
* or k-by-m (left, rowwise)
|
||||
* or k-by-n (right, rowwise)
|
||||
* T is k-by-k
|
||||
* A is k-by-n (left)
|
||||
* or m-by-k (right)
|
||||
* B is m-by-n
|
||||
*/
|
||||
if( LAPACKE_lsame( storev, 'C' ) ) {
|
||||
ncols_v = k;
|
||||
nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
|
||||
( LAPACKE_lsame( side, 'R' ) ? n : 0 );
|
||||
LAPACKE_lsame( side, 'R' ) ? n : 0;
|
||||
} else if( LAPACKE_lsame( storev, 'R' ) ) {
|
||||
ncols_v = LAPACKE_lsame( side, 'L' ) ? m :
|
||||
( LAPACKE_lsame( side, 'R' ) ? n : 0 );
|
||||
LAPACKE_lsame( side, 'R' ) ? n : 0;
|
||||
nrows_v = k;
|
||||
} else {
|
||||
ncols_v = 0;
|
||||
nrows_v = 0;
|
||||
}
|
||||
if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
|
||||
nrows_a = LAPACKE_lsame( side, 'L' ) ? k :
|
||||
LAPACKE_lsame( side, 'R' ) ? m : 0;
|
||||
ncols_a = LAPACKE_lsame( side, 'L' ) ? n :
|
||||
LAPACKE_lsame( side, 'R' ) ? k : 0;
|
||||
if( LAPACKE_sge_nancheck( matrix_layout, ncols_a, nrows_a, a, lda ) ) {
|
||||
return -14;
|
||||
}
|
||||
if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
|
||||
|
@ -78,14 +91,14 @@ lapack_int LAPACKE_stprfb( int matrix_layout, char side, char trans, char direct
|
|||
}
|
||||
#endif
|
||||
if (side=='l' || side=='L') {
|
||||
ldwork = k;
|
||||
work_size = MAX(1,ldwork) * MAX(1,n);
|
||||
}
|
||||
ldwork = k;
|
||||
work_size = MAX(1,ldwork) * MAX(1,n);
|
||||
}
|
||||
else {
|
||||
ldwork = m;
|
||||
work_size = MAX(1,ldwork) * MAX(1,k);
|
||||
}
|
||||
/* Allocate memory for working array(s) */
|
||||
ldwork = m;
|
||||
work_size = MAX(1,ldwork) * MAX(1,k);
|
||||
}
|
||||
/* Allocate memory for working array(s) */
|
||||
work = (float*)
|
||||
LAPACKE_malloc( sizeof(float) * work_size );
|
||||
if( work == NULL ) {
|
||||
|
|
|
@ -69,7 +69,7 @@ lapack_int LAPACKE_strsen( int matrix_layout, char job, char compq,
|
|||
if( info != 0 ) {
|
||||
goto exit_level_0;
|
||||
}
|
||||
liwork = (lapack_int)iwork_query;
|
||||
liwork = iwork_query;
|
||||
lwork = (lapack_int)work_query;
|
||||
/* Allocate memory for work arrays */
|
||||
if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
|
||||
|
|
Loading…
Reference in New Issue