Import LAPACK: LAPACKE directory

This commit is contained in:
Martin Köhler 2016-10-26 15:06:08 +02:00
parent 4c29d20108
commit 13d40e7591
132 changed files with 1059 additions and 869 deletions

View File

@ -81,7 +81,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/lapacke-config-install.cmake.in
install(FILES install(FILES
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/lapacke-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/lapacke-config.cmake
${LAPACK_BINARY_DIR}/lapacke-config-version.cmake ${LAPACK_BINARY_DIR}/lapacke-config-version.cmake
DESTINATION lib/cmake/lapacke-${LAPACK_VERSION} DESTINATION ${LIBRARY_DIR}/cmake/lapacke-${LAPACK_VERSION}
) )
install(EXPORT lapacke-targets install(EXPORT lapacke-targets

View File

@ -180,14 +180,14 @@ lapack_int LAPACKE_zbdsqr( int matrix_layout, char uplo, lapack_int n,
lapack_int ldc ); lapack_int ldc );
lapack_int LAPACKE_sbdsvdx( int matrix_layout, char uplo, char jobz, char range, lapack_int LAPACKE_sbdsvdx( int matrix_layout, char uplo, char jobz, char range,
lapack_int n, float* d, float* e, lapack_int n, float* d, float* e,
lapack_int vl, lapack_int vu, float vl, float vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
float* s, float* z, lapack_int ldz, float* s, float* z, lapack_int ldz,
lapack_int* superb ); lapack_int* superb );
lapack_int LAPACKE_dbdsvdx( int matrix_layout, char uplo, char jobz, char range, lapack_int LAPACKE_dbdsvdx( int matrix_layout, char uplo, char jobz, char range,
lapack_int n, double* d, double* e, lapack_int n, double* d, double* e,
lapack_int vl, lapack_int vu, double vl, double vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
double* s, double* z, lapack_int ldz, double* s, double* z, lapack_int ldz,
lapack_int* superb ); lapack_int* superb );
lapack_int LAPACKE_sdisna( char job, lapack_int m, lapack_int n, const float* d, lapack_int LAPACKE_sdisna( char job, lapack_int m, lapack_int n, const float* d,
@ -999,29 +999,29 @@ lapack_int LAPACKE_zgesvd( int matrix_layout, char jobu, char jobvt,
lapack_int LAPACKE_sgesvdx( int matrix_layout, char jobu, char jobvt, char range, lapack_int LAPACKE_sgesvdx( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, float* a, lapack_int m, lapack_int n, float* a,
lapack_int lda, lapack_int vl, lapack_int vu, lapack_int lda, float vl, float vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
float* s, float* u, lapack_int ldu, float* s, float* u, lapack_int ldu,
float* vt, lapack_int ldvt, float* vt, lapack_int ldvt,
lapack_int* superb ); lapack_int* superb );
lapack_int LAPACKE_dgesvdx( int matrix_layout, char jobu, char jobvt, char range, lapack_int LAPACKE_dgesvdx( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, double* a, lapack_int m, lapack_int n, double* a,
lapack_int lda, lapack_int vl, lapack_int vu, lapack_int lda, double vl, double vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
double* s, double* u, lapack_int ldu, double* s, double* u, lapack_int ldu,
double* vt, lapack_int ldvt, double* vt, lapack_int ldvt,
lapack_int* superb ); lapack_int* superb );
lapack_int LAPACKE_cgesvdx( int matrix_layout, char jobu, char jobvt, char range, lapack_int LAPACKE_cgesvdx( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, lapack_complex_float* a, lapack_int m, lapack_int n, lapack_complex_float* a,
lapack_int lda, lapack_int vl, lapack_int vu, lapack_int lda, float vl, float vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
float* s, lapack_complex_float* u, lapack_int ldu, float* s, lapack_complex_float* u, lapack_int ldu,
lapack_complex_float* vt, lapack_int ldvt, lapack_complex_float* vt, lapack_int ldvt,
lapack_int* superb ); lapack_int* superb );
lapack_int LAPACKE_zgesvdx( int matrix_layout, char jobu, char jobvt, char range, lapack_int LAPACKE_zgesvdx( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, lapack_complex_double* a, lapack_int m, lapack_int n, lapack_complex_double* a,
lapack_int lda, lapack_int vl, lapack_int vu, lapack_int lda, double vl, double vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
double* s, lapack_complex_double* u, lapack_int ldu, double* s, lapack_complex_double* u, lapack_int ldu,
lapack_complex_double* vt, lapack_int ldvt, lapack_complex_double* vt, lapack_int ldvt,
lapack_int* superb ); lapack_int* superb );
@ -4738,17 +4738,17 @@ lapack_int LAPACKE_dbdsdc_work( int matrix_layout, char uplo, char compq,
lapack_int* iwork ); lapack_int* iwork );
lapack_int LAPACKE_sbdsvdx_work( int matrix_layout, char uplo, char jobz, char range, lapack_int LAPACKE_sbdsvdx_work( int matrix_layout, char uplo, char jobz, char range,
lapack_int n, float* d, float* e, lapack_int n, float* d, float* e,
lapack_int vl, lapack_int vu, float vl, float vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
float* s, float* z, lapack_int ldz, float* s, float* z, lapack_int ldz,
float* work, lapack_int* iwork ); float* work, lapack_int* iwork );
lapack_int LAPACKE_dbdsvdx_work( int matrix_layout, char uplo, char jobz, char range, lapack_int LAPACKE_dbdsvdx_work( int matrix_layout, char uplo, char jobz, char range,
lapack_int n, double* d, double* e, lapack_int n, double* d, double* e,
lapack_int vl, lapack_int vu, double vl, double vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
double* s, double* z, lapack_int ldz, double* s, double* z, lapack_int ldz,
double* work, lapack_int* iwork ); double* work, lapack_int* iwork );
lapack_int LAPACKE_sbdsqr_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_sbdsqr_work( int matrix_layout, char uplo, lapack_int n,
lapack_int ncvt, lapack_int nru, lapack_int ncc, lapack_int ncvt, lapack_int nru, lapack_int ncc,
@ -5760,30 +5760,30 @@ lapack_int LAPACKE_zgesvd_work( int matrix_layout, char jobu, char jobvt,
lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, float* a, lapack_int m, lapack_int n, float* a,
lapack_int lda, lapack_int vl, lapack_int vu, lapack_int lda, float vl, float vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
float* s, float* u, lapack_int ldu, float* s, float* u, lapack_int ldu,
float* vt, lapack_int ldvt, float* vt, lapack_int ldvt,
float* work, lapack_int lwork, lapack_int* iwork ); float* work, lapack_int lwork, lapack_int* iwork );
lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, double* a, lapack_int m, lapack_int n, double* a,
lapack_int lda, lapack_int vl, lapack_int vu, lapack_int lda, double vl, double vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
double* s, double* u, lapack_int ldu, double* s, double* u, lapack_int ldu,
double* vt, lapack_int ldvt, double* vt, lapack_int ldvt,
double* work, lapack_int lwork, lapack_int* iwork ); double* work, lapack_int lwork, lapack_int* iwork );
lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, lapack_complex_float* a, lapack_int m, lapack_int n, lapack_complex_float* a,
lapack_int lda, lapack_int vl, lapack_int vu, lapack_int lda, float vl, float vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
float* s, lapack_complex_float* u, lapack_int ldu, float* s, lapack_complex_float* u, lapack_int ldu,
lapack_complex_float* vt, lapack_int ldvt, lapack_complex_float* vt, lapack_int ldvt,
lapack_complex_float* work, lapack_int lwork, lapack_complex_float* work, lapack_int lwork,
float* rwork, lapack_int* iwork ); float* rwork, lapack_int* iwork );
lapack_int LAPACKE_zgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, lapack_int LAPACKE_zgesvdx_work( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, lapack_complex_double* a, lapack_int m, lapack_int n, lapack_complex_double* a,
lapack_int lda, lapack_int vl, lapack_int vu, lapack_int lda, double vl, double vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
double* s, lapack_complex_double* u, lapack_int ldu, double* s, lapack_complex_double* u, lapack_int ldu,
lapack_complex_double* vt, lapack_int ldvt, lapack_complex_double* vt, lapack_int ldvt,
lapack_complex_double* work, lapack_int lwork, lapack_complex_double* work, lapack_int lwork,
@ -10472,11 +10472,11 @@ lapack_int LAPACKE_cbbcsd_work( int matrix_layout, char jobu1, char jobu2,
float* b22d, float* b22e, float* rwork, float* b22d, float* b22e, float* rwork,
lapack_int lrwork ); lapack_int lrwork );
lapack_int LAPACKE_cheswapr( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_cheswapr( int matrix_layout, char uplo, lapack_int n,
lapack_complex_float* a, lapack_int i1, lapack_complex_float* a, lapack_int lda,
lapack_int i2 ); lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_cheswapr_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_cheswapr_work( int matrix_layout, char uplo, lapack_int n,
lapack_complex_float* a, lapack_int i1, lapack_complex_float* a, lapack_int lda,
lapack_int i2 ); lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_chetri2( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_chetri2( int matrix_layout, char uplo, lapack_int n,
lapack_complex_float* a, lapack_int lda, lapack_complex_float* a, lapack_int lda,
const lapack_int* ipiv ); const lapack_int* ipiv );
@ -10502,17 +10502,17 @@ lapack_int LAPACKE_chetrs2_work( int matrix_layout, char uplo, lapack_int n,
lapack_complex_float* work ); lapack_complex_float* work );
lapack_int LAPACKE_csyconv( int matrix_layout, char uplo, char way, lapack_int n, lapack_int LAPACKE_csyconv( int matrix_layout, char uplo, char way, lapack_int n,
lapack_complex_float* a, lapack_int lda, lapack_complex_float* a, lapack_int lda,
const lapack_int* ipiv, lapack_complex_float* work ); const lapack_int* ipiv, lapack_complex_float* e );
lapack_int LAPACKE_csyconv_work( int matrix_layout, char uplo, char way, lapack_int LAPACKE_csyconv_work( int matrix_layout, char uplo, char way,
lapack_int n, lapack_complex_float* a, lapack_int n, lapack_complex_float* a,
lapack_int lda, const lapack_int* ipiv, lapack_int lda, const lapack_int* ipiv,
lapack_complex_float* work ); lapack_complex_float* e );
lapack_int LAPACKE_csyswapr( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_csyswapr( int matrix_layout, char uplo, lapack_int n,
lapack_complex_float* a, lapack_int i1, lapack_complex_float* a, lapack_int lda,
lapack_int i2 ); lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_csyswapr_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_csyswapr_work( int matrix_layout, char uplo, lapack_int n,
lapack_complex_float* a, lapack_int i1, lapack_complex_float* a, lapack_int lda,
lapack_int i2 ); lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_csytri2( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_csytri2( int matrix_layout, char uplo, lapack_int n,
lapack_complex_float* a, lapack_int lda, lapack_complex_float* a, lapack_int lda,
const lapack_int* ipiv ); const lapack_int* ipiv );
@ -10590,14 +10590,14 @@ lapack_int LAPACKE_cuncsd2by1( int matrix_layout, char jobu1, char jobu2,
char jobv1t, lapack_int m, lapack_int p, lapack_int q, char jobv1t, lapack_int m, lapack_int p, lapack_int q,
lapack_complex_float* x11, lapack_int ldx11, lapack_complex_float* x11, lapack_int ldx11,
lapack_complex_float* x21, lapack_int ldx21, lapack_complex_float* x21, lapack_int ldx21,
lapack_complex_float* theta, lapack_complex_float* u1, float* theta, lapack_complex_float* u1,
lapack_int ldu1, lapack_complex_float* u2, lapack_int ldu1, lapack_complex_float* u2,
lapack_int ldu2, lapack_complex_float* v1t, lapack_int ldv1t ); lapack_int ldu2, lapack_complex_float* v1t, lapack_int ldv1t );
lapack_int LAPACKE_cuncsd2by1_work( int matrix_layout, char jobu1, char jobu2, lapack_int LAPACKE_cuncsd2by1_work( int matrix_layout, char jobu1, char jobu2,
char jobv1t, lapack_int m, lapack_int p, char jobv1t, lapack_int m, lapack_int p,
lapack_int q, lapack_complex_float* x11, lapack_int ldx11, lapack_int q, lapack_complex_float* x11, lapack_int ldx11,
lapack_complex_float* x21, lapack_int ldx21, lapack_complex_float* x21, lapack_int ldx21,
lapack_complex_float* theta, lapack_complex_float* u1, float* theta, lapack_complex_float* u1,
lapack_int ldu1, lapack_complex_float* u2, lapack_int ldu1, lapack_complex_float* u2,
lapack_int ldu2, lapack_complex_float* v1t, lapack_int ldu2, lapack_complex_float* v1t,
lapack_int ldv1t, lapack_complex_float* work, lapack_int ldv1t, lapack_complex_float* work,
@ -10669,20 +10669,22 @@ lapack_int LAPACKE_dorcsd2by1_work( int matrix_layout, char jobu1, char jobu2,
lapack_int ldu2, double* v1t, lapack_int ldv1t, lapack_int ldu2, double* v1t, lapack_int ldv1t,
double* work, lapack_int lwork, lapack_int* iwork ); double* work, lapack_int lwork, lapack_int* iwork );
lapack_int LAPACKE_dsyconv( int matrix_layout, char uplo, char way, lapack_int n, lapack_int LAPACKE_dsyconv( int matrix_layout, char uplo, char way, lapack_int n,
double* a, lapack_int lda, const lapack_int* ipiv, double* work); double* a, lapack_int lda, const lapack_int* ipiv, double* e);
lapack_int LAPACKE_dsyconv_work( int matrix_layout, char uplo, char way, lapack_int LAPACKE_dsyconv_work( int matrix_layout, char uplo, char way,
lapack_int n, double* a, lapack_int lda, lapack_int n, double* a, lapack_int lda,
const lapack_int* ipiv, double* work ); const lapack_int* ipiv, double* e );
lapack_int LAPACKE_dsyswapr( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_dsyswapr( int matrix_layout, char uplo, lapack_int n,
double* a, lapack_int i1, lapack_int i2 ); double* a, lapack_int lda, lapack_int i1,
lapack_int i2 );
lapack_int LAPACKE_dsyswapr_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_dsyswapr_work( int matrix_layout, char uplo, lapack_int n,
double* a, lapack_int i1, lapack_int i2 ); double* a, lapack_int lda, lapack_int i1,
lapack_int i2 );
lapack_int LAPACKE_dsytri2( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_dsytri2( int matrix_layout, char uplo, lapack_int n,
double* a, lapack_int lda, const lapack_int* ipiv ); double* a, lapack_int lda, const lapack_int* ipiv );
lapack_int LAPACKE_dsytri2_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_dsytri2_work( int matrix_layout, char uplo, lapack_int n,
double* a, lapack_int lda, double* a, lapack_int lda,
const lapack_int* ipiv, const lapack_int* ipiv,
lapack_complex_double* work, lapack_int lwork ); double* work, lapack_int lwork );
lapack_int LAPACKE_dsytri2x( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_dsytri2x( int matrix_layout, char uplo, lapack_int n,
double* a, lapack_int lda, const lapack_int* ipiv, double* a, lapack_int lda, const lapack_int* ipiv,
lapack_int nb ); lapack_int nb );
@ -10762,20 +10764,22 @@ lapack_int LAPACKE_sorcsd2by1_work( int matrix_layout, char jobu1, char jobu2,
lapack_int ldu2, float* v1t, lapack_int ldv1t, lapack_int ldu2, float* v1t, lapack_int ldv1t,
float* work, lapack_int lwork, lapack_int* iwork ); float* work, lapack_int lwork, lapack_int* iwork );
lapack_int LAPACKE_ssyconv( int matrix_layout, char uplo, char way, lapack_int n, lapack_int LAPACKE_ssyconv( int matrix_layout, char uplo, char way, lapack_int n,
float* a, lapack_int lda, const lapack_int* ipiv, float* work ); float* a, lapack_int lda, const lapack_int* ipiv, float* e );
lapack_int LAPACKE_ssyconv_work( int matrix_layout, char uplo, char way, lapack_int LAPACKE_ssyconv_work( int matrix_layout, char uplo, char way,
lapack_int n, float* a, lapack_int lda, lapack_int n, float* a, lapack_int lda,
const lapack_int* ipiv, float* work ); const lapack_int* ipiv, float* e );
lapack_int LAPACKE_ssyswapr( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_ssyswapr( int matrix_layout, char uplo, lapack_int n,
float* a, lapack_int i1, lapack_int i2 ); float* a, lapack_int lda, lapack_int i1,
lapack_int i2 );
lapack_int LAPACKE_ssyswapr_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_ssyswapr_work( int matrix_layout, char uplo, lapack_int n,
float* a, lapack_int i1, lapack_int i2 ); float* a, lapack_int lda, lapack_int i1,
lapack_int i2 );
lapack_int LAPACKE_ssytri2( int matrix_layout, char uplo, lapack_int n, float* a, lapack_int LAPACKE_ssytri2( int matrix_layout, char uplo, lapack_int n, float* a,
lapack_int lda, const lapack_int* ipiv ); lapack_int lda, const lapack_int* ipiv );
lapack_int LAPACKE_ssytri2_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_ssytri2_work( int matrix_layout, char uplo, lapack_int n,
float* a, lapack_int lda, float* a, lapack_int lda,
const lapack_int* ipiv, const lapack_int* ipiv,
lapack_complex_float* work, lapack_int lwork ); float* work, lapack_int lwork );
lapack_int LAPACKE_ssytri2x( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_ssytri2x( int matrix_layout, char uplo, lapack_int n,
float* a, lapack_int lda, const lapack_int* ipiv, float* a, lapack_int lda, const lapack_int* ipiv,
lapack_int nb ); lapack_int nb );
@ -10813,11 +10817,11 @@ lapack_int LAPACKE_zbbcsd_work( int matrix_layout, char jobu1, char jobu2,
double* b22d, double* b22e, double* rwork, double* b22d, double* b22e, double* rwork,
lapack_int lrwork ); lapack_int lrwork );
lapack_int LAPACKE_zheswapr( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_zheswapr( int matrix_layout, char uplo, lapack_int n,
lapack_complex_double* a, lapack_int i1, lapack_complex_double* a, lapack_int lda,
lapack_int i2 ); lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_zheswapr_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_zheswapr_work( int matrix_layout, char uplo, lapack_int n,
lapack_complex_double* a, lapack_int i1, lapack_complex_double* a, lapack_int lda,
lapack_int i2 ); lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_zhetri2( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_zhetri2( int matrix_layout, char uplo, lapack_int n,
lapack_complex_double* a, lapack_int lda, lapack_complex_double* a, lapack_int lda,
const lapack_int* ipiv ); const lapack_int* ipiv );
@ -10843,17 +10847,17 @@ lapack_int LAPACKE_zhetrs2_work( int matrix_layout, char uplo, lapack_int n,
lapack_complex_double* work ); lapack_complex_double* work );
lapack_int LAPACKE_zsyconv( int matrix_layout, char uplo, char way, lapack_int n, lapack_int LAPACKE_zsyconv( int matrix_layout, char uplo, char way, lapack_int n,
lapack_complex_double* a, lapack_int lda, lapack_complex_double* a, lapack_int lda,
const lapack_int* ipiv, lapack_complex_double* work ); const lapack_int* ipiv, lapack_complex_double* e );
lapack_int LAPACKE_zsyconv_work( int matrix_layout, char uplo, char way, lapack_int LAPACKE_zsyconv_work( int matrix_layout, char uplo, char way,
lapack_int n, lapack_complex_double* a, lapack_int n, lapack_complex_double* a,
lapack_int lda, const lapack_int* ipiv, lapack_int lda, const lapack_int* ipiv,
lapack_complex_double* work ); lapack_complex_double* e );
lapack_int LAPACKE_zsyswapr( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_zsyswapr( int matrix_layout, char uplo, lapack_int n,
lapack_complex_double* a, lapack_int i1, lapack_complex_double* a, lapack_int lda,
lapack_int i2 ); lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_zsyswapr_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_zsyswapr_work( int matrix_layout, char uplo, lapack_int n,
lapack_complex_double* a, lapack_int i1, lapack_complex_double* a, lapack_int lda,
lapack_int i2 ); lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_zsytri2( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_zsytri2( int matrix_layout, char uplo, lapack_int n,
lapack_complex_double* a, lapack_int lda, lapack_complex_double* a, lapack_int lda,
const lapack_int* ipiv ); const lapack_int* ipiv );
@ -10931,14 +10935,14 @@ lapack_int LAPACKE_zuncsd2by1( int matrix_layout, char jobu1, char jobu2,
char jobv1t, lapack_int m, lapack_int p, lapack_int q, char jobv1t, lapack_int m, lapack_int p, lapack_int q,
lapack_complex_double* x11, lapack_int ldx11, lapack_complex_double* x11, lapack_int ldx11,
lapack_complex_double* x21, lapack_int ldx21, lapack_complex_double* x21, lapack_int ldx21,
lapack_complex_double* theta, lapack_complex_double* u1, double* theta, lapack_complex_double* u1,
lapack_int ldu1, lapack_complex_double* u2, lapack_int ldu1, lapack_complex_double* u2,
lapack_int ldu2, lapack_complex_double* v1t, lapack_int ldv1t ); lapack_int ldu2, lapack_complex_double* v1t, lapack_int ldv1t );
lapack_int LAPACKE_zuncsd2by1_work( int matrix_layout, char jobu1, char jobu2, lapack_int LAPACKE_zuncsd2by1_work( int matrix_layout, char jobu1, char jobu2,
char jobv1t, lapack_int m, lapack_int p, char jobv1t, lapack_int m, lapack_int p,
lapack_int q, lapack_complex_double* x11, lapack_int ldx11, lapack_int q, lapack_complex_double* x11, lapack_int ldx11,
lapack_complex_double* x21, lapack_int ldx21, lapack_complex_double* x21, lapack_int ldx21,
lapack_complex_double* theta, lapack_complex_double* u1, double* theta, lapack_complex_double* u1,
lapack_int ldu1, lapack_complex_double* u2, lapack_int ldu1, lapack_complex_double* u2,
lapack_int ldu2, lapack_complex_double* v1t, lapack_int ldu2, lapack_complex_double* v1t,
lapack_int ldv1t, lapack_complex_double* work, lapack_int ldv1t, lapack_complex_double* work,
@ -11243,7 +11247,7 @@ lapack_int LAPACKE_stprfb_work( int matrix_layout, char side, char trans,
lapack_int n, lapack_int k, lapack_int l, lapack_int n, lapack_int k, lapack_int l,
const float* v, lapack_int ldv, const float* t, const float* v, lapack_int ldv, const float* t,
lapack_int ldt, float* a, lapack_int lda, lapack_int ldt, float* a, lapack_int lda,
float* b, lapack_int ldb, const float* work, float* b, lapack_int ldb, float* work,
lapack_int ldwork ); lapack_int ldwork );
lapack_int LAPACKE_dtprfb_work( int matrix_layout, char side, char trans, lapack_int LAPACKE_dtprfb_work( int matrix_layout, char side, char trans,
char direct, char storev, lapack_int m, char direct, char storev, lapack_int m,
@ -11251,7 +11255,7 @@ lapack_int LAPACKE_dtprfb_work( int matrix_layout, char side, char trans,
const double* v, lapack_int ldv, const double* v, lapack_int ldv,
const double* t, lapack_int ldt, double* a, const double* t, lapack_int ldt, double* a,
lapack_int lda, double* b, lapack_int ldb, lapack_int lda, double* b, lapack_int ldb,
const double* work, lapack_int ldwork ); double* work, lapack_int ldwork );
lapack_int LAPACKE_ctprfb_work( int matrix_layout, char side, char trans, lapack_int LAPACKE_ctprfb_work( int matrix_layout, char side, char trans,
char direct, char storev, lapack_int m, char direct, char storev, lapack_int m,
lapack_int n, lapack_int k, lapack_int l, lapack_int n, lapack_int k, lapack_int l,
@ -11417,9 +11421,9 @@ lapack_int LAPACKE_zsyr_work( int matrix_layout, char uplo, lapack_int n,
const lapack_complex_double* x, const lapack_complex_double* x,
lapack_int incx, lapack_complex_double* a, lapack_int incx, lapack_complex_double* a,
lapack_int lda ); lapack_int lda );
void LAPACKE_ilaver( const lapack_int* vers_major, void LAPACKE_ilaver( lapack_int* vers_major,
const lapack_int* vers_minor, lapack_int* vers_minor,
const lapack_int* vers_patch ); lapack_int* vers_patch );
#define LAPACK_sgetrf LAPACK_GLOBAL(sgetrf,SGETRF) #define LAPACK_sgetrf LAPACK_GLOBAL(sgetrf,SGETRF)
@ -14784,13 +14788,13 @@ void LAPACK_dbdsdc( char* uplo, char* compq, lapack_int* n, double* d,
lapack_int* iwork, lapack_int *info ); lapack_int* iwork, lapack_int *info );
void LAPACK_sbdsvdx( char* uplo, char* jobz, char* range, void LAPACK_sbdsvdx( char* uplo, char* jobz, char* range,
lapack_int* n, float* d, float* e, lapack_int* n, float* d, float* e,
lapack_int* vl, lapack_int* vu, float* vl, float* vu,
lapack_int* il, lapack_int* iu, lapack_int* ns, lapack_int* il, lapack_int* iu, lapack_int* ns,
float* s, float* z, lapack_int* ldz, float* s, float* z, lapack_int* ldz,
float* work, lapack_int *iwork, lapack_int *info ); float* work, lapack_int *iwork, lapack_int *info );
void LAPACK_dbdsvdx( char* uplo, char* jobz, char* range, void LAPACK_dbdsvdx( char* uplo, char* jobz, char* range,
lapack_int* n, double* d, double* e, lapack_int* n, double* d, double* e,
lapack_int* vl, lapack_int* vu, double* vl, double* vu,
lapack_int* il, lapack_int* iu, lapack_int* ns, lapack_int* il, lapack_int* iu, lapack_int* ns,
double* s, double* z, lapack_int* ldz, double* s, double* z, lapack_int* ldz,
double* work, lapack_int *iwork, lapack_int *info ); double* work, lapack_int *iwork, lapack_int *info );
@ -16115,24 +16119,24 @@ void LAPACK_zgesvd( char* jobu, char* jobvt, lapack_int* m, lapack_int* n,
lapack_complex_double* work, lapack_int* lwork, lapack_complex_double* work, lapack_int* lwork,
double* rwork, lapack_int *info ); double* rwork, lapack_int *info );
void LAPACK_sgesvdx( char* jobu, char* jobvt, char* range, lapack_int* m, lapack_int* n, void LAPACK_sgesvdx( char* jobu, char* jobvt, char* range, lapack_int* m, lapack_int* n,
float* a, lapack_int* lda, lapack_int* vl, lapack_int* vu, float* a, lapack_int* lda, float* vl, float* vu,
lapack_int* il, lapack_int* iu, lapack_int* ns, float* s, float* u, lapack_int* il, lapack_int* iu, lapack_int* ns, float* s, float* u,
lapack_int* ldu, float* vt, lapack_int* ldvt, float* work, lapack_int* ldu, float* vt, lapack_int* ldvt, float* work,
lapack_int* lwork, lapack_int *iwork, lapack_int *info ); lapack_int* lwork, lapack_int *iwork, lapack_int *info );
void LAPACK_dgesvdx( char* jobu, char* jobvt, char* range, lapack_int* m, lapack_int* n, void LAPACK_dgesvdx( char* jobu, char* jobvt, char* range, lapack_int* m, lapack_int* n,
double* a, lapack_int* lda, lapack_int* vl, lapack_int* vu, double* a, lapack_int* lda, double* vl, double* vu,
lapack_int* il, lapack_int* iu, lapack_int* ns, double* s, double* u, lapack_int* il, lapack_int* iu, lapack_int* ns, double* s, double* u,
lapack_int* ldu, double* vt, lapack_int* ldvt, double* work, lapack_int* ldu, double* vt, lapack_int* ldvt, double* work,
lapack_int* lwork, lapack_int *iwork, lapack_int *info ); lapack_int* lwork, lapack_int *iwork, lapack_int *info );
void LAPACK_cgesvdx( char* jobu, char* jobvt, char* range, lapack_int* m, lapack_int* n, void LAPACK_cgesvdx( char* jobu, char* jobvt, char* range, lapack_int* m, lapack_int* n,
lapack_complex_float* a, lapack_int* lda, lapack_int* vl, lapack_int* vu, lapack_complex_float* a, lapack_int* lda, float* vl, float* vu,
lapack_int* il, lapack_int* iu, lapack_int* ns, float* s, lapack_int* il, lapack_int* iu, lapack_int* ns, float* s,
lapack_complex_float* u, lapack_int* ldu, lapack_complex_float* u, lapack_int* ldu,
lapack_complex_float* vt, lapack_int* ldvt, lapack_complex_float* vt, lapack_int* ldvt,
lapack_complex_float* work, lapack_int* lwork, float* rwork, lapack_complex_float* work, lapack_int* lwork, float* rwork,
lapack_int *iwork, lapack_int *info ); lapack_int *iwork, lapack_int *info );
void LAPACK_zgesvdx( char* jobu, char* jobvt, char* range, lapack_int* m, lapack_int* n, void LAPACK_zgesvdx( char* jobu, char* jobvt, char* range, lapack_int* m, lapack_int* n,
lapack_complex_double* a, lapack_int* lda, lapack_int* vl, lapack_int* vu, lapack_complex_double* a, lapack_int* lda, double* vl, double* vu,
lapack_int* il, lapack_int* iu, lapack_int* ns, double* s, lapack_int* il, lapack_int* iu, lapack_int* ns, double* s,
lapack_complex_double* u, lapack_int* ldu, lapack_complex_double* u, lapack_int* ldu,
lapack_complex_double* vt, lapack_int* ldvt, lapack_complex_double* vt, lapack_int* ldvt,
@ -17060,9 +17064,8 @@ void LAPACK_cbbcsd( char* jobu1, char* jobu2,
float* b12e, float* b21d, float* b21e, float* b12e, float* b21d, float* b21e,
float* b22d, float* b22e, float* rwork, float* b22d, float* b22e, float* rwork,
lapack_int* lrwork , lapack_int *info ); lapack_int* lrwork , lapack_int *info );
void LAPACK_cheswapr( char* uplo, lapack_int* n, void LAPACK_cheswapr( char* uplo, lapack_int* n, lapack_complex_float* a,
lapack_complex_float* a, lapack_int* i1, lapack_int* lda, lapack_int* i1, lapack_int* i2 );
lapack_int* i2 );
void LAPACK_chetri2( char* uplo, lapack_int* n, void LAPACK_chetri2( char* uplo, lapack_int* n,
lapack_complex_float* a, lapack_int* lda, lapack_complex_float* a, lapack_int* lda,
const lapack_int* ipiv, const lapack_int* ipiv,
@ -17079,10 +17082,10 @@ void LAPACK_chetrs2( char* uplo, lapack_int* n,
void LAPACK_csyconv( char* uplo, char* way, void LAPACK_csyconv( char* uplo, char* way,
lapack_int* n, lapack_complex_float* a, lapack_int* n, lapack_complex_float* a,
lapack_int* lda, const lapack_int* ipiv, lapack_int* lda, const lapack_int* ipiv,
lapack_complex_float* work , lapack_int *info ); lapack_complex_float* e , lapack_int *info );
void LAPACK_csyswapr( char* uplo, lapack_int* n, void LAPACK_csyswapr( char* uplo, lapack_int* n,
lapack_complex_float* a, lapack_int* i1, lapack_complex_float* a, lapack_int* lda,
lapack_int* i2 ); lapack_int* i1, lapack_int* i2 );
void LAPACK_csytri2( char* uplo, lapack_int* n, void LAPACK_csytri2( char* uplo, lapack_int* n,
lapack_complex_float* a, lapack_int* lda, lapack_complex_float* a, lapack_int* lda,
const lapack_int* ipiv, const lapack_int* ipiv,
@ -17127,7 +17130,7 @@ void LAPACK_cuncsd2by1( char* jobu1, char* jobu2,
char* jobv1t, lapack_int* m, lapack_int* p, char* jobv1t, lapack_int* m, lapack_int* p,
lapack_int* q, lapack_complex_float* x11, lapack_int* q, lapack_complex_float* x11,
lapack_int* ldx11, lapack_complex_float* x21, lapack_int* ldx11, lapack_complex_float* x21,
lapack_int* ldx21, lapack_complex_float* theta, lapack_int* ldx21, float* theta,
lapack_complex_float* u1, lapack_int* ldu1, lapack_complex_float* u1, lapack_int* ldu1,
lapack_complex_float* u2, lapack_int* ldu2, lapack_complex_float* u2, lapack_int* ldu2,
lapack_complex_float* v1t, lapack_int* ldv1t, lapack_complex_float* v1t, lapack_int* ldv1t,
@ -17173,13 +17176,13 @@ void LAPACK_dorcsd2by1( char* jobu1, char* jobu2,
lapack_int* iwork , lapack_int *info ); lapack_int* iwork , lapack_int *info );
void LAPACK_dsyconv( char* uplo, char* way, void LAPACK_dsyconv( char* uplo, char* way,
lapack_int* n, double* a, lapack_int* lda, lapack_int* n, double* a, lapack_int* lda,
const lapack_int* ipiv, double* work , lapack_int *info ); const lapack_int* ipiv, double* e , lapack_int *info );
void LAPACK_dsyswapr( char* uplo, lapack_int* n, void LAPACK_dsyswapr( char* uplo, lapack_int* n, double* a,
double* a, lapack_int* i1, lapack_int* i2 ); lapack_int* lda, lapack_int* i1, lapack_int* i2 );
void LAPACK_dsytri2( char* uplo, lapack_int* n, void LAPACK_dsytri2( char* uplo, lapack_int* n,
double* a, lapack_int* lda, double* a, lapack_int* lda,
const lapack_int* ipiv, const lapack_int* ipiv,
lapack_complex_double* work, lapack_int* lwork , lapack_int *info ); double* work, lapack_int* lwork , lapack_int *info );
void LAPACK_dsytri2x( char* uplo, lapack_int* n, void LAPACK_dsytri2x( char* uplo, lapack_int* n,
double* a, lapack_int* lda, double* a, lapack_int* lda,
const lapack_int* ipiv, double* work, const lapack_int* ipiv, double* work,
@ -17227,13 +17230,13 @@ void LAPACK_sorcsd2by1( char* jobu1, char* jobu2,
lapack_int* iwork , lapack_int *info ); lapack_int* iwork , lapack_int *info );
void LAPACK_ssyconv( char* uplo, char* way, void LAPACK_ssyconv( char* uplo, char* way,
lapack_int* n, float* a, lapack_int* lda, lapack_int* n, float* a, lapack_int* lda,
const lapack_int* ipiv, float* work , lapack_int *info ); const lapack_int* ipiv, float* e , lapack_int *info );
void LAPACK_ssyswapr( char* uplo, lapack_int* n, void LAPACK_ssyswapr( char* uplo, lapack_int* n, float* a,
float* a, lapack_int* i1, lapack_int* i2 ); lapack_int* lda, lapack_int* i1, lapack_int* i2 );
void LAPACK_ssytri2( char* uplo, lapack_int* n, void LAPACK_ssytri2( char* uplo, lapack_int* n,
float* a, lapack_int* lda, float* a, lapack_int* lda,
const lapack_int* ipiv, const lapack_int* ipiv,
lapack_complex_float* work, lapack_int* lwork , lapack_int *info ); float* work, lapack_int* lwork , lapack_int *info );
void LAPACK_ssytri2x( char* uplo, lapack_int* n, void LAPACK_ssytri2x( char* uplo, lapack_int* n,
float* a, lapack_int* lda, float* a, lapack_int* lda,
const lapack_int* ipiv, float* work, const lapack_int* ipiv, float* work,
@ -17254,9 +17257,8 @@ void LAPACK_zbbcsd( char* jobu1, char* jobu2,
double* b12e, double* b21d, double* b21e, double* b12e, double* b21d, double* b21e,
double* b22d, double* b22e, double* rwork, double* b22d, double* b22e, double* rwork,
lapack_int* lrwork , lapack_int *info ); lapack_int* lrwork , lapack_int *info );
void LAPACK_zheswapr( char* uplo, lapack_int* n, void LAPACK_zheswapr( char* uplo, lapack_int* n, lapack_complex_double* a,
lapack_complex_double* a, lapack_int* i1, lapack_int* lda, lapack_int* i1, lapack_int* i2 );
lapack_int* i2 );
void LAPACK_zhetri2( char* uplo, lapack_int* n, void LAPACK_zhetri2( char* uplo, lapack_int* n,
lapack_complex_double* a, lapack_int* lda, lapack_complex_double* a, lapack_int* lda,
const lapack_int* ipiv, const lapack_int* ipiv,
@ -17274,9 +17276,9 @@ void LAPACK_zhetrs2( char* uplo, lapack_int* n,
void LAPACK_zsyconv( char* uplo, char* way, void LAPACK_zsyconv( char* uplo, char* way,
lapack_int* n, lapack_complex_double* a, lapack_int* n, lapack_complex_double* a,
lapack_int* lda, const lapack_int* ipiv, lapack_int* lda, const lapack_int* ipiv,
lapack_complex_double* work , lapack_int *info ); lapack_complex_double* e , lapack_int *info );
void LAPACK_zsyswapr( char* uplo, lapack_int* n, void LAPACK_zsyswapr( char* uplo, lapack_int* n, lapack_complex_double* a,
lapack_complex_double* a, lapack_int* i1, lapack_int* lda, lapack_int* i1,
lapack_int* i2 ); lapack_int* i2 );
void LAPACK_zsytri2( char* uplo, lapack_int* n, void LAPACK_zsytri2( char* uplo, lapack_int* n,
lapack_complex_double* a, lapack_int* lda, lapack_complex_double* a, lapack_int* lda,
@ -17323,7 +17325,7 @@ void LAPACK_zuncsd2by1( char* jobu1, char* jobu2,
char* jobv1t, lapack_int* m, lapack_int* p, char* jobv1t, lapack_int* m, lapack_int* p,
lapack_int* q, lapack_complex_double* x11, lapack_int* q, lapack_complex_double* x11,
lapack_int* ldx11, lapack_complex_double* x21, lapack_int* ldx11, lapack_complex_double* x21,
lapack_int* ldx21, lapack_complex_double* theta, lapack_int* ldx21, double* theta,
lapack_complex_double* u1, lapack_int* ldu1, lapack_complex_double* u1, lapack_int* ldu1,
lapack_complex_double* u2, lapack_int* ldu2, lapack_complex_double* u2, lapack_int* ldu2,
lapack_complex_double* v1t, lapack_int* ldv1t, lapack_complex_double* v1t, lapack_int* ldv1t,

View File

@ -34,13 +34,6 @@
#ifndef _LAPACKE_CONFIG_H_ #ifndef _LAPACKE_CONFIG_H_
#define _LAPACKE_CONFIG_H_ #define _LAPACKE_CONFIG_H_
// For Android prior to API 21 (no <complex> include)
#if defined(__ANDROID__)
#if __ANDROID_API__ < 21
#define LAPACK_COMPLEX_STRUCTURE
#endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
#if defined(LAPACK_COMPLEX_CPP) #if defined(LAPACK_COMPLEX_CPP)
#include <complex> #include <complex>

View File

@ -0,0 +1,17 @@
#ifndef LAPACK_HEADER_INCLUDED
#define LAPACK_HEADER_INCLUDED
#ifndef LAPACK_GLOBAL
#if defined(LAPACK_GLOBAL_PATTERN_LC) || defined(ADD_)
#define LAPACK_GLOBAL(lcname,UCNAME) lcname##_
#elif defined(LAPACK_GLOBAL_PATTERN_UC) || defined(UPPER)
#define LAPACK_GLOBAL(lcname,UCNAME) UCNAME
#elif defined(LAPACK_GLOBAL_PATTERN_MC) || defined(NOCHANGE)
#define LAPACK_GLOBAL(lcname,UCNAME) lcname
#else
#define LAPACK_GLOBAL(lcname,UCNAME) lcname##_
#endif
#endif
#endif

View File

@ -34,7 +34,7 @@
# #
include ../../make.inc include ../../make.inc
SRC_OBJA = \ SRC_OBJ = \
lapacke_cbbcsd.o \ lapacke_cbbcsd.o \
lapacke_cbbcsd_work.o \ lapacke_cbbcsd_work.o \
lapacke_cbdsqr.o \ lapacke_cbdsqr.o \
@ -996,9 +996,7 @@ lapacke_dsytri2.o \
lapacke_dsytri2_work.o \ lapacke_dsytri2_work.o \
lapacke_dsytri2x.o \ lapacke_dsytri2x.o \
lapacke_dsytri2x_work.o \ lapacke_dsytri2x_work.o \
lapacke_dsytri_work.o lapacke_dsytri_work.o \
SRC_OBJB = \
lapacke_dsytrs.o \ lapacke_dsytrs.o \
lapacke_dsytrs_rook.o \ lapacke_dsytrs_rook.o \
lapacke_dsytrs2.o \ lapacke_dsytrs2.o \
@ -2191,8 +2189,7 @@ lapacke_slagsy_work.o \
lapacke_zlagsy.o \ lapacke_zlagsy.o \
lapacke_zlagsy_work.o lapacke_zlagsy_work.o
ALLOBJA = $(SRC_OBJA) ALLOBJ = $(SRC_OBJ) $(MATGEN_OBJ)
ALLOBJB = $(SRC_OBJB) $(MATGEN_OBJ)
ifdef USEXBLAS ifdef USEXBLAS
ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC) ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC)
@ -2206,9 +2203,8 @@ OBJ_FILES := $(C_FILES:.o=.o)
all: ../../$(LAPACKELIB) all: ../../$(LAPACKELIB)
../../$(LAPACKELIB): $(ALLOBJA) $(ALLOBJB) $(ALLXOBJ) $(DEPRECATED) ../../$(LAPACKELIB): $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED)
$(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(ALLOBJA) $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED)
$(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(ALLOBJB) $(ALLXOBJ) $(DEPRECATED)
$(RANLIB) ../../$(LAPACKELIB) $(RANLIB) ../../$(LAPACKELIB)
.c.o: .c.o:

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function cgejsv * Contents: Native high-level C interface to LAPACK function cgejsv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -119,7 +119,7 @@ lapack_int LAPACKE_cgejsv( int matrix_layout, char joba, char jobu, char jobv,
( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) && ( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) &&
( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) &&
( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) : ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) :
1 )))))))); 7 ))))))));
lapack_int* iwork = NULL; lapack_int* iwork = NULL;
float* rwork = NULL; float* rwork = NULL;
lapack_complex_float* cwork = NULL; lapack_complex_float* cwork = NULL;
@ -136,30 +136,29 @@ lapack_int LAPACKE_cgejsv( int matrix_layout, char joba, char jobu, char jobv,
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) { if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -10; return -10;
} }
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) {
if( LAPACKE_cge_nancheck( matrix_layout, nu, n, u, ldu ) ) {
return -13;
}
}
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
if( LAPACKE_cge_nancheck( matrix_layout, nv, n, v, ldv ) ) {
return -15;
}
}
#endif #endif
/* Allocate memory for working array(s) */ /* Allocate memory for working array(s) */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m+3*n) ); iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(3,m+2*n) );
if( iwork == NULL ) { if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
lwork = MAX( lwork, 1 );
{ /* FIXUP LWORK */
int want_u = LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' );
int want_v = LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' );
int want_sce = LAPACKE_lsame( joba, 'e' ) || LAPACKE_lsame( joba, 'g' );
if( !want_u && !want_v && !want_sce ) lwork = MAX( lwork, 2*n+1 ); // 1.1
if( !want_u && !want_v && want_sce ) lwork = MAX( lwork, n*n+3*n ); // 1.2
if( want_u && LAPACKE_lsame( jobv, 'v' ) ) lwork = MAX( lwork, 5*n+2*n*n ); // 4.1
if( want_u && LAPACKE_lsame( jobv, 'j' ) ) lwork = MAX( lwork, 4*n+n*n ); // 4.2
}
cwork = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lwork ); cwork = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( cwork == NULL ) { if( cwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1; goto exit_level_1;
} }
lrwork = MAX3( lrwork, 7, n+2*m );
rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork ); rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
if( rwork == NULL ) { if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cgejsv * Contents: Native middle-level C interface to LAPACK function cgejsv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -46,7 +46,7 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu,
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_cgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a, LAPACK_cgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a,
&lda, sva, u, &ldu, v, &ldv, cwork, &lwork, rwork, &lwork, &lda, sva, u, &ldu, v, &ldv, cwork, &lwork, rwork, &lrwork,
iwork, &info ); iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
@ -54,6 +54,8 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu,
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m; lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
lapack_int nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n; lapack_int nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
lapack_int ncols_u = LAPACKE_lsame( jobu, 'n' ) ? 1 :
LAPACKE_lsame( jobu, 'f' ) ? m : n;
lapack_int lda_t = MAX(1,m); lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nu); lapack_int ldu_t = MAX(1,nu);
lapack_int ldv_t = MAX(1,nv); lapack_int ldv_t = MAX(1,nv);
@ -66,7 +68,7 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu,
LAPACKE_xerbla( "LAPACKE_cgejsv_work", info ); LAPACKE_xerbla( "LAPACKE_cgejsv_work", info );
return info; return info;
} }
if( ldu < n ) { if( ldu < ncols_u ) {
info = -14; info = -14;
LAPACKE_xerbla( "LAPACKE_cgejsv_work", info ); LAPACKE_xerbla( "LAPACKE_cgejsv_work", info );
return info; return info;
@ -86,7 +88,7 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu,
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) { LAPACKE_lsame( jobu, 'w' ) ) {
u_t = (lapack_complex_float*) u_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * ldu_t * MAX(1,n) ); LAPACKE_malloc( sizeof(lapack_complex_float) * ldu_t * MAX(1,ncols_u) );
if( u_t == NULL ) { if( u_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_1; goto exit_level_1;
@ -103,14 +105,6 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu,
} }
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) {
LAPACKE_cge_trans( matrix_layout, nu, n, u, ldu, u_t, ldu_t );
}
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
LAPACKE_cge_trans( matrix_layout, nv, n, v, ldv, v_t, ldv_t );
}
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_cgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a_t, LAPACK_cgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a_t,
&lda_t, sva, u_t, &ldu_t, v_t, &ldv_t, cwork, &lwork, &lda_t, sva, u_t, &ldu_t, v_t, &ldv_t, cwork, &lwork,
@ -121,7 +115,7 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu,
/* Transpose output matrices */ /* Transpose output matrices */
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) { LAPACKE_lsame( jobu, 'w' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, nu, n, u_t, ldu_t, u, ldu ); LAPACKE_cge_trans( LAPACK_COL_MAJOR, nu, ncols_u, u_t, ldu_t, u, ldu );
} }
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) || if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) { LAPACKE_lsame( jobv, 'w' ) ) {

View File

@ -28,7 +28,7 @@
****************************************************************************** ******************************************************************************
* Contents: Native high-level C interface to LAPACK function cgemqrt * Contents: Native high-level C interface to LAPACK function cgemqrt
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -40,6 +40,7 @@ lapack_int LAPACKE_cgemqrt( int matrix_layout, char side, char trans,
lapack_int ldt, lapack_complex_float* c, lapack_int ldt, lapack_complex_float* c,
lapack_int ldc ) lapack_int ldc )
{ {
lapack_int nrows_v;
lapack_int info = 0; lapack_int info = 0;
lapack_complex_float* work = NULL; lapack_complex_float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@ -48,13 +49,15 @@ lapack_int LAPACKE_cgemqrt( int matrix_layout, char side, char trans,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
( LAPACKE_lsame( side, 'R' ) ? n : 0 );
if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) { if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
return -12; return -12;
} }
if( LAPACKE_cge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) { if( LAPACKE_cge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
return -10; return -10;
} }
if( LAPACKE_cge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
return -8; return -8;
} }
#endif #endif

View File

@ -28,15 +28,15 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function cgesvdx * Contents: Native high-level C interface to LAPACK function cgesvdx
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_cgesvdx( int matrix_layout, char jobu, char jobvt, char range, lapack_int LAPACKE_cgesvdx( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, lapack_complex_float* a, lapack_int m, lapack_int n, lapack_complex_float* a,
lapack_int lda, lapack_int vl, lapack_int vu, lapack_int lda, float vl, float vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
float* s, lapack_complex_float* u, lapack_int ldu, float* s, lapack_complex_float* u, lapack_int ldu,
lapack_complex_float* vt, lapack_int ldvt, lapack_complex_float* vt, lapack_int ldvt,
lapack_int* superb ) lapack_int* superb )
@ -44,9 +44,9 @@ lapack_int LAPACKE_cgesvdx( int matrix_layout, char jobu, char jobvt, char range
lapack_int info = 0; lapack_int info = 0;
lapack_int lwork = -1; lapack_int lwork = -1;
lapack_complex_float* work = NULL; lapack_complex_float* work = NULL;
lapack_complex_float work_query; lapack_complex_float work_query;
float* rwork = NULL; float* rwork = NULL;
lapack_int lrwork = MIN(m,n)*(MIN(m,n)*2+15*MIN(m,n)); lapack_int lrwork = MAX(1, MIN(m,n)*(MIN(m,n)*2+15*MIN(m,n)));
lapack_int* iwork = NULL; lapack_int* iwork = NULL;
lapack_int i; lapack_int i;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@ -68,18 +68,18 @@ lapack_int LAPACKE_cgesvdx( int matrix_layout, char jobu, char jobvt, char range
} }
lwork = LAPACK_C2INT (work_query); lwork = LAPACK_C2INT (work_query);
/* Allocate memory for work arrays */ /* Allocate memory for work arrays */
rwork = (float*)LAPACKE_malloc( sizeof(float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
work = (lapack_complex_float*) work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lrwork ); LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) { if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1; goto exit_level_1;
} }
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * (12*MIN(m,n)) ); rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,(12*MIN(m,n))) );
if( iwork == NULL ) { if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_2; goto exit_level_2;

View File

@ -28,15 +28,15 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cgesvdx * Contents: Native middle-level C interface to LAPACK function cgesvdx
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, lapack_complex_float* a, lapack_int m, lapack_int n, lapack_complex_float* a,
lapack_int lda, lapack_int vl, lapack_int vu, lapack_int lda, float vl, float vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
float* s, lapack_complex_float* u, lapack_int ldu, float* s, lapack_complex_float* u, lapack_int ldu,
lapack_complex_float* vt, lapack_int ldvt, lapack_complex_float* vt, lapack_int ldvt,
lapack_complex_float* work, lapack_int lwork, lapack_complex_float* work, lapack_int lwork,
@ -46,21 +46,23 @@ lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda, &vl, &vu, LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda, &vl, &vu,
&il, &iu, &ns, s, u, &ldu, vt, &ldvt, &il, &iu, ns, s, u, &ldu, vt, &ldvt,
work, &lwork, rwork, iwork, &info ); work, &lwork, rwork, iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nrows_u = ( LAPACKE_lsame( jobu, 'a' ) || lapack_int nrows_u = LAPACKE_lsame( jobu, 'v' ) ? m : 0;
LAPACKE_lsame( jobu, 's' ) ) ? m : 1; lapack_int ncols_u = LAPACKE_lsame( jobu, 'v' ) ?
lapack_int ncols_u = LAPACKE_lsame( jobu, 'a' ) ? m : ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0;
( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1); lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'v' ) ?
lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n : ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0;
( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1); lapack_int ncols_vt = LAPACKE_lsame( jobvt, 'v' ) ? n : 0;
lapack_int lda_t = MAX(1,m); lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nrows_u); lapack_int ldu_t = MAX(1,nrows_u);
lapack_int ldvt_t = MAX(1,nrows_vt); lapack_int ldvt_t = MAX(1,nrows_vt);
lapack_complex_float* a_t = NULL; lapack_complex_float* a_t = NULL;
lapack_complex_float* u_t = NULL; lapack_complex_float* u_t = NULL;
lapack_complex_float* vt_t = NULL; lapack_complex_float* vt_t = NULL;
@ -75,7 +77,7 @@ lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char
LAPACKE_xerbla( "LAPACKE_cgesvdx_work", info ); LAPACKE_xerbla( "LAPACKE_cgesvdx_work", info );
return info; return info;
} }
if( ldvt < n ) { if( ldvt < ncols_vt ) {
info = -18; info = -18;
LAPACKE_xerbla( "LAPACKE_cgesvdx_work", info ); LAPACKE_xerbla( "LAPACKE_cgesvdx_work", info );
return info; return info;
@ -83,7 +85,7 @@ lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu,
&il, &iu, &ns, s, u, &ldu_t, vt, &il, &iu, ns, s, u, &ldu_t, vt,
&ldvt_t, work, &lwork, rwork, iwork, &info ); &ldvt_t, work, &lwork, rwork, iwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
@ -94,7 +96,7 @@ lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { if( LAPACKE_lsame( jobu, 'v' ) ) {
u_t = (lapack_complex_float*) u_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * ldu_t * MAX(1,ncols_u) ); LAPACKE_malloc( sizeof(lapack_complex_float) * ldu_t * MAX(1,ncols_u) );
if( u_t == NULL ) { if( u_t == NULL ) {
@ -102,7 +104,7 @@ lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char
goto exit_level_1; goto exit_level_1;
} }
} }
if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { if( LAPACKE_lsame( jobvt, 'v' ) ) {
vt_t = (lapack_complex_float*) vt_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * ldvt_t * MAX(1,n) ); LAPACKE_malloc( sizeof(lapack_complex_float) * ldvt_t * MAX(1,n) );
if( vt_t == NULL ) { if( vt_t == NULL ) {
@ -113,28 +115,28 @@ lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu,
&il, &iu, &ns, s, u, &ldu_t, vt, &il, &iu, ns, s, u_t, &ldu_t, vt_t,
&ldvt_t, work, &lwork, rwork, iwork, &info ); &ldvt_t, work, &lwork, rwork, iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
/* Transpose output matrices */ /* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda ); LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { if( LAPACKE_lsame( jobu, 'v' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t, LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t,
u, ldu ); u, ldu );
} }
if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { if( LAPACKE_lsame( jobvt, 'v' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt, LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt,
ldvt ); ldvt );
} }
/* Release memory and exit */ /* Release memory and exit */
if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { if( LAPACKE_lsame( jobvt, 'v' ) ) {
LAPACKE_free( vt_t ); LAPACKE_free( vt_t );
} }
exit_level_2: exit_level_2:
if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { if( LAPACKE_lsame( jobu, 'v' ) ) {
LAPACKE_free( u_t ); LAPACKE_free( u_t );
} }
exit_level_1: exit_level_1:

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function cgesvj * Contents: Native high-level C interface to LAPACK function cgesvj
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -52,8 +52,8 @@ lapack_int LAPACKE_cgesvj( int matrix_layout, char joba, char jobu, char jobv,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n : nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
( LAPACKE_lsame( jobv, 'a' ) ? mv : 1); ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0);
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) { if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -7; return -7;
} }

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cgesvj * Contents: Native middle-level C interface to LAPACK function cgesvj
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -50,8 +50,8 @@ lapack_int LAPACKE_cgesvj_work( int matrix_layout, char joba, char jobu,
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n : lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
( LAPACKE_lsame( jobv, 'a' ) ? mv : 1); ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0);
lapack_int lda_t = MAX(1,m); lapack_int lda_t = MAX(1,m);
lapack_int ldv_t = MAX(1,nrows_v); lapack_int ldv_t = MAX(1,nrows_v);
lapack_complex_float* a_t = NULL; lapack_complex_float* a_t = NULL;

View File

@ -93,9 +93,9 @@ lapack_int LAPACKE_cggsvd3_work( int matrix_layout, char jobu, char jobv,
} }
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_cggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a_t, LAPACK_cggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a,
&lda_t, b_t, &ldb_t, alpha, beta, u_t, &ldu_t, &lda_t, b, &ldb_t, alpha, beta, u, &ldu_t,
v_t, &ldv_t, q_t, &ldq_t, work, &lwork, rwork, v, &ldv_t, q, &ldq_t, work, &lwork, rwork,
iwork, &info ); iwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }

View File

@ -87,16 +87,16 @@ lapack_int LAPACKE_cggsvp3_work( int matrix_layout, char jobu, char jobv,
LAPACKE_xerbla( "LAPACKE_cggsvp3_work", info ); LAPACKE_xerbla( "LAPACKE_cggsvp3_work", info );
return info; return info;
} }
if( ldv < m ) { if( ldv < p ) {
info = -19; info = -19;
LAPACKE_xerbla( "LAPACKE_cggsvp3_work", info ); LAPACKE_xerbla( "LAPACKE_cggsvp3_work", info );
return info; return info;
} }
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_cggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a_t, &lda_t, b_t, LAPACK_cggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a, &lda_t, b,
&ldb_t, &tola, &tolb, k, l, u_t, &ldu_t, v_t, &ldv_t, &ldb_t, &tola, &tolb, k, l, u, &ldu_t, v, &ldv_t,
q_t, &ldq_t, iwork, rwork, tau, work, &lwork, &info ); q, &ldq_t, iwork, rwork, tau, work, &lwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
@ -124,7 +124,7 @@ lapack_int LAPACKE_cggsvp3_work( int matrix_layout, char jobu, char jobv,
if( LAPACKE_lsame( jobv, 'v' ) ) { if( LAPACKE_lsame( jobv, 'v' ) ) {
v_t = (lapack_complex_float*) v_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * LAPACKE_malloc( sizeof(lapack_complex_float) *
ldv_t * MAX(1,m) ); ldv_t * MAX(1,p) );
if( v_t == NULL ) { if( v_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_3; goto exit_level_3;
@ -156,7 +156,7 @@ lapack_int LAPACKE_cggsvp3_work( int matrix_layout, char jobu, char jobv,
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu ); LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
} }
if( LAPACKE_lsame( jobv, 'v' ) ) { if( LAPACKE_lsame( jobv, 'v' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, p, m, v_t, ldv_t, v, ldv ); LAPACKE_cge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv );
} }
if( LAPACKE_lsame( jobq, 'q' ) ) { if( LAPACKE_lsame( jobq, 'q' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq ); LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function chbtrd * Contents: Native high-level C interface to LAPACK function chbtrd
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -49,7 +49,7 @@ lapack_int LAPACKE_chbtrd( int matrix_layout, char vect, char uplo, lapack_int n
if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) { if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
return -6; return -6;
} }
if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) { if( LAPACKE_lsame( vect, 'u' ) ) {
if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) { if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
return -10; return -10;
} }

View File

@ -28,14 +28,14 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function cheswapr * Contents: Native high-level C interface to LAPACK function cheswapr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_cheswapr( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_cheswapr( int matrix_layout, char uplo, lapack_int n,
lapack_complex_float* a, lapack_int i1, lapack_complex_float* a, lapack_int lda,
lapack_int i2 ) lapack_int i1, lapack_int i2 )
{ {
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cheswapr", -1 ); LAPACKE_xerbla( "LAPACKE_cheswapr", -1 );
@ -43,9 +43,9 @@ lapack_int LAPACKE_cheswapr( int matrix_layout, char uplo, lapack_int n,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, n ) ) { if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -4; return -4;
} }
#endif #endif
return LAPACKE_cheswapr_work( matrix_layout, uplo, n, a, i1, i2 ); return LAPACKE_cheswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
} }

View File

@ -28,38 +28,39 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cheswapr * Contents: Native middle-level C interface to LAPACK function cheswapr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_cheswapr_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_cheswapr_work( int matrix_layout, char uplo, lapack_int n,
lapack_complex_float* a, lapack_int i1, lapack_complex_float* a, lapack_int lda,
lapack_int i2 ) lapack_int i1, lapack_int i2 )
{ {
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_cheswapr( &uplo, &n, a, &i1, &i2 ); LAPACK_cheswapr( &uplo, &n, a, &lda, &i1, &i2 );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,n);
lapack_complex_float* a_t = NULL; lapack_complex_float* a_t = NULL;
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
a_t = (lapack_complex_float*) a_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * n * MAX(1,n) ); LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
if( a_t == NULL ) { if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_che_trans( matrix_layout, uplo, n, a, n, a_t, n ); LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_cheswapr( &uplo, &n, a_t, &i1, &i2 ); LAPACK_cheswapr( &uplo, &n, a_t, &lda_t, &i1, &i2 );
info = 0; /* LAPACK call is ok! */ info = 0; /* LAPACK call is ok! */
/* Transpose output matrices */ /* Transpose output matrices */
LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n ); LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
/* Release memory and exit */ /* Release memory and exit */
LAPACKE_free( a_t ); LAPACKE_free( a_t );
exit_level_0: exit_level_0:

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function chetri2x * Contents: Native high-level C interface to LAPACK function chetri2x
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -45,7 +45,7 @@ lapack_int LAPACKE_chetri2x( int matrix_layout, char uplo, lapack_int n,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, lda, n, a, lda ) ) { if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
return -4; return -4;
} }
#endif #endif

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function clantr * Contents: Native high-level C interface to LAPACK function clantr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"

View File

@ -123,7 +123,7 @@ lapack_int LAPACKE_clarfb_work( int matrix_layout, char side, char trans,
LAPACKE_cge_trans( matrix_layout, nrows_v, ncols_v-k, &v[k], ldv, LAPACKE_cge_trans( matrix_layout, nrows_v, ncols_v-k, &v[k], ldv,
&v_t[k*ldv_t], ldv_t ); &v_t[k*ldv_t], ldv_t );
} else if( LAPACKE_lsame( storev, 'r' ) && } else if( LAPACKE_lsame( storev, 'r' ) &&
LAPACKE_lsame( direct, 'b' ) ) { LAPACKE_lsame( direct, 'f' ) ) {
if( k > ncols_v ) { if( k > ncols_v ) {
LAPACKE_xerbla( "LAPACKE_clarfb_work", -8 ); LAPACKE_xerbla( "LAPACKE_clarfb_work", -8 );
return -8; return -8;

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function slaswp * Contents: Native high-level C interface to LAPACK function slaswp
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -46,50 +46,64 @@ lapack_int LAPACKE_clascl( int matrix_layout, char type, lapack_int kl,
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
switch (type) { switch (type) {
case 'G': case 'G':
if( LAPACKE_cge_nancheck( matrix_layout, lda, n, a, lda ) ) { if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -9; return -9;
} }
break; break;
case 'L': case 'L':
// TYPE = 'L' - lower triangular matrix. // TYPE = 'L' - lower triangle of general matrix
if( LAPACKE_ctr_nancheck( matrix_layout, 'L', 'N', n, a, lda ) ) { if( matrix_layout == LAPACK_COL_MAJOR &&
return -9; LAPACKE_cgb_nancheck( matrix_layout, m, n, m-1, 0, a, lda+1 ) ) {
} return -9;
}
if( matrix_layout == LAPACK_ROW_MAJOR &&
LAPACKE_cgb_nancheck( LAPACK_COL_MAJOR, n, m, 0, m-1, a-m+1, lda+1 ) ) {
return -9;
}
break; break;
case 'U': case 'U':
// TYPE = 'U' - upper triangular matrix // TYPE = 'U' - upper triangle of general matrix
if( LAPACKE_ctr_nancheck( matrix_layout, 'U', 'N', n, a, lda ) ) { if( matrix_layout == LAPACK_COL_MAJOR &&
return -9; LAPACKE_cgb_nancheck( matrix_layout, m, n, 0, n-1, a-n+1, lda+1 ) ) {
} return -9;
}
if( matrix_layout == LAPACK_ROW_MAJOR &&
LAPACKE_cgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 0, a, lda+1 ) ) {
return -9;
}
break; break;
case 'H': case 'H':
// TYPE = 'H' - upper Hessenberg matrix // TYPE = 'H' - part of upper Hessenberg matrix in general matrix
if( LAPACKE_chs_nancheck( matrix_layout, n, a, lda ) ) { if( matrix_layout == LAPACK_COL_MAJOR &&
return -9; LAPACKE_cgb_nancheck( matrix_layout, m, n, 1, n-1, a-n+1, lda+1 ) ) {
} return -9;
break; }
if( matrix_layout == LAPACK_ROW_MAJOR &&
LAPACKE_cgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 1, a-1, lda+1 ) ) {
return -9;
}
case 'B': case 'B':
// TYPE = 'B' - A is a symmetric band matrix with lower bandwidth KL // TYPE = 'B' - lower part of symmetric band matrix (assume m==n)
// and upper bandwidth KU and with the only the lower if( LAPACKE_chb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) {
// half stored. return -9;
if( LAPACKE_chb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) { }
return -9; break;
} case 'Q':
break; // TYPE = 'Q' - upper part of symmetric band matrix (assume m==n)
case 'Q': if( LAPACKE_chb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) {
// TYPE = 'Q' - A is a symmetric band matrix with lower bandwidth KL return -9;
// and upper bandwidth KU and with the only the upper }
// half stored.
if( LAPACKE_chb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) {
return -9;
}
break; break;
case 'Z': case 'Z':
// TYPE = 'Z' - A is a band matrix with lower bandwidth KL and upper // TYPE = 'Z' - band matrix laid out for ?GBTRF
// bandwidth KU. See DGBTRF for storage details. if( matrix_layout == LAPACK_COL_MAJOR &&
if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, a, lda ) ) { LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, a+kl, lda ) ) {
return -6; return -9;
} }
if( matrix_layout == LAPACK_ROW_MAJOR &&
LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, a+lda*kl, lda ) ) {
return -9;
}
break; break;
} }
#endif #endif

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function slaswp * Contents: Native middle-level C interface to LAPACK function slaswp
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -46,7 +46,10 @@ lapack_int LAPACKE_clascl_work( int matrix_layout, char type, lapack_int kl,
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,lda); lapack_int nrows_a = LAPACKE_lsame(type, 'b') ? kl + 1 :
LAPACKE_lsame(type, 'q') ? ku + 1 :
LAPACKE_lsame(type, 'z') ? 2 * kl + ku + 1 : m;
lapack_int lda_t = MAX(1,nrows_a);
lapack_complex_float* a_t = NULL; lapack_complex_float* a_t = NULL;
/* Check leading dimension(s) */ /* Check leading dimension(s) */
if( lda < n ) { if( lda < n ) {
@ -62,12 +65,14 @@ lapack_int LAPACKE_clascl_work( int matrix_layout, char type, lapack_int kl,
goto exit_level_0; goto exit_level_0;
} }
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); LAPACKE_cge_trans( matrix_layout, nrows_a, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_clascl( &type, &kl, &ku, &cfrom, &cto, &m, &n, a_t, &lda_t, &info); LAPACK_clascl( &type, &kl, &ku, &cfrom, &cto, &m, &n, a_t, &lda_t, &info);
info = 0; /* LAPACK call is ok! */ if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */ /* Transpose output matrices */
LAPACKE_cge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda ); LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_a, n, a_t, lda_t, a, lda );
/* Release memory and exit */ /* Release memory and exit */
LAPACKE_free( a_t ); LAPACKE_free( a_t );
exit_level_0: exit_level_0:

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function cstedc * Contents: Native high-level C interface to LAPACK function cstedc
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -58,7 +58,7 @@ lapack_int LAPACKE_cstedc( int matrix_layout, char compz, lapack_int n, float* d
if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
return -5; return -5;
} }
if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) { if( LAPACKE_lsame( compz, 'v' ) ) {
if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) { if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
return -6; return -6;
} }

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function csteqr * Contents: Native high-level C interface to LAPACK function csteqr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -52,7 +52,7 @@ lapack_int LAPACKE_csteqr( int matrix_layout, char compz, lapack_int n, float* d
if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
return -5; return -5;
} }
if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) { if( LAPACKE_lsame( compz, 'v' ) ) {
if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) { if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
return -6; return -6;
} }

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function csyconv * Contents: Native high-level C interface to LAPACK function csyconv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -36,7 +36,7 @@
lapack_int LAPACKE_csyconv( int matrix_layout, char uplo, char way, lapack_int n, lapack_int LAPACKE_csyconv( int matrix_layout, char uplo, char way, lapack_int n,
lapack_complex_float* a, lapack_int lda, lapack_complex_float* a, lapack_int lda,
const lapack_int* ipiv, const lapack_int* ipiv,
lapack_complex_float* work ) lapack_complex_float* e )
{ {
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@ -45,13 +45,13 @@ lapack_int LAPACKE_csyconv( int matrix_layout, char uplo, char way, lapack_int n
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, lda, n, a, lda ) ) { if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
return -5; return -5;
} }
#endif #endif
/* Call middle-level interface */ /* Call middle-level interface */
info = LAPACKE_csyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv, info = LAPACKE_csyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv,
work ); e );
exit_level_0: exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) { if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_csyconv", info ); LAPACKE_xerbla( "LAPACKE_csyconv", info );

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function csyconv * Contents: Native middle-level C interface to LAPACK function csyconv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -36,12 +36,12 @@
lapack_int LAPACKE_csyconv_work( int matrix_layout, char uplo, char way, lapack_int LAPACKE_csyconv_work( int matrix_layout, char uplo, char way,
lapack_int n, lapack_complex_float* a, lapack_int n, lapack_complex_float* a,
lapack_int lda, const lapack_int* ipiv, lapack_int lda, const lapack_int* ipiv,
lapack_complex_float* work ) lapack_complex_float* e )
{ {
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_csyconv( &uplo, &way, &n, a, &lda, ipiv, work, &info ); LAPACK_csyconv( &uplo, &way, &n, a, &lda, ipiv, e, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
@ -64,7 +64,7 @@ lapack_int LAPACKE_csyconv_work( int matrix_layout, char uplo, char way,
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); LAPACKE_cge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_csyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, work, &info ); LAPACK_csyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, e, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }

View File

@ -28,14 +28,14 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function csyswapr * Contents: Native high-level C interface to LAPACK function csyswapr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_csyswapr( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_csyswapr( int matrix_layout, char uplo, lapack_int n,
lapack_complex_float* a, lapack_int i1, lapack_complex_float* a, lapack_int lda,
lapack_int i2 ) lapack_int i1, lapack_int i2 )
{ {
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_csyswapr", -1 ); LAPACKE_xerbla( "LAPACKE_csyswapr", -1 );
@ -43,9 +43,9 @@ lapack_int LAPACKE_csyswapr( int matrix_layout, char uplo, lapack_int n,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, n ) ) { if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -4; return -4;
} }
#endif #endif
return LAPACKE_csyswapr_work( matrix_layout, uplo, n, a, i1, i2 ); return LAPACKE_csyswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
} }

View File

@ -28,38 +28,39 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function csyswapr * Contents: Native middle-level C interface to LAPACK function csyswapr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_csyswapr_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_csyswapr_work( int matrix_layout, char uplo, lapack_int n,
lapack_complex_float* a, lapack_int i1, lapack_complex_float* a, lapack_int lda,
lapack_int i2 ) lapack_int i1, lapack_int i2 )
{ {
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_csyswapr( &uplo, &n, a, &i1, &i2 ); LAPACK_csyswapr( &uplo, &n, a, &lda, &i1, &i2 );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,n);
lapack_complex_float* a_t = NULL; lapack_complex_float* a_t = NULL;
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
a_t = (lapack_complex_float*) a_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * n * MAX(1,n) ); LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
if( a_t == NULL ) { if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_csy_trans( matrix_layout, uplo, n, a, n, a_t, n ); LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_csyswapr( &uplo, &n, a_t, &i1, &i2 ); LAPACK_csyswapr( &uplo, &n, a_t, &lda_t, &i1, &i2 );
info = 0; /* LAPACK call is ok! */ info = 0; /* LAPACK call is ok! */
/* Transpose output matrices */ /* Transpose output matrices */
LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n ); LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
/* Release memory and exit */ /* Release memory and exit */
LAPACKE_free( a_t ); LAPACKE_free( a_t );
exit_level_0: exit_level_0:

View File

@ -28,7 +28,7 @@
****************************************************************************** ******************************************************************************
* Contents: Native high-level C interface to LAPACK function ctpmqrt * Contents: Native high-level C interface to LAPACK function ctpmqrt
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -41,6 +41,8 @@ lapack_int LAPACKE_ctpmqrt( int matrix_layout, char side, char trans,
lapack_complex_float* a, lapack_int lda, lapack_complex_float* a, lapack_int lda,
lapack_complex_float* b, lapack_int ldb ) lapack_complex_float* b, lapack_int ldb )
{ {
lapack_int ncols_a, nrows_a;
lapack_int nrows_v;
lapack_int info = 0; lapack_int info = 0;
lapack_complex_float* work = NULL; lapack_complex_float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@ -49,16 +51,22 @@ lapack_int LAPACKE_ctpmqrt( int matrix_layout, char side, char trans,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) { ncols_a = LAPACKE_lsame( side, 'L' ) ? n :
( LAPACKE_lsame( side, 'R' ) ? k : 0 );
nrows_a = LAPACKE_lsame( side, 'L' ) ? k :
( LAPACKE_lsame( side, 'R' ) ? m : 0 );
nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
( LAPACKE_lsame( side, 'R' ) ? n : 0 );
if( LAPACKE_cge_nancheck( matrix_layout, nrows_a, ncols_a, a, lda ) ) {
return -13; return -13;
} }
if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) { if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -15; return -15;
} }
if( LAPACKE_cge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) { if( LAPACKE_cge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
return -11; return -11;
} }
if( LAPACKE_cge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
return -9; return -9;
} }
#endif #endif

View File

@ -28,7 +28,7 @@
****************************************************************************** ******************************************************************************
* Contents: Native high-level C interface to LAPACK function ctprfb * Contents: Native high-level C interface to LAPACK function ctprfb
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -41,6 +41,7 @@ lapack_int LAPACKE_ctprfb( int matrix_layout, char side, char trans, char direct
lapack_complex_float* a, lapack_int lda, lapack_complex_float* a, lapack_int lda,
lapack_complex_float* b, lapack_int ldb ) lapack_complex_float* b, lapack_int ldb )
{ {
lapack_int ncols_v, nrows_v;
lapack_int info = 0; lapack_int info = 0;
lapack_int ldwork; lapack_int ldwork;
lapack_int work_size; lapack_int work_size;
@ -51,16 +52,28 @@ lapack_int LAPACKE_ctprfb( int matrix_layout, char side, char trans, char direct
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
if( LAPACKE_lsame( storev, 'C' ) ) {
ncols_v = k;
nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
( 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 );
nrows_v = k;
} else {
ncols_v = 0;
nrows_v = 0;
}
if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) { if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
return -14; return -14;
} }
if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) { if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -16; return -16;
} }
if( LAPACKE_cge_nancheck( matrix_layout, ldt, k, t, ldt ) ) { if( LAPACKE_cge_nancheck( matrix_layout, k, k, t, ldt ) ) {
return -12; return -12;
} }
if( LAPACKE_cge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
return -10; return -10;
} }
#endif #endif

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function cuncsd2by1 * Contents: Native high-level C interface to LAPACK function cuncsd2by1
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -37,7 +37,7 @@ lapack_int LAPACKE_cuncsd2by1( int matrix_layout, char jobu1, char jobu2,
char jobv1t, lapack_int m, lapack_int p, lapack_int q, char jobv1t, lapack_int m, lapack_int p, lapack_int q,
lapack_complex_float* x11, lapack_int ldx11, lapack_complex_float* x11, lapack_int ldx11,
lapack_complex_float* x21, lapack_int ldx21, lapack_complex_float* x21, lapack_int ldx21,
lapack_complex_float* theta, lapack_complex_float* u1, float* theta, lapack_complex_float* u1,
lapack_int ldu1, lapack_complex_float* u2, lapack_int ldu1, lapack_complex_float* u2,
lapack_int ldu2, lapack_complex_float* v1t, lapack_int ldv1t ) lapack_int ldu2, lapack_complex_float* v1t, lapack_int ldv1t )
{ {

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cuncsd2by1 * Contents: Native middle-level C interface to LAPACK function cuncsd2by1
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -37,7 +37,7 @@ lapack_int LAPACKE_cuncsd2by1_work( int matrix_layout, char jobu1, char jobu2,
char jobv1t, lapack_int m, lapack_int p, char jobv1t, lapack_int m, lapack_int p,
lapack_int q, lapack_complex_float* x11, lapack_int ldx11, lapack_int q, lapack_complex_float* x11, lapack_int ldx11,
lapack_complex_float* x21, lapack_int ldx21, lapack_complex_float* x21, lapack_int ldx21,
lapack_complex_float* theta, lapack_complex_float* u1, float* theta, lapack_complex_float* u1,
lapack_int ldu1, lapack_complex_float* u2, lapack_int ldu1, lapack_complex_float* u2,
lapack_int ldu2, lapack_complex_float* v1t, lapack_int ldu2, lapack_complex_float* v1t,
lapack_int ldv1t, lapack_complex_float* work, lapack_int ldv1t, lapack_complex_float* work,
@ -99,8 +99,8 @@ lapack_int LAPACKE_cuncsd2by1_work( int matrix_layout, char jobu1, char jobu2,
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lrwork == -1 || lwork == -1 ) { if( lrwork == -1 || lwork == -1 ) {
LAPACK_cuncsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p, LAPACK_cuncsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p,
&q, x11, &ldx11, x21, &ldx21, &q, x11, &ldx11_t, x21, &ldx21_t,
theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
work, &lwork, rwork, &lrwork, iwork, &info ); work, &lwork, rwork, &lrwork, iwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
@ -146,8 +146,8 @@ lapack_int LAPACKE_cuncsd2by1_work( int matrix_layout, char jobu1, char jobu2,
ldx21_t ); ldx21_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_cuncsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p, LAPACK_cuncsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p,
&q, x11, &ldx11, x21, &ldx21, &q, x11_t, &ldx11_t, x21_t, &ldx21_t,
theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t, &ldv1t_t,
work, &lwork, rwork, &lrwork, iwork, &info ); work, &lwork, rwork, &lrwork, iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cunmbr * Contents: Native middle-level C interface to LAPACK function cunmbr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -73,9 +73,11 @@ lapack_int LAPACKE_cunmbr_work( int matrix_layout, char vect, char side,
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
a_t = (lapack_complex_float*) if( LAPACKE_lsame( vect, 'q' ) ) {
LAPACKE_malloc( sizeof(lapack_complex_float) * a_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,k) );
lda_t * MAX(1,MIN(nq,k)) ); } else {
a_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,nq) );
}
if( a_t == NULL ) { if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cunmlq * Contents: Native middle-level C interface to LAPACK function cunmlq
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -42,6 +42,9 @@ lapack_int LAPACKE_cunmlq_work( int matrix_layout, char side, char trans,
{ {
lapack_int info = 0; lapack_int info = 0;
lapack_int r; lapack_int r;
lapack_int lda_t, ldc_t;
lapack_complex_float* a_t = NULL;
lapack_complex_float* c_t = NULL;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_cunmlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work, LAPACK_cunmlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
@ -51,10 +54,8 @@ lapack_int LAPACKE_cunmlq_work( int matrix_layout, char side, char trans,
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
r = LAPACKE_lsame( side, 'l' ) ? m : n; r = LAPACKE_lsame( side, 'l' ) ? m : n;
lapack_int lda_t = MAX(1,k); lda_t = MAX(1,k);
lapack_int ldc_t = MAX(1,m); ldc_t = MAX(1,m);
lapack_complex_float* a_t = NULL;
lapack_complex_float* c_t = NULL;
/* Check leading dimension(s) */ /* Check leading dimension(s) */
if( lda < r ) { if( lda < r ) {
info = -8; info = -8;
@ -73,8 +74,13 @@ lapack_int LAPACKE_cunmlq_work( int matrix_layout, char side, char trans,
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
a_t = (lapack_complex_float*) if( LAPACKE_lsame( side, 'l' ) ) {
LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) ); a_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) );
} else {
a_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
}
if( a_t == NULL ) { if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;

View File

@ -28,20 +28,20 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function dbdsvdx * Contents: Native high-level C interface to LAPACK function dbdsvdx
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_dbdsvdx( int matrix_layout, char uplo, char jobz, char range, lapack_int LAPACKE_dbdsvdx( int matrix_layout, char uplo, char jobz, char range,
lapack_int n, double* d, double* e, lapack_int n, double* d, double* e,
lapack_int vl, lapack_int vu, double vl, double vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
double* s, double* z, lapack_int ldz, double* s, double* z, lapack_int ldz,
lapack_int* superb ) lapack_int* superb )
{ {
lapack_int info = 0; lapack_int info = 0;
lapack_int lwork = 14*n; lapack_int lwork = MAX(14*n,1);
double* work = NULL; double* work = NULL;
lapack_int* iwork = NULL; lapack_int* iwork = NULL;
lapack_int i; lapack_int i;
@ -54,7 +54,7 @@ lapack_int LAPACKE_dbdsvdx( int matrix_layout, char uplo, char jobz, char range,
if( LAPACKE_d_nancheck( n, d, 1 ) ) { if( LAPACKE_d_nancheck( n, d, 1 ) ) {
return -6; return -6;
} }
if( LAPACKE_d_nancheck( n, e, 1 ) ) { if( LAPACKE_d_nancheck( n - 1, e, 1 ) ) {
return -7; return -7;
} }
#endif #endif
@ -64,14 +64,14 @@ lapack_int LAPACKE_dbdsvdx( int matrix_layout, char uplo, char jobz, char range,
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * (12*n) ); iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(12*n,1) );
if( iwork == NULL ) { if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1; goto exit_level_1;
} }
/* Call middle-level interface */ /* Call middle-level interface */
info = LAPACKE_dbdsvdx_work( matrix_layout, uplo, jobz, range, info = LAPACKE_dbdsvdx_work( matrix_layout, uplo, jobz, range,
n, d, e, vl, vu, il, iu, ns, s, z, n, d, e, vl, vu, il, iu, ns, s, z,
ldz, work, iwork); ldz, work, iwork);
/* Backup significant data from working array(s) */ /* Backup significant data from working array(s) */
for( i=0; i<12*n-1; i++ ) { for( i=0; i<12*n-1; i++ ) {

View File

@ -28,15 +28,15 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dbdsvdx * Contents: Native middle-level C interface to LAPACK function dbdsvdx
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_dbdsvdx_work( int matrix_layout, char uplo, char jobz, char range, lapack_int LAPACKE_dbdsvdx_work( int matrix_layout, char uplo, char jobz, char range,
lapack_int n, double* d, double* e, lapack_int n, double* d, double* e,
lapack_int vl, lapack_int vu, double vl, double vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
double* s, double* z, lapack_int ldz, double* s, double* z, lapack_int ldz,
double* work, lapack_int* iwork ) double* work, lapack_int* iwork )
{ {
@ -44,25 +44,27 @@ lapack_int LAPACKE_dbdsvdx_work( int matrix_layout, char uplo, char jobz, char r
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu, LAPACK_dbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu,
&il, &iu, &ns, s, z, &ldz, &il, &iu, ns, s, z, &ldz,
work, iwork, &info ); work, iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nrows_z = ( LAPACKE_lsame( jobz, 'v' ) ) ? MAX(2, 2*n) : 1; lapack_int nrows_z = ( LAPACKE_lsame( jobz, 'v' ) ) ? 2*n : 0;
lapack_int ncols_z = ( LAPACKE_lsame( jobz, 'v' ) ) ?
( LAPACKE_lsame( range, 'i' ) ? MAX(0,iu - il + 1) : n + 1 ) : 0;
lapack_int ldz_t = MAX(1,nrows_z); lapack_int ldz_t = MAX(1,nrows_z);
double* z_t = NULL; double* z_t = NULL;
/* Check leading dimension(s) */ /* Check leading dimension(s) */
if( ldz < nrows_z ) { if( ldz < ncols_z ) {
info = -3; info = -3;
LAPACKE_xerbla( "LAPACKE_dbdsvdx_work", info ); LAPACKE_xerbla( "LAPACKE_dbdsvdx_work", info );
return info; return info;
} }
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
if( LAPACKE_lsame( jobz, 'n' ) ) { if( LAPACKE_lsame( jobz, 'v' ) ) {
z_t = (double*) z_t = (double*)
LAPACKE_malloc( sizeof(double) * ldz_t * 2*n ); LAPACKE_malloc( sizeof(double) * ldz_t * MAX(2*n,1) );
if( z_t == NULL ) { if( z_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
@ -70,17 +72,17 @@ lapack_int LAPACKE_dbdsvdx_work( int matrix_layout, char uplo, char jobz, char r
} }
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu, LAPACK_dbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu,
&il, &iu, &ns, s, z_t, &ldz_t, work, &il, &iu, ns, s, z_t, &ldz_t, work,
iwork, &info ); iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
/* Transpose output matrices */ /* Transpose output matrices */
if( LAPACKE_lsame( jobz, 'n' ) ) { if( LAPACKE_lsame( jobz, 'v' ) ) {
LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_z, nrows_z, z_t, ldz_t, z, ldz); LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_z, ncols_z, z_t, ldz_t, z, ldz);
} }
/* Release memory and exit */ /* Release memory and exit */
if( LAPACKE_lsame( jobz, 'n' ) ) { if( LAPACKE_lsame( jobz, 'v' ) ) {
LAPACKE_free( z_t ); LAPACKE_free( z_t );
} }
exit_level_0: exit_level_0:

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function dgejsv * Contents: Native high-level C interface to LAPACK function dgejsv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -70,7 +70,7 @@ lapack_int LAPACKE_dgejsv( int matrix_layout, char joba, char jobu, char jobv,
( LAPACKE_lsame( jobv, 'v' ) || ( LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'j' ) ) && LAPACKE_lsame( jobv, 'j' ) ) &&
LAPACKE_lsame( jobv, 'j' ) ? MAX(7,m+3*n+n*n) : LAPACKE_lsame( jobv, 'j' ) ? MAX(7,m+3*n+n*n) :
1) ) ) ) ) ); 7) ) ) ) ) );
lapack_int* iwork = NULL; lapack_int* iwork = NULL;
double* work = NULL; double* work = NULL;
lapack_int i; lapack_int i;
@ -86,25 +86,25 @@ lapack_int LAPACKE_dgejsv( int matrix_layout, char joba, char jobu, char jobv,
if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) { if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -10; return -10;
} }
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) {
if( LAPACKE_dge_nancheck( matrix_layout, nu, n, u, ldu ) ) {
return -13;
}
}
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
if( LAPACKE_dge_nancheck( matrix_layout, nv, n, v, ldv ) ) {
return -15;
}
}
#endif #endif
/* Allocate memory for working array(s) */ /* Allocate memory for working array(s) */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m+3*n) ); iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(3,m+3*n) );
if( iwork == NULL ) { if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
lwork = MAX3( lwork, 7, 2*m+n );
{ /* FIXUP LWORK */
int want_u = LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' );
int want_v = LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' );
int want_sce = LAPACKE_lsame( joba, 'e' ) || LAPACKE_lsame( joba, 'g' );
if( !want_u && !want_v && !want_sce ) lwork = MAX( lwork, 4*n+1 ); // 1.1
if( !want_u && !want_v && want_sce ) lwork = MAX( lwork, n*n+4*n ); // 1.2
if( !want_u && want_v ) lwork = MAX( lwork, 4*n+1 ); // 2
if( want_u && !want_v ) lwork = MAX( lwork, 4*n+1 ); // 3
if( want_u && LAPACKE_lsame( jobv, 'v' ) ) lwork = MAX( lwork, 6*n+2*n*n ); // 4.1
if( want_u && LAPACKE_lsame( jobv, 'j' ) ) lwork = MAX3( lwork, 4*n+n*n, 2*n+n*n+6 ); // 4.2
}
work = (double*)LAPACKE_malloc( sizeof(double) * lwork ); work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
if( work == NULL ) { if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dgejsv * Contents: Native middle-level C interface to LAPACK function dgejsv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -53,6 +53,8 @@ lapack_int LAPACKE_dgejsv_work( int matrix_layout, char joba, char jobu,
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m; lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
lapack_int nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n; lapack_int nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
lapack_int ncols_u = LAPACKE_lsame( jobu, 'n' ) ? 1 :
LAPACKE_lsame( jobu, 'f' ) ? m : n;
lapack_int lda_t = MAX(1,m); lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nu); lapack_int ldu_t = MAX(1,nu);
lapack_int ldv_t = MAX(1,nv); lapack_int ldv_t = MAX(1,nv);
@ -65,7 +67,7 @@ lapack_int LAPACKE_dgejsv_work( int matrix_layout, char joba, char jobu,
LAPACKE_xerbla( "LAPACKE_dgejsv_work", info ); LAPACKE_xerbla( "LAPACKE_dgejsv_work", info );
return info; return info;
} }
if( ldu < n ) { if( ldu < ncols_u ) {
info = -14; info = -14;
LAPACKE_xerbla( "LAPACKE_dgejsv_work", info ); LAPACKE_xerbla( "LAPACKE_dgejsv_work", info );
return info; return info;
@ -83,7 +85,7 @@ lapack_int LAPACKE_dgejsv_work( int matrix_layout, char joba, char jobu,
} }
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) { LAPACKE_lsame( jobu, 'w' ) ) {
u_t = (double*)LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,n) ); u_t = (double*)LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,ncols_u) );
if( u_t == NULL ) { if( u_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_1; goto exit_level_1;
@ -99,14 +101,6 @@ lapack_int LAPACKE_dgejsv_work( int matrix_layout, char joba, char jobu,
} }
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) {
LAPACKE_dge_trans( matrix_layout, nu, n, u, ldu, u_t, ldu_t );
}
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
LAPACKE_dge_trans( matrix_layout, nv, n, v, ldv, v_t, ldv_t );
}
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a_t, LAPACK_dgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a_t,
&lda_t, sva, u_t, &ldu_t, v_t, &ldv_t, work, &lwork, &lda_t, sva, u_t, &ldu_t, v_t, &ldv_t, work, &lwork,
@ -117,7 +111,7 @@ lapack_int LAPACKE_dgejsv_work( int matrix_layout, char joba, char jobu,
/* Transpose output matrices */ /* Transpose output matrices */
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) { LAPACKE_lsame( jobu, 'w' ) ) {
LAPACKE_dge_trans( LAPACK_COL_MAJOR, nu, n, u_t, ldu_t, u, ldu ); LAPACKE_dge_trans( LAPACK_COL_MAJOR, nu, ncols_u, u_t, ldu_t, u, ldu );
} }
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) || if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) { LAPACKE_lsame( jobv, 'w' ) ) {

View File

@ -28,7 +28,7 @@
****************************************************************************** ******************************************************************************
* Contents: Native high-level C interface to LAPACK function dgemqrt * Contents: Native high-level C interface to LAPACK function dgemqrt
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -39,6 +39,7 @@ lapack_int LAPACKE_dgemqrt( int matrix_layout, char side, char trans,
const double* t, lapack_int ldt, double* c, const double* t, lapack_int ldt, double* c,
lapack_int ldc ) lapack_int ldc )
{ {
lapack_int nrows_v;
lapack_int info = 0; lapack_int info = 0;
double* work = NULL; double* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@ -47,13 +48,15 @@ lapack_int LAPACKE_dgemqrt( int matrix_layout, char side, char trans,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
( LAPACKE_lsame( side, 'R' ) ? n : 0 );
if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) { if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
return -12; return -12;
} }
if( LAPACKE_dge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) { if( LAPACKE_dge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
return -10; return -10;
} }
if( LAPACKE_dge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
return -8; return -8;
} }
#endif #endif

View File

@ -28,15 +28,15 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function dgesvdx * Contents: Native high-level C interface to LAPACK function dgesvdx
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_dgesvdx( int matrix_layout, char jobu, char jobvt, char range, lapack_int LAPACKE_dgesvdx( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, double* a, lapack_int m, lapack_int n, double* a,
lapack_int lda, lapack_int vl, lapack_int vu, lapack_int lda, double vl, double vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
double* s, double* u, lapack_int ldu, double* s, double* u, lapack_int ldu,
double* vt, lapack_int ldvt, double* vt, lapack_int ldvt,
lapack_int* superb ) lapack_int* superb )
@ -71,7 +71,7 @@ lapack_int LAPACKE_dgesvdx( int matrix_layout, char jobu, char jobvt, char range
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * (12*MIN(m,n)) ); iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,(12*MIN(m,n))) );
if( iwork == NULL ) { if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1; goto exit_level_1;

View File

@ -28,15 +28,15 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dgesvdx * Contents: Native middle-level C interface to LAPACK function dgesvdx
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, double* a, lapack_int m, lapack_int n, double* a,
lapack_int lda, lapack_int vl, lapack_int vu, lapack_int lda, double vl, double vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
double* s, double* u, lapack_int ldu, double* s, double* u, lapack_int ldu,
double* vt, lapack_int ldvt, double* vt, lapack_int ldvt,
double* work, lapack_int lwork, lapack_int* iwork ) double* work, lapack_int lwork, lapack_int* iwork )
@ -45,21 +45,23 @@ lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda, &vl, &vu, LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda, &vl, &vu,
&il, &iu, &ns, s, u, &ldu, vt, &ldvt, &il, &iu, ns, s, u, &ldu, vt, &ldvt,
work, &lwork, iwork, &info ); work, &lwork, iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nrows_u = ( LAPACKE_lsame( jobu, 'a' ) || lapack_int nrows_u = LAPACKE_lsame( jobu, 'v' ) ? m : 0;
LAPACKE_lsame( jobu, 's' ) ) ? m : 1; lapack_int ncols_u = LAPACKE_lsame( jobu, 'v' ) ?
lapack_int ncols_u = LAPACKE_lsame( jobu, 'a' ) ? m : ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0;
( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1); lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'v' ) ?
lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n : ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0;
( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1); lapack_int ncols_vt = LAPACKE_lsame( jobvt, 'v' ) ? n : 0;
lapack_int lda_t = MAX(1,m); lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nrows_u); lapack_int ldu_t = MAX(1,nrows_u);
lapack_int ldvt_t = MAX(1,nrows_vt); lapack_int ldvt_t = MAX(1,nrows_vt);
double* a_t = NULL; double* a_t = NULL;
double* u_t = NULL; double* u_t = NULL;
double* vt_t = NULL; double* vt_t = NULL;
@ -74,7 +76,7 @@ lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char
LAPACKE_xerbla( "LAPACKE_dgesvdx_work", info ); LAPACKE_xerbla( "LAPACKE_dgesvdx_work", info );
return info; return info;
} }
if( ldvt < n ) { if( ldvt < ncols_vt ) {
info = -18; info = -18;
LAPACKE_xerbla( "LAPACKE_dgesvdx_work", info ); LAPACKE_xerbla( "LAPACKE_dgesvdx_work", info );
return info; return info;
@ -82,7 +84,7 @@ lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu,
&il, &iu, &ns, s, u, &ldu_t, vt, &il, &iu, ns, s, u, &ldu_t, vt,
&ldvt_t, work, &lwork, iwork, &info ); &ldvt_t, work, &lwork, iwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
@ -92,7 +94,7 @@ lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { if( LAPACKE_lsame( jobu, 'v' ) ) {
u_t = (double*) u_t = (double*)
LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,ncols_u) ); LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,ncols_u) );
if( u_t == NULL ) { if( u_t == NULL ) {
@ -100,7 +102,7 @@ lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char
goto exit_level_1; goto exit_level_1;
} }
} }
if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { if( LAPACKE_lsame( jobvt, 'v' ) ) {
vt_t = (double*) vt_t = (double*)
LAPACKE_malloc( sizeof(double) * ldvt_t * MAX(1,n) ); LAPACKE_malloc( sizeof(double) * ldvt_t * MAX(1,n) );
if( vt_t == NULL ) { if( vt_t == NULL ) {
@ -111,28 +113,28 @@ lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu,
&il, &iu, &ns, s, u, &ldu_t, vt, &il, &iu, ns, s, u_t, &ldu_t, vt_t,
&ldvt_t, work, &lwork, iwork, &info ); &ldvt_t, work, &lwork, iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
/* Transpose output matrices */ /* Transpose output matrices */
LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda ); LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { if( LAPACKE_lsame( jobu, 'v' ) ) {
LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t, LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t,
u, ldu ); u, ldu );
} }
if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { if( LAPACKE_lsame( jobvt, 'v' ) ) {
LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt, LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt,
ldvt ); ldvt );
} }
/* Release memory and exit */ /* Release memory and exit */
if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { if( LAPACKE_lsame( jobvt, 'v' ) ) {
LAPACKE_free( vt_t ); LAPACKE_free( vt_t );
} }
exit_level_2: exit_level_2:
if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { if( LAPACKE_lsame( jobu, 'v' ) ) {
LAPACKE_free( u_t ); LAPACKE_free( u_t );
} }
exit_level_1: exit_level_1:

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function dgesvj * Contents: Native high-level C interface to LAPACK function dgesvj
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -49,8 +49,8 @@ lapack_int LAPACKE_dgesvj( int matrix_layout, char joba, char jobu, char jobv,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n : nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
( LAPACKE_lsame( jobv, 'a' ) ? mv : 1); ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0);
if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) { if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -7; return -7;
} }

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dgesvj * Contents: Native middle-level C interface to LAPACK function dgesvj
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -48,8 +48,8 @@ lapack_int LAPACKE_dgesvj_work( int matrix_layout, char joba, char jobu,
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n : lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
( LAPACKE_lsame( jobv, 'a' ) ? mv : 1); ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0);
lapack_int lda_t = MAX(1,m); lapack_int lda_t = MAX(1,m);
lapack_int ldv_t = MAX(1,nrows_v); lapack_int ldv_t = MAX(1,nrows_v);
double* a_t = NULL; double* a_t = NULL;

View File

@ -91,9 +91,9 @@ lapack_int LAPACKE_dggsvd3_work( int matrix_layout, char jobu, char jobv,
} }
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_dggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a_t, &lda_t, LAPACK_dggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a, &lda_t,
b_t, &ldb_t, alpha, beta, u_t, &ldu_t, v_t, &ldv_t, b, &ldb_t, alpha, beta, u, &ldu_t, v, &ldv_t,
q_t, &ldq_t, work, &lwork, iwork, &info ); q, &ldq_t, work, &lwork, iwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */

View File

@ -84,15 +84,15 @@ lapack_int LAPACKE_dggsvp3_work( int matrix_layout, char jobu, char jobv,
LAPACKE_xerbla( "LAPACKE_dggsvp3_work", info ); LAPACKE_xerbla( "LAPACKE_dggsvp3_work", info );
return info; return info;
} }
if( ldv < m ) { if( ldv < p ) {
info = -19; info = -19;
LAPACKE_xerbla( "LAPACKE_dggsvp3_work", info ); LAPACKE_xerbla( "LAPACKE_dggsvp3_work", info );
return info; return info;
} }
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_dggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a_t, &lda_t, b_t, LAPACK_dggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a, &lda_t, b,
&ldb_t, &tola, &tolb, k, l, u_t, &ldu_t, v_t, &ldb_t, &tola, &tolb, k, l, u, &ldu_t, v,
&ldv_t, q_t, &ldq_t, iwork, tau, work, &lwork, &ldv_t, q, &ldq_t, iwork, tau, work, &lwork,
&info ); &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
@ -115,7 +115,7 @@ lapack_int LAPACKE_dggsvp3_work( int matrix_layout, char jobu, char jobv,
} }
} }
if( LAPACKE_lsame( jobv, 'v' ) ) { if( LAPACKE_lsame( jobv, 'v' ) ) {
v_t = (double*)LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,m) ); v_t = (double*)LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,p) );
if( v_t == NULL ) { if( v_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_3; goto exit_level_3;
@ -145,7 +145,7 @@ lapack_int LAPACKE_dggsvp3_work( int matrix_layout, char jobu, char jobv,
LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu ); LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
} }
if( LAPACKE_lsame( jobv, 'v' ) ) { if( LAPACKE_lsame( jobv, 'v' ) ) {
LAPACKE_dge_trans( LAPACK_COL_MAJOR, p, m, v_t, ldv_t, v, ldv ); LAPACKE_dge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv );
} }
if( LAPACKE_lsame( jobq, 'q' ) ) { if( LAPACKE_lsame( jobq, 'q' ) ) {
LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq ); LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function dlantr * Contents: Native high-level C interface to LAPACK function dlantr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dlantr * Contents: Native middle-level C interface to LAPACK function dlantr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"

View File

@ -119,7 +119,7 @@ lapack_int LAPACKE_dlarfb_work( int matrix_layout, char side, char trans,
LAPACKE_dge_trans( matrix_layout, nrows_v, ncols_v-k, &v[k], ldv, LAPACKE_dge_trans( matrix_layout, nrows_v, ncols_v-k, &v[k], ldv,
&v_t[k*ldv_t], ldv_t ); &v_t[k*ldv_t], ldv_t );
} else if( LAPACKE_lsame( storev, 'r' ) && } else if( LAPACKE_lsame( storev, 'r' ) &&
LAPACKE_lsame( direct, 'b' ) ) { LAPACKE_lsame( direct, 'f' ) ) {
if( k > ncols_v ) { if( k > ncols_v ) {
LAPACKE_xerbla( "LAPACKE_dlarfb_work", -8 ); LAPACKE_xerbla( "LAPACKE_dlarfb_work", -8 );
return -8; return -8;

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function dlaswp * Contents: Native high-level C interface to LAPACK function dlaswp
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -46,50 +46,64 @@ lapack_int LAPACKE_dlascl( int matrix_layout, char type, lapack_int kl,
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
switch (type) { switch (type) {
case 'G': case 'G':
if( LAPACKE_dge_nancheck( matrix_layout, lda, n, a, lda ) ) { if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -9; return -9;
} }
break; break;
case 'L': case 'L':
// TYPE = 'L' - lower triangular matrix. // TYPE = 'L' - lower triangle of general matrix
if( LAPACKE_dtr_nancheck( matrix_layout, 'L', 'N', n, a, lda ) ) { if( matrix_layout == LAPACK_COL_MAJOR &&
return -9; LAPACKE_dgb_nancheck( matrix_layout, m, n, m-1, 0, a, lda+1 ) ) {
} return -9;
}
if( matrix_layout == LAPACK_ROW_MAJOR &&
LAPACKE_dgb_nancheck( LAPACK_COL_MAJOR, n, m, 0, m-1, a-m+1, lda+1 ) ) {
return -9;
}
break; break;
case 'U': case 'U':
// TYPE = 'U' - upper triangular matrix // TYPE = 'U' - upper triangle of general matrix
if( LAPACKE_dtr_nancheck( matrix_layout, 'U', 'N', n, a, lda ) ) { if( matrix_layout == LAPACK_COL_MAJOR &&
return -9; LAPACKE_dgb_nancheck( matrix_layout, m, n, 0, n-1, a-n+1, lda+1 ) ) {
} return -9;
}
if( matrix_layout == LAPACK_ROW_MAJOR &&
LAPACKE_dgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 0, a, lda+1 ) ) {
return -9;
}
break; break;
case 'H': case 'H':
// TYPE = 'H' - upper Hessenberg matrix // TYPE = 'H' - part of upper Hessenberg matrix in general matrix
if( LAPACKE_dhs_nancheck( matrix_layout, n, a, lda ) ) { if( matrix_layout == LAPACK_COL_MAJOR &&
return -9; LAPACKE_dgb_nancheck( matrix_layout, m, n, 1, n-1, a-n+1, lda+1 ) ) {
} return -9;
break; }
if( matrix_layout == LAPACK_ROW_MAJOR &&
LAPACKE_dgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 1, a-1, lda+1 ) ) {
return -9;
}
case 'B': case 'B':
// TYPE = 'B' - A is a symmetric band matrix with lower bandwidth KL // TYPE = 'B' - lower part of symmetric band matrix (assume m==n)
// and upper bandwidth KU and with the only the lower if( LAPACKE_dsb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) {
// half stored. return -9;
if( LAPACKE_dsb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) { }
return -9; break;
} case 'Q':
break; // TYPE = 'Q' - upper part of symmetric band matrix (assume m==n)
case 'Q': if( LAPACKE_dsb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) {
// TYPE = 'Q' - A is a symmetric band matrix with lower bandwidth KL return -9;
// and upper bandwidth KU and with the only the upper }
// half stored.
if( LAPACKE_dsb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) {
return -9;
}
break; break;
case 'Z': case 'Z':
// TYPE = 'Z' - A is a band matrix with lower bandwidth KL and upper // TYPE = 'Z' - band matrix laid out for ?GBTRF
// bandwidth KU. See DGBTRF for storage details. if( matrix_layout == LAPACK_COL_MAJOR &&
if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, a, lda ) ) { LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, a+kl, lda ) ) {
return -6; return -9;
} }
if( matrix_layout == LAPACK_ROW_MAJOR &&
LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, a+lda*kl, lda ) ) {
return -9;
}
break; break;
} }
#endif #endif

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dlaswp * Contents: Native middle-level C interface to LAPACK function dlaswp
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -46,7 +46,10 @@ lapack_int LAPACKE_dlascl_work( int matrix_layout, char type, lapack_int kl,
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,lda); lapack_int nrows_a = LAPACKE_lsame(type, 'b') ? kl + 1 :
LAPACKE_lsame(type, 'q') ? ku + 1 :
LAPACKE_lsame(type, 'z') ? 2 * kl + ku + 1 : m;
lapack_int lda_t = MAX(1,nrows_a);
double* a_t = NULL; double* a_t = NULL;
/* Check leading dimension(s) */ /* Check leading dimension(s) */
if( lda < n ) { if( lda < n ) {
@ -61,12 +64,14 @@ lapack_int LAPACKE_dlascl_work( int matrix_layout, char type, lapack_int kl,
goto exit_level_0; goto exit_level_0;
} }
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_dge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); LAPACKE_dge_trans( matrix_layout, nrows_a, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dlascl( &type, &kl, &ku, &cfrom, &cto, &m, &n, a_t, &lda_t, &info); LAPACK_dlascl( &type, &kl, &ku, &cfrom, &cto, &m, &n, a_t, &lda_t, &info);
info = 0; /* LAPACK call is ok! */ if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */ /* Transpose output matrices */
LAPACKE_dge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda ); LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_a, n, a_t, lda_t, a, lda );
/* Release memory and exit */ /* Release memory and exit */
LAPACKE_free( a_t ); LAPACKE_free( a_t );
exit_level_0: exit_level_0:

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dorcsd2by1 * Contents: Native middle-level C interface to LAPACK function dorcsd2by1
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -97,8 +97,8 @@ lapack_int LAPACKE_dorcsd2by1_work( int matrix_layout, char jobu1, char jobu2,
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_dorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p, LAPACK_dorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p,
&q, x11, &ldx11, x21, &ldx21, &q, x11, &ldx11_t, x21, &ldx21_t,
theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
work, &lwork, iwork, &info ); work, &lwork, iwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
@ -144,8 +144,8 @@ lapack_int LAPACKE_dorcsd2by1_work( int matrix_layout, char jobu1, char jobu2,
ldx21_t ); ldx21_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p, LAPACK_dorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p,
&q, x11, &ldx11, x21, &ldx21, &q, x11_t, &ldx11_t, x21_t, &ldx21_t,
theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t, &ldv1t_t,
work, &lwork, iwork, &info ); work, &lwork, iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dormbr * Contents: Native middle-level C interface to LAPACK function dormbr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dormlq * Contents: Native middle-level C interface to LAPACK function dormlq
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function dsbtrd * Contents: Native high-level C interface to LAPACK function dsbtrd
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -48,7 +48,7 @@ lapack_int LAPACKE_dsbtrd( int matrix_layout, char vect, char uplo, lapack_int n
if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) { if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
return -6; return -6;
} }
if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) { if( LAPACKE_lsame( vect, 'u' ) ) {
if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) { if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
return -10; return -10;
} }

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function dstedc * Contents: Native high-level C interface to LAPACK function dstedc
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -55,7 +55,7 @@ lapack_int LAPACKE_dstedc( int matrix_layout, char compz, lapack_int n,
if( LAPACKE_d_nancheck( n-1, e, 1 ) ) { if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
return -5; return -5;
} }
if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) { if( LAPACKE_lsame( compz, 'v' ) ) {
if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) { if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
return -6; return -6;
} }

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function dsteqr * Contents: Native high-level C interface to LAPACK function dsteqr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -52,7 +52,7 @@ lapack_int LAPACKE_dsteqr( int matrix_layout, char compz, lapack_int n,
if( LAPACKE_d_nancheck( n-1, e, 1 ) ) { if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
return -5; return -5;
} }
if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) { if( LAPACKE_lsame( compz, 'v' ) ) {
if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) { if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
return -6; return -6;
} }

View File

@ -28,13 +28,13 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function dsyconv * Contents: Native high-level C interface to LAPACK function dsyconv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_dsyconv( int matrix_layout, char uplo, char way, lapack_int n, lapack_int LAPACKE_dsyconv( int matrix_layout, char uplo, char way, lapack_int n,
double* a, lapack_int lda, const lapack_int* ipiv, double* work ) double* a, lapack_int lda, const lapack_int* ipiv, double* e )
{ {
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@ -43,14 +43,14 @@ lapack_int LAPACKE_dsyconv( int matrix_layout, char uplo, char way, lapack_int n
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
if( LAPACKE_dge_nancheck( matrix_layout, lda, n, a, lda ) ) { if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
return -5; return -5;
} }
#endif #endif
/* Call middle-level interface */ /* Call middle-level interface */
info = LAPACKE_dsyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv, info = LAPACKE_dsyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv,
work ); e );
exit_level_0: exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) { if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_dsyconv", info ); LAPACKE_xerbla( "LAPACKE_dsyconv", info );

View File

@ -28,19 +28,19 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dsyconv * Contents: Native middle-level C interface to LAPACK function dsyconv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_dsyconv_work( int matrix_layout, char uplo, char way, lapack_int LAPACKE_dsyconv_work( int matrix_layout, char uplo, char way,
lapack_int n, double* a, lapack_int lda, lapack_int n, double* a, lapack_int lda,
const lapack_int* ipiv, double* work ) const lapack_int* ipiv, double* e )
{ {
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dsyconv( &uplo, &way, &n, a, &lda, ipiv, work, &info ); LAPACK_dsyconv( &uplo, &way, &n, a, &lda, ipiv, e, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
@ -62,7 +62,7 @@ lapack_int LAPACKE_dsyconv_work( int matrix_layout, char uplo, char way,
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_dge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); LAPACKE_dge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dsyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, work, &info ); LAPACK_dsyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, e, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }

View File

@ -28,13 +28,13 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function dsyswapr * Contents: Native high-level C interface to LAPACK function dsyswapr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_dsyswapr( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_dsyswapr( int matrix_layout, char uplo, lapack_int n,
double* a, lapack_int i1, lapack_int i2 ) double* a, lapack_int lda, lapack_int i1, lapack_int i2 )
{ {
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_dsyswapr", -1 ); LAPACKE_xerbla( "LAPACKE_dsyswapr", -1 );
@ -42,9 +42,9 @@ lapack_int LAPACKE_dsyswapr( int matrix_layout, char uplo, lapack_int n,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, n ) ) { if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -4; return -4;
} }
#endif #endif
return LAPACKE_dsyswapr_work( matrix_layout, uplo, n, a, i1, i2 ); return LAPACKE_dsyswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
} }

View File

@ -28,36 +28,38 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dsyswapr * Contents: Native middle-level C interface to LAPACK function dsyswapr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_dsyswapr_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_dsyswapr_work( int matrix_layout, char uplo, lapack_int n,
double* a, lapack_int i1, lapack_int i2 ) double* a, lapack_int lda,
lapack_int i1, lapack_int i2 )
{ {
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dsyswapr( &uplo, &n, a, &i1, &i2 ); LAPACK_dsyswapr( &uplo, &n, a, &lda, &i1, &i2 );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,n);
double* a_t = NULL; double* a_t = NULL;
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
a_t = (double*)LAPACKE_malloc( sizeof(double) * n * MAX(1,n) ); a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
if( a_t == NULL ) { if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_dsy_trans( matrix_layout, uplo, n, a, n, a_t, n ); LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dsyswapr( &uplo, &n, a_t, &i1, &i2 ); LAPACK_dsyswapr( &uplo, &n, a_t, &lda_t, &i1, &i2 );
info = 0; /* LAPACK call is ok! */ info = 0; /* LAPACK call is ok! */
/* Transpose output matrices */ /* Transpose output matrices */
LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n ); LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
/* Release memory and exit */ /* Release memory and exit */
LAPACKE_free( a_t ); LAPACKE_free( a_t );
exit_level_0: exit_level_0:

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function dsytri2 * Contents: Native high-level C interface to LAPACK function dsytri2
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -38,8 +38,8 @@ lapack_int LAPACKE_dsytri2( int matrix_layout, char uplo, lapack_int n,
{ {
lapack_int info = 0; lapack_int info = 0;
lapack_int lwork = -1; lapack_int lwork = -1;
lapack_complex_double* work = NULL; double* work = NULL;
lapack_complex_double work_query; double work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_dsytri2", -1 ); LAPACKE_xerbla( "LAPACKE_dsytri2", -1 );
return -1; return -1;
@ -58,8 +58,8 @@ lapack_int LAPACKE_dsytri2( int matrix_layout, char uplo, lapack_int n,
} }
lwork = LAPACK_Z2INT( work_query ); lwork = LAPACK_Z2INT( work_query );
/* Allocate memory for work arrays */ /* Allocate memory for work arrays */
work = (lapack_complex_double*) work = (double*)
LAPACKE_malloc( sizeof(lapack_complex_double) * lwork ); LAPACKE_malloc( sizeof(double) * lwork );
if( work == NULL ) { if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dsytri2 * Contents: Native middle-level C interface to LAPACK function dsytri2
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -36,7 +36,7 @@
lapack_int LAPACKE_dsytri2_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_dsytri2_work( int matrix_layout, char uplo, lapack_int n,
double* a, lapack_int lda, double* a, lapack_int lda,
const lapack_int* ipiv, const lapack_int* ipiv,
lapack_complex_double* work, lapack_int lwork ) double* work, lapack_int lwork )
{ {
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {

View File

@ -28,7 +28,7 @@
****************************************************************************** ******************************************************************************
* Contents: Native high-level C interface to LAPACK function dtpmqrt * Contents: Native high-level C interface to LAPACK function dtpmqrt
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -40,6 +40,8 @@ lapack_int LAPACKE_dtpmqrt( int matrix_layout, char side, char trans,
double* a, lapack_int lda, double* b, double* a, lapack_int lda, double* b,
lapack_int ldb ) lapack_int ldb )
{ {
lapack_int ncols_a, nrows_a;
lapack_int nrows_v;
lapack_int info = 0; lapack_int info = 0;
double* work = NULL; double* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@ -48,16 +50,22 @@ lapack_int LAPACKE_dtpmqrt( int matrix_layout, char side, char trans,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) { ncols_a = LAPACKE_lsame( side, 'L' ) ? n :
( LAPACKE_lsame( side, 'R' ) ? k : 0 );
nrows_a = LAPACKE_lsame( side, 'L' ) ? k :
( LAPACKE_lsame( side, 'R' ) ? m : 0 );
nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
( LAPACKE_lsame( side, 'R' ) ? n : 0 );
if( LAPACKE_dge_nancheck( matrix_layout, nrows_a, ncols_a, a, lda ) ) {
return -13; return -13;
} }
if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) { if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -15; return -15;
} }
if( LAPACKE_dge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) { if( LAPACKE_dge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
return -11; return -11;
} }
if( LAPACKE_dge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
return -9; return -9;
} }
#endif #endif

View File

@ -28,7 +28,7 @@
****************************************************************************** ******************************************************************************
* Contents: Native high-level C interface to LAPACK function dtprfb * Contents: Native high-level C interface to LAPACK function dtprfb
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -39,6 +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 info = 0; lapack_int info = 0;
lapack_int ldwork; lapack_int ldwork;
lapack_int work_size; lapack_int work_size;
@ -49,16 +50,28 @@ lapack_int LAPACKE_dtprfb( int matrix_layout, char side, char trans, char direct
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
if( LAPACKE_lsame( storev, 'C' ) ) {
ncols_v = k;
nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
( 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 );
nrows_v = k;
} else {
ncols_v = 0;
nrows_v = 0;
}
if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) { if( LAPACKE_dge_nancheck( matrix_layout, k, m, 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 ) ) {
return -16; return -16;
} }
if( LAPACKE_dge_nancheck( matrix_layout, ldt, k, t, ldt ) ) { if( LAPACKE_dge_nancheck( matrix_layout, k, k, t, ldt ) ) {
return -12; return -12;
} }
if( LAPACKE_dge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
return -10; return -10;
} }
#endif #endif

View File

@ -28,7 +28,7 @@
****************************************************************************** ******************************************************************************
* Contents: Native middle-level C interface to LAPACK function dtprfb * Contents: Native middle-level C interface to LAPACK function dtprfb
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -39,7 +39,7 @@ lapack_int LAPACKE_dtprfb_work( int matrix_layout, char side, char trans,
const double* v, lapack_int ldv, const double* v, lapack_int ldv,
const double* t, lapack_int ldt, double* a, const double* t, lapack_int ldt, double* a,
lapack_int lda, double* b, lapack_int ldb, lapack_int lda, double* b, lapack_int ldb,
const double* work, lapack_int ldwork ) double* work, lapack_int ldwork )
{ {
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {

View File

@ -28,14 +28,14 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function dgesv * Contents: Native high-level C interface to LAPACK function dgesv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
void LAPACKE_ilaver( const lapack_int* vers_major, void LAPACKE_ilaver( lapack_int* vers_major,
const lapack_int* vers_minor, lapack_int* vers_minor,
const lapack_int* vers_patch ) lapack_int* vers_patch )
{ {
/* Call LAPACK function */ /* Call LAPACK function */
LAPACK_ilaver( vers_major, vers_minor, vers_patch ); LAPACK_ilaver( vers_major, vers_minor, vers_patch );

View File

@ -28,20 +28,20 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function sbdsvdx * Contents: Native high-level C interface to LAPACK function sbdsvdx
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_sbdsvdx( int matrix_layout, char uplo, char jobz, char range, lapack_int LAPACKE_sbdsvdx( int matrix_layout, char uplo, char jobz, char range,
lapack_int n, float* d, float* e, lapack_int n, float* d, float* e,
lapack_int vl, lapack_int vu, float vl, float vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
float* s, float* z, lapack_int ldz, float* s, float* z, lapack_int ldz,
lapack_int* superb ) lapack_int* superb )
{ {
lapack_int info = 0; lapack_int info = 0;
lapack_int lwork = 14*n; lapack_int lwork = MAX(14*n,1);
float* work = NULL; float* work = NULL;
lapack_int* iwork = NULL; lapack_int* iwork = NULL;
lapack_int i; lapack_int i;
@ -54,7 +54,7 @@ lapack_int LAPACKE_sbdsvdx( int matrix_layout, char uplo, char jobz, char range,
if( LAPACKE_s_nancheck( n, d, 1 ) ) { if( LAPACKE_s_nancheck( n, d, 1 ) ) {
return -6; return -6;
} }
if( LAPACKE_s_nancheck( n, e, 1 ) ) { if( LAPACKE_s_nancheck( n - 1, e, 1 ) ) {
return -7; return -7;
} }
#endif #endif
@ -64,14 +64,14 @@ lapack_int LAPACKE_sbdsvdx( int matrix_layout, char uplo, char jobz, char range,
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * (12*n) ); iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(12*n,1) );
if( iwork == NULL ) { if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1; goto exit_level_1;
} }
/* Call middle-level interface */ /* Call middle-level interface */
info = LAPACKE_sbdsvdx_work( matrix_layout, uplo, jobz, range, info = LAPACKE_sbdsvdx_work( matrix_layout, uplo, jobz, range,
n, d, e, vl, vu, il, iu, ns, s, z, n, d, e, vl, vu, il, iu, ns, s, z,
ldz, work, iwork); ldz, work, iwork);
/* Backup significant data from working array(s) */ /* Backup significant data from working array(s) */
for( i=0; i<12*n-1; i++ ) { for( i=0; i<12*n-1; i++ ) {

View File

@ -28,15 +28,15 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function sbdsvdx * Contents: Native middle-level C interface to LAPACK function sbdsvdx
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_sbdsvdx_work( int matrix_layout, char uplo, char jobz, char range, lapack_int LAPACKE_sbdsvdx_work( int matrix_layout, char uplo, char jobz, char range,
lapack_int n, float* d, float* e, lapack_int n, float* d, float* e,
lapack_int vl, lapack_int vu, float vl, float vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
float* s, float* z, lapack_int ldz, float* s, float* z, lapack_int ldz,
float* work, lapack_int* iwork ) float* work, lapack_int* iwork )
{ {
@ -44,25 +44,27 @@ lapack_int LAPACKE_sbdsvdx_work( int matrix_layout, char uplo, char jobz, char r
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_sbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu, LAPACK_sbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu,
&il, &iu, &ns, s, z, &ldz, &il, &iu, ns, s, z, &ldz,
work, iwork, &info ); work, iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nrows_z = ( LAPACKE_lsame( jobz, 'v' ) ) ? MAX(2, 2*n) : 1; lapack_int nrows_z = ( LAPACKE_lsame( jobz, 'v' ) ) ? 2*n : 0;
lapack_int ncols_z = ( LAPACKE_lsame( jobz, 'v' ) ) ?
( LAPACKE_lsame( range, 'i' ) ? MAX(0,iu - il + 1) : n + 1 ) : 0;
lapack_int ldz_t = MAX(1,nrows_z); lapack_int ldz_t = MAX(1,nrows_z);
float* z_t = NULL; float* z_t = NULL;
/* Check leading dimension(s) */ /* Check leading dimension(s) */
if( ldz < nrows_z ) { if( ldz < ncols_z ) {
info = -3; info = -3;
LAPACKE_xerbla( "LAPACKE_sbdsvdx_work", info ); LAPACKE_xerbla( "LAPACKE_sbdsvdx_work", info );
return info; return info;
} }
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
if( LAPACKE_lsame( jobz, 'n' ) ) { if( LAPACKE_lsame( jobz, 'v' ) ) {
z_t = (float*) z_t = (float*)
LAPACKE_malloc( sizeof(float) * ldz_t * 2*n ); LAPACKE_malloc( sizeof(float) * ldz_t * MAX(2*n,1) );
if( z_t == NULL ) { if( z_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
@ -70,17 +72,17 @@ lapack_int LAPACKE_sbdsvdx_work( int matrix_layout, char uplo, char jobz, char r
} }
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_sbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu, LAPACK_sbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu,
&il, &iu, &ns, s, z_t, &ldz_t, work, &il, &iu, ns, s, z_t, &ldz_t, work,
iwork, &info ); iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
/* Transpose output matrices */ /* Transpose output matrices */
if( LAPACKE_lsame( jobz, 'n' ) ) { if( LAPACKE_lsame( jobz, 'v' ) ) {
LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_z, nrows_z, z_t, ldz_t, z, ldz); LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_z, ncols_z, z_t, ldz_t, z, ldz);
} }
/* Release memory and exit */ /* Release memory and exit */
if( LAPACKE_lsame( jobz, 'n' ) ) { if( LAPACKE_lsame( jobz, 'v' ) ) {
LAPACKE_free( z_t ); LAPACKE_free( z_t );
} }
exit_level_0: exit_level_0:

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function sgejsv * Contents: Native high-level C interface to LAPACK function sgejsv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -70,7 +70,7 @@ lapack_int LAPACKE_sgejsv( int matrix_layout, char joba, char jobu, char jobv,
( LAPACKE_lsame( jobv, 'v' ) || ( LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'j' ) ) && LAPACKE_lsame( jobv, 'j' ) ) &&
LAPACKE_lsame( jobv, 'j' ) ? MAX(7,m+3*n+n*n) : LAPACKE_lsame( jobv, 'j' ) ? MAX(7,m+3*n+n*n) :
1) ) ) ) ) ); 7) ) ) ) ) );
lapack_int* iwork = NULL; lapack_int* iwork = NULL;
float* work = NULL; float* work = NULL;
lapack_int i; lapack_int i;
@ -86,25 +86,25 @@ lapack_int LAPACKE_sgejsv( int matrix_layout, char joba, char jobu, char jobv,
if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) { if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -10; return -10;
} }
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) {
if( LAPACKE_sge_nancheck( matrix_layout, nu, n, u, ldu ) ) {
return -13;
}
}
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
if( LAPACKE_sge_nancheck( matrix_layout, nv, n, v, ldv ) ) {
return -15;
}
}
#endif #endif
/* Allocate memory for working array(s) */ /* Allocate memory for working array(s) */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m+3*n) ); iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(3,m+3*n) );
if( iwork == NULL ) { if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
lwork = MAX3( lwork, 7, 2*m+n );
{ /* FIXUP LWORK */
int want_u = LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' );
int want_v = LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' );
int want_sce = LAPACKE_lsame( joba, 'e' ) || LAPACKE_lsame( joba, 'g' );
if( !want_u && !want_v && !want_sce ) lwork = MAX( lwork, 4*n+1 ); // 1.1
if( !want_u && !want_v && want_sce ) lwork = MAX( lwork, n*n+4*n ); // 1.2
if( !want_u && want_v ) lwork = MAX( lwork, 4*n+1 ); // 2
if( want_u && !want_v ) lwork = MAX( lwork, 4*n+1 ); // 3
if( want_u && LAPACKE_lsame( jobv, 'v' ) ) lwork = MAX( lwork, 6*n+2*n*n ); // 4.1
if( want_u && LAPACKE_lsame( jobv, 'j' ) ) lwork = MAX3( lwork, 4*n+n*n, 2*n+n*n+6 ); // 4.2
}
work = (float*)LAPACKE_malloc( sizeof(float) * lwork ); work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
if( work == NULL ) { if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function sgejsv * Contents: Native middle-level C interface to LAPACK function sgejsv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -53,6 +53,8 @@ lapack_int LAPACKE_sgejsv_work( int matrix_layout, char joba, char jobu,
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m; lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
lapack_int nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n; lapack_int nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
lapack_int ncols_u = LAPACKE_lsame( jobu, 'n' ) ? 1 :
LAPACKE_lsame( jobu, 'f' ) ? m : n;
lapack_int lda_t = MAX(1,m); lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nu); lapack_int ldu_t = MAX(1,nu);
lapack_int ldv_t = MAX(1,nv); lapack_int ldv_t = MAX(1,nv);
@ -65,7 +67,7 @@ lapack_int LAPACKE_sgejsv_work( int matrix_layout, char joba, char jobu,
LAPACKE_xerbla( "LAPACKE_sgejsv_work", info ); LAPACKE_xerbla( "LAPACKE_sgejsv_work", info );
return info; return info;
} }
if( ldu < n ) { if( ldu < ncols_u ) {
info = -14; info = -14;
LAPACKE_xerbla( "LAPACKE_sgejsv_work", info ); LAPACKE_xerbla( "LAPACKE_sgejsv_work", info );
return info; return info;
@ -83,7 +85,7 @@ lapack_int LAPACKE_sgejsv_work( int matrix_layout, char joba, char jobu,
} }
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) { LAPACKE_lsame( jobu, 'w' ) ) {
u_t = (float*)LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,n) ); u_t = (float*)LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,ncols_u) );
if( u_t == NULL ) { if( u_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_1; goto exit_level_1;
@ -99,14 +101,6 @@ lapack_int LAPACKE_sgejsv_work( int matrix_layout, char joba, char jobu,
} }
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) {
LAPACKE_sge_trans( matrix_layout, nu, n, u, ldu, u_t, ldu_t );
}
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
LAPACKE_sge_trans( matrix_layout, nv, n, v, ldv, v_t, ldv_t );
}
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_sgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a_t, LAPACK_sgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a_t,
&lda_t, sva, u_t, &ldu_t, v_t, &ldv_t, work, &lwork, &lda_t, sva, u_t, &ldu_t, v_t, &ldv_t, work, &lwork,
@ -117,7 +111,7 @@ lapack_int LAPACKE_sgejsv_work( int matrix_layout, char joba, char jobu,
/* Transpose output matrices */ /* Transpose output matrices */
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) { LAPACKE_lsame( jobu, 'w' ) ) {
LAPACKE_sge_trans( LAPACK_COL_MAJOR, nu, n, u_t, ldu_t, u, ldu ); LAPACKE_sge_trans( LAPACK_COL_MAJOR, nu, ncols_u, u_t, ldu_t, u, ldu );
} }
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) || if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) { LAPACKE_lsame( jobv, 'w' ) ) {

View File

@ -28,7 +28,7 @@
****************************************************************************** ******************************************************************************
* Contents: Native high-level C interface to LAPACK function sgemqrt * Contents: Native high-level C interface to LAPACK function sgemqrt
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -39,6 +39,7 @@ lapack_int LAPACKE_sgemqrt( int matrix_layout, char side, char trans,
const float* t, lapack_int ldt, float* c, const float* t, lapack_int ldt, float* c,
lapack_int ldc ) lapack_int ldc )
{ {
lapack_int nrows_v;
lapack_int info = 0; lapack_int info = 0;
float* work = NULL; float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@ -47,13 +48,15 @@ lapack_int LAPACKE_sgemqrt( int matrix_layout, char side, char trans,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
( LAPACKE_lsame( side, 'R' ) ? n : 0 );
if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) { if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
return -12; return -12;
} }
if( LAPACKE_sge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) { if( LAPACKE_sge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
return -10; return -10;
} }
if( LAPACKE_sge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
return -8; return -8;
} }
#endif #endif

View File

@ -28,15 +28,15 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function sgesvdx * Contents: Native high-level C interface to LAPACK function sgesvdx
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_sgesvdx( int matrix_layout, char jobu, char jobvt, char range, lapack_int LAPACKE_sgesvdx( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, float* a, lapack_int m, lapack_int n, float* a,
lapack_int lda, lapack_int vl, lapack_int vu, lapack_int lda, float vl, float vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
float* s, float* u, lapack_int ldu, float* s, float* u, lapack_int ldu,
float* vt, lapack_int ldvt, float* vt, lapack_int ldvt,
lapack_int* superb ) lapack_int* superb )
@ -71,7 +71,7 @@ lapack_int LAPACKE_sgesvdx( int matrix_layout, char jobu, char jobvt, char range
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * (12*MIN(m,n)) ); iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,(12*MIN(m,n))) );
if( iwork == NULL ) { if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1; goto exit_level_1;

View File

@ -28,15 +28,15 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function sgesvdx * Contents: Native middle-level C interface to LAPACK function sgesvdx
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, float* a, lapack_int m, lapack_int n, float* a,
lapack_int lda, lapack_int vl, lapack_int vu, lapack_int lda, float vl, float vu,
lapack_int il, lapack_int iu, lapack_int ns, lapack_int il, lapack_int iu, lapack_int* ns,
float* s, float* u, lapack_int ldu, float* s, float* u, lapack_int ldu,
float* vt, lapack_int ldvt, float* vt, lapack_int ldvt,
float* work, lapack_int lwork, lapack_int* iwork ) float* work, lapack_int lwork, lapack_int* iwork )
@ -45,21 +45,23 @@ lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda, &vl, &vu, LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda, &vl, &vu,
&il, &iu, &ns, s, u, &ldu, vt, &ldvt, &il, &iu, ns, s, u, &ldu, vt, &ldvt,
work, &lwork, iwork, &info ); work, &lwork, iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nrows_u = ( LAPACKE_lsame( jobu, 'a' ) || lapack_int nrows_u = LAPACKE_lsame( jobu, 'v' ) ? m : 0;
LAPACKE_lsame( jobu, 's' ) ) ? m : 1; lapack_int ncols_u = LAPACKE_lsame( jobu, 'v' ) ?
lapack_int ncols_u = LAPACKE_lsame( jobu, 'a' ) ? m : ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0;
( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1); lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'v' ) ?
lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n : ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0;
( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1); lapack_int ncols_vt = LAPACKE_lsame( jobvt, 'v' ) ? n : 0;
lapack_int lda_t = MAX(1,m); lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nrows_u); lapack_int ldu_t = MAX(1,nrows_u);
lapack_int ldvt_t = MAX(1,nrows_vt); lapack_int ldvt_t = MAX(1,nrows_vt);
float* a_t = NULL; float* a_t = NULL;
float* u_t = NULL; float* u_t = NULL;
float* vt_t = NULL; float* vt_t = NULL;
@ -74,7 +76,7 @@ lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char
LAPACKE_xerbla( "LAPACKE_sgesvdx_work", info ); LAPACKE_xerbla( "LAPACKE_sgesvdx_work", info );
return info; return info;
} }
if( ldvt < n ) { if( ldvt < ncols_vt ) {
info = -18; info = -18;
LAPACKE_xerbla( "LAPACKE_sgesvdx_work", info ); LAPACKE_xerbla( "LAPACKE_sgesvdx_work", info );
return info; return info;
@ -82,7 +84,7 @@ lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu,
&il, &iu, &ns, s, u, &ldu_t, vt, &il, &iu, ns, s, u, &ldu_t, vt,
&ldvt_t, work, &lwork, iwork, &info ); &ldvt_t, work, &lwork, iwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
@ -92,7 +94,7 @@ lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { if( LAPACKE_lsame( jobu, 'v' ) ) {
u_t = (float*) u_t = (float*)
LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,ncols_u) ); LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,ncols_u) );
if( u_t == NULL ) { if( u_t == NULL ) {
@ -100,7 +102,7 @@ lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char
goto exit_level_1; goto exit_level_1;
} }
} }
if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { if( LAPACKE_lsame( jobvt, 'v' ) ) {
vt_t = (float*) vt_t = (float*)
LAPACKE_malloc( sizeof(float) * ldvt_t * MAX(1,n) ); LAPACKE_malloc( sizeof(float) * ldvt_t * MAX(1,n) );
if( vt_t == NULL ) { if( vt_t == NULL ) {
@ -111,28 +113,28 @@ lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu,
&il, &iu, &ns, s, u, &ldu_t, vt, &il, &iu, ns, s, u_t, &ldu_t, vt_t,
&ldvt_t, work, &lwork, iwork, &info ); &ldvt_t, work, &lwork, iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
/* Transpose output matrices */ /* Transpose output matrices */
LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda ); LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda );
if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { if( LAPACKE_lsame( jobu, 'v' ) ) {
LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t, LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t,
u, ldu ); u, ldu );
} }
if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { if( LAPACKE_lsame( jobvt, 'v' ) ) {
LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt, LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt,
ldvt ); ldvt );
} }
/* Release memory and exit */ /* Release memory and exit */
if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { if( LAPACKE_lsame( jobvt, 'v' ) ) {
LAPACKE_free( vt_t ); LAPACKE_free( vt_t );
} }
exit_level_2: exit_level_2:
if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { if( LAPACKE_lsame( jobu, 'v' ) ) {
LAPACKE_free( u_t ); LAPACKE_free( u_t );
} }
exit_level_1: exit_level_1:

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function sgesvj * Contents: Native high-level C interface to LAPACK function sgesvj
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -49,8 +49,8 @@ lapack_int LAPACKE_sgesvj( int matrix_layout, char joba, char jobu, char jobv,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n : nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
( LAPACKE_lsame( jobv, 'a' ) ? mv : 1); ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0 );
if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) { if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -7; return -7;
} }

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function sgesvj * Contents: Native middle-level C interface to LAPACK function sgesvj
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -48,8 +48,8 @@ lapack_int LAPACKE_sgesvj_work( int matrix_layout, char joba, char jobu,
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n : lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
( LAPACKE_lsame( jobv, 'a' ) ? mv : 1); ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0);
lapack_int lda_t = MAX(1,m); lapack_int lda_t = MAX(1,m);
lapack_int ldv_t = MAX(1,nrows_v); lapack_int ldv_t = MAX(1,nrows_v);
float* a_t = NULL; float* a_t = NULL;

View File

@ -91,9 +91,9 @@ lapack_int LAPACKE_sggsvd3_work( int matrix_layout, char jobu, char jobv,
} }
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_sggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a_t, &lda_t, LAPACK_sggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a, &lda_t,
b_t, &ldb_t, alpha, beta, u_t, &ldu_t, v_t, &ldv_t, b, &ldb_t, alpha, beta, u, &ldu_t, v, &ldv_t,
q_t, &ldq_t, work, &lwork, iwork, &info ); q, &ldq_t, work, &lwork, iwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }

View File

@ -84,16 +84,16 @@ lapack_int LAPACKE_sggsvp3_work( int matrix_layout, char jobu, char jobv,
LAPACKE_xerbla( "LAPACKE_sggsvp3_work", info ); LAPACKE_xerbla( "LAPACKE_sggsvp3_work", info );
return info; return info;
} }
if( ldv < m ) { if( ldv < p ) {
info = -19; info = -19;
LAPACKE_xerbla( "LAPACKE_sggsvp3_work", info ); LAPACKE_xerbla( "LAPACKE_sggsvp3_work", info );
return info; return info;
} }
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_sggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a_t, &lda_t, b_t, LAPACK_sggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a, &lda_t, b,
&ldb_t, &tola, &tolb, k, l, u_t, &ldu_t, &ldb_t, &tola, &tolb, k, l, u, &ldu_t,
v_t, &ldv_t, q_t, &ldq_t, iwork, tau, work, &lwork, v, &ldv_t, q, &ldq_t, iwork, tau, work, &lwork,
&info ); &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
@ -116,7 +116,7 @@ lapack_int LAPACKE_sggsvp3_work( int matrix_layout, char jobu, char jobv,
} }
} }
if( LAPACKE_lsame( jobv, 'v' ) ) { if( LAPACKE_lsame( jobv, 'v' ) ) {
v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,m) ); v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,p) );
if( v_t == NULL ) { if( v_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_3; goto exit_level_3;
@ -146,7 +146,7 @@ lapack_int LAPACKE_sggsvp3_work( int matrix_layout, char jobu, char jobv,
LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu ); LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
} }
if( LAPACKE_lsame( jobv, 'v' ) ) { if( LAPACKE_lsame( jobv, 'v' ) ) {
LAPACKE_sge_trans( LAPACK_COL_MAJOR, p, m, v_t, ldv_t, v, ldv ); LAPACKE_sge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv );
} }
if( LAPACKE_lsame( jobq, 'q' ) ) { if( LAPACKE_lsame( jobq, 'q' ) ) {
LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq ); LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function slantr * Contents: Native high-level C interface to LAPACK function slantr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function slantr * Contents: Native middle-level C interface to LAPACK function slantr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"

View File

@ -118,7 +118,7 @@ lapack_int LAPACKE_slarfb_work( int matrix_layout, char side, char trans,
LAPACKE_sge_trans( matrix_layout, nrows_v, ncols_v-k, &v[k], ldv, LAPACKE_sge_trans( matrix_layout, nrows_v, ncols_v-k, &v[k], ldv,
&v_t[k*ldv_t], ldv_t ); &v_t[k*ldv_t], ldv_t );
} else if( LAPACKE_lsame( storev, 'r' ) && } else if( LAPACKE_lsame( storev, 'r' ) &&
LAPACKE_lsame( direct, 'b' ) ) { LAPACKE_lsame( direct, 'f' ) ) {
if( k > ncols_v ) { if( k > ncols_v ) {
LAPACKE_xerbla( "LAPACKE_slarfb_work", -8 ); LAPACKE_xerbla( "LAPACKE_slarfb_work", -8 );
return -8; return -8;

View File

@ -28,14 +28,14 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function slaswp * Contents: Native high-level C interface to LAPACK function slaswp
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_slascl( int matrix_layout, char type, lapack_int kl, lapack_int LAPACKE_slascl( int matrix_layout, char type, lapack_int kl,
lapack_int ku, float cfrom, float cto, lapack_int ku, float cfrom, float cto,
lapack_int m, lapack_int n, float* a, lapack_int m, lapack_int n, float* a,
lapack_int lda ) lapack_int lda )
{ {
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@ -46,50 +46,64 @@ lapack_int LAPACKE_slascl( int matrix_layout, char type, lapack_int kl,
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
switch (type) { switch (type) {
case 'G': case 'G':
if( LAPACKE_sge_nancheck( matrix_layout, lda, n, a, lda ) ) { if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -9; return -9;
} }
break; break;
case 'L': case 'L':
// TYPE = 'L' - lower triangular matrix. // TYPE = 'L' - lower triangle of general matrix
if( LAPACKE_str_nancheck( matrix_layout, 'L', 'N', n, a, lda ) ) { if( matrix_layout == LAPACK_COL_MAJOR &&
return -9; LAPACKE_sgb_nancheck( matrix_layout, m, n, m-1, 0, a, lda+1 ) ) {
} return -9;
}
if( matrix_layout == LAPACK_ROW_MAJOR &&
LAPACKE_sgb_nancheck( LAPACK_COL_MAJOR, n, m, 0, m-1, a-m+1, lda+1 ) ) {
return -9;
}
break; break;
case 'U': case 'U':
// TYPE = 'U' - upper triangular matrix // TYPE = 'U' - upper triangle of general matrix
if( LAPACKE_str_nancheck( matrix_layout, 'U', 'N', n, a, lda ) ) { if( matrix_layout == LAPACK_COL_MAJOR &&
return -9; LAPACKE_sgb_nancheck( matrix_layout, m, n, 0, n-1, a-n+1, lda+1 ) ) {
} return -9;
}
if( matrix_layout == LAPACK_ROW_MAJOR &&
LAPACKE_sgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 0, a, lda+1 ) ) {
return -9;
}
break; break;
case 'H': case 'H':
// TYPE = 'H' - upper Hessenberg matrix // TYPE = 'H' - part of upper Hessenberg matrix in general matrix
if( LAPACKE_shs_nancheck( matrix_layout, n, a, lda ) ) { if( matrix_layout == LAPACK_COL_MAJOR &&
return -9; LAPACKE_sgb_nancheck( matrix_layout, m, n, 1, n-1, a-n+1, lda+1 ) ) {
} return -9;
break; }
if( matrix_layout == LAPACK_ROW_MAJOR &&
LAPACKE_sgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 1, a-1, lda+1 ) ) {
return -9;
}
case 'B': case 'B':
// TYPE = 'B' - A is a symmetric band matrix with lower bandwidth KL // TYPE = 'B' - lower part of symmetric band matrix (assume m==n)
// and upper bandwidth KU and with the only the lower if( LAPACKE_ssb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) {
// half stored. return -9;
if( LAPACKE_ssb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) { }
return -9; break;
} case 'Q':
break; // TYPE = 'Q' - upper part of symmetric band matrix (assume m==n)
case 'Q': if( LAPACKE_ssb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) {
// TYPE = 'Q' - A is a symmetric band matrix with lower bandwidth KL return -9;
// and upper bandwidth KU and with the only the upper }
// half stored.
if( LAPACKE_ssb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) {
return -9;
}
break; break;
case 'Z': case 'Z':
// TYPE = 'Z' - A is a band matrix with lower bandwidth KL and upper // TYPE = 'Z' - band matrix laid out for ?GBTRF
// bandwidth KU. See DGBTRF for storage details. if( matrix_layout == LAPACK_COL_MAJOR &&
if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, a, lda ) ) { LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, a+kl, lda ) ) {
return -6; return -9;
} }
if( matrix_layout == LAPACK_ROW_MAJOR &&
LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, a+lda*kl, lda ) ) {
return -9;
}
break; break;
} }
#endif #endif

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function slaswp * Contents: Native middle-level C interface to LAPACK function slaswp
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -46,7 +46,10 @@ lapack_int LAPACKE_slascl_work( int matrix_layout, char type, lapack_int kl,
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,lda); lapack_int nrows_a = LAPACKE_lsame(type, 'b') ? kl + 1 :
LAPACKE_lsame(type, 'q') ? ku + 1 :
LAPACKE_lsame(type, 'z') ? 2 * kl + ku + 1 : m;
lapack_int lda_t = MAX(1,nrows_a);
float* a_t = NULL; float* a_t = NULL;
/* Check leading dimension(s) */ /* Check leading dimension(s) */
if( lda < n ) { if( lda < n ) {
@ -61,12 +64,14 @@ lapack_int LAPACKE_slascl_work( int matrix_layout, char type, lapack_int kl,
goto exit_level_0; goto exit_level_0;
} }
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_sge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); LAPACKE_sge_trans( matrix_layout, nrows_a, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_slascl( &type, &kl, &ku, &cfrom, &cto, &m, &n, a_t, &lda_t, &info); LAPACK_slascl( &type, &kl, &ku, &cfrom, &cto, &m, &n, a_t, &lda_t, &info);
info = 0; /* LAPACK call is ok! */ if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */ /* Transpose output matrices */
LAPACKE_sge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda ); LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_a, n, a_t, lda_t, a, lda );
/* Release memory and exit */ /* Release memory and exit */
LAPACKE_free( a_t ); LAPACKE_free( a_t );
exit_level_0: exit_level_0:

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function sorcsd2by1 * Contents: Native middle-level C interface to LAPACK function sorcsd2by1
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -97,8 +97,8 @@ lapack_int LAPACKE_sorcsd2by1_work( int matrix_layout, char jobu1, char jobu2,
/* Query optimal working array(s) size if requested */ /* Query optimal working array(s) size if requested */
if( lwork == -1 ) { if( lwork == -1 ) {
LAPACK_sorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p, LAPACK_sorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p,
&q, x11, &ldx11, x21, &ldx21, &q, x11, &ldx11_t, x21, &ldx21_t,
theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
work, &lwork, iwork, &info ); work, &lwork, iwork, &info );
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
@ -144,8 +144,8 @@ lapack_int LAPACKE_sorcsd2by1_work( int matrix_layout, char jobu1, char jobu2,
ldx21_t ); ldx21_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_sorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p, LAPACK_sorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p,
&q, x11, &ldx11, x21, &ldx21, &q, x11_t, &ldx11_t, x21_t, &ldx21_t,
theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t, &ldv1t_t,
work, &lwork, iwork, &info ); work, &lwork, iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function sormbr * Contents: Native middle-level C interface to LAPACK function sormbr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function sormlq * Contents: Native middle-level C interface to LAPACK function sormlq
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function ssbtrd * Contents: Native high-level C interface to LAPACK function ssbtrd
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -48,7 +48,7 @@ lapack_int LAPACKE_ssbtrd( int matrix_layout, char vect, char uplo, lapack_int n
if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) { if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
return -6; return -6;
} }
if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) { if( LAPACKE_lsame( vect, 'u' ) ) {
if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) { if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
return -10; return -10;
} }

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function sstedc * Contents: Native high-level C interface to LAPACK function sstedc
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -55,7 +55,7 @@ lapack_int LAPACKE_sstedc( int matrix_layout, char compz, lapack_int n, float* d
if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
return -5; return -5;
} }
if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) { if( LAPACKE_lsame( compz, 'v' ) ) {
if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) { if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
return -6; return -6;
} }

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function ssteqr * Contents: Native high-level C interface to LAPACK function ssteqr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -52,7 +52,7 @@ lapack_int LAPACKE_ssteqr( int matrix_layout, char compz, lapack_int n, float* d
if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
return -5; return -5;
} }
if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) { if( LAPACKE_lsame( compz, 'v' ) ) {
if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) { if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
return -6; return -6;
} }

View File

@ -28,13 +28,13 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function ssyconv * Contents: Native high-level C interface to LAPACK function ssyconv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_ssyconv( int matrix_layout, char uplo, char way, lapack_int n, lapack_int LAPACKE_ssyconv( int matrix_layout, char uplo, char way, lapack_int n,
float* a, lapack_int lda, const lapack_int* ipiv, float* work ) float* a, lapack_int lda, const lapack_int* ipiv, float* e )
{ {
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@ -43,14 +43,14 @@ lapack_int LAPACKE_ssyconv( int matrix_layout, char uplo, char way, lapack_int n
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
if( LAPACKE_sge_nancheck( matrix_layout, lda, n, a, lda ) ) { if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
return -5; return -5;
} }
#endif #endif
/* Call middle-level interface */ /* Call middle-level interface */
info = LAPACKE_ssyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv, info = LAPACKE_ssyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv,
work ); e );
exit_level_0: exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) { if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_ssyconv", info ); LAPACKE_xerbla( "LAPACKE_ssyconv", info );

View File

@ -28,19 +28,19 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function ssyconv * Contents: Native middle-level C interface to LAPACK function ssyconv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_ssyconv_work( int matrix_layout, char uplo, char way, lapack_int LAPACKE_ssyconv_work( int matrix_layout, char uplo, char way,
lapack_int n, float* a, lapack_int lda, lapack_int n, float* a, lapack_int lda,
const lapack_int* ipiv, float* work ) const lapack_int* ipiv, float* e )
{ {
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_ssyconv( &uplo, &way, &n, a, &lda, ipiv, work, &info ); LAPACK_ssyconv( &uplo, &way, &n, a, &lda, ipiv, e, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
@ -62,7 +62,7 @@ lapack_int LAPACKE_ssyconv_work( int matrix_layout, char uplo, char way,
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_sge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); LAPACKE_sge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_ssyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, work, &info ); LAPACK_ssyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, e, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }

View File

@ -28,13 +28,13 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function ssyswapr * Contents: Native high-level C interface to LAPACK function ssyswapr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_ssyswapr( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_ssyswapr( int matrix_layout, char uplo, lapack_int n,
float* a, lapack_int i1, lapack_int i2 ) float* a, lapack_int lda, lapack_int i1, lapack_int i2 )
{ {
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_ssyswapr", -1 ); LAPACKE_xerbla( "LAPACKE_ssyswapr", -1 );
@ -42,9 +42,9 @@ lapack_int LAPACKE_ssyswapr( int matrix_layout, char uplo, lapack_int n,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, n ) ) { if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -4; return -4;
} }
#endif #endif
return LAPACKE_ssyswapr_work( matrix_layout, uplo, n, a, i1, i2 ); return LAPACKE_ssyswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
} }

View File

@ -28,36 +28,38 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function ssyswapr * Contents: Native middle-level C interface to LAPACK function ssyswapr
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
lapack_int LAPACKE_ssyswapr_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_ssyswapr_work( int matrix_layout, char uplo, lapack_int n,
float* a, lapack_int i1, lapack_int i2 ) float* a, lapack_int lda,
lapack_int i1, lapack_int i2 )
{ {
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_ssyswapr( &uplo, &n, a, &i1, &i2 ); LAPACK_ssyswapr( &uplo, &n, a, &lda, &i1, &i2 );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
} }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,n);
float* a_t = NULL; float* a_t = NULL;
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
a_t = (float*)LAPACKE_malloc( sizeof(float) * n * MAX(1,n) ); a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
if( a_t == NULL ) { if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_ssy_trans( matrix_layout, uplo, n, a, n, a_t, n ); LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_ssyswapr( &uplo, &n, a_t, &i1, &i2 ); LAPACK_ssyswapr( &uplo, &n, a_t, &lda_t, &i1, &i2 );
info = 0; /* LAPACK call is ok! */ info = 0; /* LAPACK call is ok! */
/* Transpose output matrices */ /* Transpose output matrices */
LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n ); LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
/* Release memory and exit */ /* Release memory and exit */
LAPACKE_free( a_t ); LAPACKE_free( a_t );
exit_level_0: exit_level_0:

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function ssytri2 * Contents: Native high-level C interface to LAPACK function ssytri2
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -38,8 +38,8 @@ lapack_int LAPACKE_ssytri2( int matrix_layout, char uplo, lapack_int n, float* a
{ {
lapack_int info = 0; lapack_int info = 0;
lapack_int lwork = -1; lapack_int lwork = -1;
lapack_complex_float* work = NULL; float* work = NULL;
lapack_complex_float work_query; float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_ssytri2", -1 ); LAPACKE_xerbla( "LAPACKE_ssytri2", -1 );
return -1; return -1;
@ -58,8 +58,8 @@ lapack_int LAPACKE_ssytri2( int matrix_layout, char uplo, lapack_int n, float* a
} }
lwork = LAPACK_C2INT( work_query ); lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */ /* Allocate memory for work arrays */
work = (lapack_complex_float*) work = (float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork ); LAPACKE_malloc( sizeof(float) * lwork );
if( work == NULL ) { if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function ssytri2 * Contents: Native middle-level C interface to LAPACK function ssytri2
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -36,7 +36,7 @@
lapack_int LAPACKE_ssytri2_work( int matrix_layout, char uplo, lapack_int n, lapack_int LAPACKE_ssytri2_work( int matrix_layout, char uplo, lapack_int n,
float* a, lapack_int lda, float* a, lapack_int lda,
const lapack_int* ipiv, const lapack_int* ipiv,
lapack_complex_float* work, lapack_int lwork ) float* work, lapack_int lwork )
{ {
lapack_int info = 0; lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {

View File

@ -28,7 +28,7 @@
****************************************************************************** ******************************************************************************
* Contents: Native high-level C interface to LAPACK function stpmqrt * Contents: Native high-level C interface to LAPACK function stpmqrt
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -39,6 +39,8 @@ lapack_int LAPACKE_stpmqrt( int matrix_layout, char side, char trans,
lapack_int ldv, const float* t, lapack_int ldt, lapack_int ldv, const float* t, lapack_int ldt,
float* a, lapack_int lda, float* b, lapack_int ldb ) float* a, lapack_int lda, float* b, lapack_int ldb )
{ {
lapack_int ncols_a, nrows_a;
lapack_int nrows_v;
lapack_int info = 0; lapack_int info = 0;
float* work = NULL; float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@ -47,16 +49,22 @@ lapack_int LAPACKE_stpmqrt( int matrix_layout, char side, char trans,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) { ncols_a = LAPACKE_lsame( side, 'L' ) ? n :
( LAPACKE_lsame( side, 'R' ) ? k : 0 );
nrows_a = LAPACKE_lsame( side, 'L' ) ? k :
( LAPACKE_lsame( side, 'R' ) ? m : 0 );
nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
( LAPACKE_lsame( side, 'R' ) ? n : 0 );
if( LAPACKE_sge_nancheck( matrix_layout, nrows_a, ncols_a, a, lda ) ) {
return -13; return -13;
} }
if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) { if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -15; return -15;
} }
if( LAPACKE_sge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) { if( LAPACKE_sge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
return -11; return -11;
} }
if( LAPACKE_sge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
return -9; return -9;
} }
#endif #endif

View File

@ -28,7 +28,7 @@
****************************************************************************** ******************************************************************************
* Contents: Native high-level C interface to LAPACK function stprfb * Contents: Native high-level C interface to LAPACK function stprfb
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -39,6 +39,7 @@ lapack_int LAPACKE_stprfb( int matrix_layout, char side, char trans, char direct
lapack_int ldv, const float* t, lapack_int ldt, lapack_int ldv, const float* t, lapack_int ldt,
float* a, lapack_int lda, float* b, lapack_int ldb) float* a, lapack_int lda, float* b, lapack_int ldb)
{ {
lapack_int ncols_v, nrows_v;
lapack_int info = 0; lapack_int info = 0;
lapack_int ldwork; lapack_int ldwork;
lapack_int work_size; lapack_int work_size;
@ -49,16 +50,28 @@ lapack_int LAPACKE_stprfb( int matrix_layout, char side, char trans, char direct
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
if( LAPACKE_lsame( storev, 'C' ) ) {
ncols_v = k;
nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
( 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 );
nrows_v = k;
} else {
ncols_v = 0;
nrows_v = 0;
}
if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) { if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
return -14; return -14;
} }
if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) { if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -16; return -16;
} }
if( LAPACKE_sge_nancheck( matrix_layout, ldt, k, t, ldt ) ) { if( LAPACKE_sge_nancheck( matrix_layout, k, k, t, ldt ) ) {
return -12; return -12;
} }
if( LAPACKE_sge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
return -10; return -10;
} }
#endif #endif

View File

@ -28,7 +28,7 @@
****************************************************************************** ******************************************************************************
* Contents: Native middle-level C interface to LAPACK function stprfb * Contents: Native middle-level C interface to LAPACK function stprfb
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -38,7 +38,7 @@ lapack_int LAPACKE_stprfb_work( int matrix_layout, char side, char trans,
lapack_int n, lapack_int k, lapack_int l, lapack_int n, lapack_int k, lapack_int l,
const float* v, lapack_int ldv, const float* t, const float* v, lapack_int ldv, const float* t,
lapack_int ldt, float* a, lapack_int lda, lapack_int ldt, float* a, lapack_int lda,
float* b, lapack_int ldb, const float* work, float* b, lapack_int ldb, float* work,
lapack_int ldwork ) lapack_int ldwork )
{ {
lapack_int info = 0; lapack_int info = 0;

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native high-level C interface to LAPACK function zgejsv * Contents: Native high-level C interface to LAPACK function zgejsv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -119,7 +119,7 @@ lapack_int LAPACKE_zgejsv( int matrix_layout, char joba, char jobu, char jobv,
( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) && ( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) &&
( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) &&
( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) : ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) :
1) ) ) ) ) ) ) ) ); 7) ) ) ) ) ) ) ) );
lapack_int* iwork = NULL; lapack_int* iwork = NULL;
double* rwork = NULL; double* rwork = NULL;
lapack_complex_double* cwork = NULL; lapack_complex_double* cwork = NULL;
@ -136,30 +136,29 @@ lapack_int LAPACKE_zgejsv( int matrix_layout, char joba, char jobu, char jobv,
if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) { if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -10; return -10;
} }
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) {
if( LAPACKE_zge_nancheck( matrix_layout, nu, n, u, ldu ) ) {
return -13;
}
}
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
if( LAPACKE_zge_nancheck( matrix_layout, nv, n, v, ldv ) ) {
return -15;
}
}
#endif #endif
/* Allocate memory for working array(s) */ /* Allocate memory for working array(s) */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m+3*n) ); iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(3,m+2*n) );
if( iwork == NULL ) { if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
} }
lwork = MAX( lwork, 1 );
{ /* FIXUP LWORK */
int want_u = LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' );
int want_v = LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' );
int want_sce = LAPACKE_lsame( joba, 'e' ) || LAPACKE_lsame( joba, 'g' );
if( !want_u && !want_v && !want_sce ) lwork = MAX( lwork, 2*n+1 ); // 1.1
if( !want_u && !want_v && want_sce ) lwork = MAX( lwork, n*n+3*n ); // 1.2
if( want_u && LAPACKE_lsame( jobv, 'v' ) ) lwork = MAX( lwork, 5*n+2*n*n ); // 4.1
if( want_u && LAPACKE_lsame( jobv, 'j' ) ) lwork = MAX( lwork, 4*n+n*n ); // 4.2
}
cwork = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * lwork ); cwork = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
if( cwork == NULL ) { if( cwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1; goto exit_level_1;
} }
lrwork = MAX3( lrwork, 7, n+2*m );
rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork ); rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
if( rwork == NULL ) { if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR; info = LAPACK_WORK_MEMORY_ERROR;

View File

@ -28,7 +28,7 @@
***************************************************************************** *****************************************************************************
* Contents: Native middle-level C interface to LAPACK function zgejsv * Contents: Native middle-level C interface to LAPACK function zgejsv
* Author: Intel Corporation * Author: Intel Corporation
* Generated November, 2011 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -46,7 +46,7 @@ lapack_int LAPACKE_zgejsv_work( int matrix_layout, char joba, char jobu,
if( matrix_layout == LAPACK_COL_MAJOR ) { if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_zgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a, LAPACK_zgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a,
&lda, sva, u, &ldu, v, &ldv, cwork, &lwork, rwork, &lwork, &lda, sva, u, &ldu, v, &ldv, cwork, &lwork, rwork, &lrwork,
iwork, &info ); iwork, &info );
if( info < 0 ) { if( info < 0 ) {
info = info - 1; info = info - 1;
@ -54,6 +54,8 @@ lapack_int LAPACKE_zgejsv_work( int matrix_layout, char joba, char jobu,
} else if( matrix_layout == LAPACK_ROW_MAJOR ) { } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m; lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
lapack_int nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n; lapack_int nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
lapack_int ncols_u = LAPACKE_lsame( jobu, 'n' ) ? 1 :
LAPACKE_lsame( jobu, 'f' ) ? m : n;
lapack_int lda_t = MAX(1,m); lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nu); lapack_int ldu_t = MAX(1,nu);
lapack_int ldv_t = MAX(1,nv); lapack_int ldv_t = MAX(1,nv);
@ -66,7 +68,7 @@ lapack_int LAPACKE_zgejsv_work( int matrix_layout, char joba, char jobu,
LAPACKE_xerbla( "LAPACKE_zgejsv_work", info ); LAPACKE_xerbla( "LAPACKE_zgejsv_work", info );
return info; return info;
} }
if( ldu < n ) { if( ldu < ncols_u ) {
info = -14; info = -14;
LAPACKE_xerbla( "LAPACKE_zgejsv_work", info ); LAPACKE_xerbla( "LAPACKE_zgejsv_work", info );
return info; return info;
@ -86,7 +88,7 @@ lapack_int LAPACKE_zgejsv_work( int matrix_layout, char joba, char jobu,
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) { LAPACKE_lsame( jobu, 'w' ) ) {
u_t = (lapack_complex_double*) u_t = (lapack_complex_double*)
LAPACKE_malloc( sizeof(lapack_complex_double) * ldu_t * MAX(1,n) ); LAPACKE_malloc( sizeof(lapack_complex_double) * ldu_t * MAX(1,ncols_u) );
if( u_t == NULL ) { if( u_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_1; goto exit_level_1;
@ -103,14 +105,6 @@ lapack_int LAPACKE_zgejsv_work( int matrix_layout, char joba, char jobu,
} }
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) {
LAPACKE_zge_trans( matrix_layout, nu, n, u, ldu, u_t, ldu_t );
}
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
LAPACKE_zge_trans( matrix_layout, nv, n, v, ldv, v_t, ldv_t );
}
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_zgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a_t, LAPACK_zgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a_t,
&lda_t, sva, u_t, &ldu_t, v_t, &ldv_t, cwork, &lwork, &lda_t, sva, u_t, &ldu_t, v_t, &ldv_t, cwork, &lwork,
@ -121,7 +115,7 @@ lapack_int LAPACKE_zgejsv_work( int matrix_layout, char joba, char jobu,
/* Transpose output matrices */ /* Transpose output matrices */
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) { LAPACKE_lsame( jobu, 'w' ) ) {
LAPACKE_zge_trans( LAPACK_COL_MAJOR, nu, n, u_t, ldu_t, u, ldu ); LAPACKE_zge_trans( LAPACK_COL_MAJOR, nu, ncols_u, u_t, ldu_t, u, ldu );
} }
if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) || if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'w' ) ) { LAPACKE_lsame( jobv, 'w' ) ) {

View File

@ -28,7 +28,7 @@
****************************************************************************** ******************************************************************************
* Contents: Native high-level C interface to LAPACK function zgemqrt * Contents: Native high-level C interface to LAPACK function zgemqrt
* Author: Intel Corporation * Author: Intel Corporation
* Generated November 2015 * Generated June 2016
*****************************************************************************/ *****************************************************************************/
#include "lapacke_utils.h" #include "lapacke_utils.h"
@ -40,6 +40,7 @@ lapack_int LAPACKE_zgemqrt( int matrix_layout, char side, char trans,
lapack_int ldt, lapack_complex_double* c, lapack_int ldt, lapack_complex_double* c,
lapack_int ldc ) lapack_int ldc )
{ {
lapack_int nrows_v;
lapack_int info = 0; lapack_int info = 0;
lapack_complex_double* work = NULL; lapack_complex_double* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@ -48,13 +49,15 @@ lapack_int LAPACKE_zgemqrt( int matrix_layout, char side, char trans,
} }
#ifndef LAPACK_DISABLE_NAN_CHECK #ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */ /* Optionally check input matrices for NaNs */
nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
( LAPACKE_lsame( side, 'R' ) ? n : 0 );
if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) { if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
return -12; return -12;
} }
if( LAPACKE_zge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) { if( LAPACKE_zge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
return -10; return -10;
} }
if( LAPACKE_zge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
return -8; return -8;
} }
#endif #endif

Some files were not shown because too many files have changed in this diff Show More