Update LAPACK to 3.9.0

This commit is contained in:
Martin Kroeker 2019-12-29 19:41:24 +01:00 committed by GitHub
parent 7932b0c8c7
commit cdeeabd50c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 31 additions and 18 deletions

View File

@ -78,7 +78,7 @@ lapack_int LAPACKE_dsyevr_2stage( int matrix_layout, char jobz, char range, char
if( info != 0 ) { if( info != 0 ) {
goto exit_level_0; goto exit_level_0;
} }
liwork = (lapack_int)iwork_query; liwork = iwork_query;
lwork = (lapack_int)work_query; lwork = (lapack_int)work_query;
/* Allocate memory for work arrays */ /* Allocate memory for work arrays */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork ); iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );

View File

@ -66,7 +66,7 @@ lapack_int LAPACKE_dsygvd( int matrix_layout, lapack_int itype, char jobz,
if( info != 0 ) { if( info != 0 ) {
goto exit_level_0; goto exit_level_0;
} }
liwork = (lapack_int)iwork_query; liwork = iwork_query;
lwork = (lapack_int)work_query; lwork = (lapack_int)work_query;
/* Allocate memory for work arrays */ /* Allocate memory for work arrays */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork ); iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );

View File

@ -34,7 +34,7 @@
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_dsytrs2( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_dsytrs2( int matrix_layout, char uplo, lapack_int n,
lapack_int nrhs, const double* a, lapack_int lda, lapack_int nrhs, double* a, lapack_int lda,
const lapack_int* ipiv, double* b, lapack_int ldb ) const lapack_int* ipiv, double* b, lapack_int ldb )
{ {
lapack_int info = 0; lapack_int info = 0;

View File

@ -34,7 +34,7 @@
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_dsytrs2_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_dsytrs2_work( int matrix_layout, char uplo, lapack_int n,
lapack_int nrhs, const double* a, lapack_int nrhs, double* a,
lapack_int lda, const lapack_int* ipiv, lapack_int lda, const lapack_int* ipiv,
double* b, lapack_int ldb, double* work ) double* b, lapack_int ldb, double* work )
{ {

View File

@ -81,7 +81,7 @@ lapack_int LAPACKE_dtgsen( int matrix_layout, lapack_int ijob,
if( info != 0 ) { if( info != 0 ) {
goto exit_level_0; goto exit_level_0;
} }
liwork = (lapack_int)iwork_query; liwork = iwork_query;
lwork = (lapack_int)work_query; lwork = (lapack_int)work_query;
/* Allocate memory for work arrays */ /* Allocate memory for work arrays */
if( ijob != 0 ) { if( ijob != 0 ) {

View File

@ -39,7 +39,7 @@ lapack_int LAPACKE_dtprfb( int matrix_layout, char side, char trans, char direct
lapack_int ldv, const double* t, lapack_int ldt, lapack_int ldv, const double* t, lapack_int ldt,
double* a, lapack_int lda, double* b, lapack_int ldb ) double* a, lapack_int lda, double* 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 info = 0;
lapack_int ldwork; lapack_int ldwork;
lapack_int work_size; lapack_int work_size;
@ -50,20 +50,33 @@ lapack_int LAPACKE_dtprfb( int matrix_layout, char side, char trans, char direct
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) { 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' ) ) { if( LAPACKE_lsame( storev, 'C' ) ) {
ncols_v = k; ncols_v = k;
nrows_v = LAPACKE_lsame( side, 'L' ) ? m : 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' ) ) { } else if( LAPACKE_lsame( storev, 'R' ) ) {
ncols_v = LAPACKE_lsame( side, 'L' ) ? m : ncols_v = LAPACKE_lsame( side, 'L' ) ? m :
( LAPACKE_lsame( side, 'R' ) ? n : 0 ); LAPACKE_lsame( side, 'R' ) ? n : 0;
nrows_v = k; nrows_v = k;
} else { } else {
ncols_v = 0; ncols_v = 0;
nrows_v = 0; nrows_v = 0;
} }
if( LAPACKE_dge_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_dge_nancheck( matrix_layout, ncols_a, nrows_a, a, lda ) ) {
return -14; return -14;
} }
if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) { if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {

View File

@ -70,7 +70,7 @@ lapack_int LAPACKE_dtrsen( int matrix_layout, char job, char compq,
if( info != 0 ) { if( info != 0 ) {
goto exit_level_0; goto exit_level_0;
} }
liwork = (lapack_int)iwork_query; liwork = iwork_query;
lwork = (lapack_int)work_query; lwork = (lapack_int)work_query;
/* Allocate memory for work arrays */ /* Allocate memory for work arrays */
if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) { if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {