install(FILES
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/lapacke-config.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
lapack_int ldc );
lapack_int LAPACKE_sbdsvdx( int matrix_layout, char uplo, char jobz, char range,
lapack_int n, float* d, float* e,
- lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ float vl, float vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
float* s, float* z, lapack_int ldz,
lapack_int* superb );
lapack_int LAPACKE_dbdsvdx( int matrix_layout, char uplo, char jobz, char range,
lapack_int n, double* d, double* e,
- lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ double vl, double vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
double* s, double* z, lapack_int ldz,
lapack_int* superb );
lapack_int LAPACKE_sdisna( char job, lapack_int m, lapack_int n, const float* d,
lapack_int LAPACKE_sgesvdx( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, float* a,
- lapack_int lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, float vl, float vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
float* s, float* u, lapack_int ldu,
float* vt, lapack_int ldvt,
lapack_int* superb );
lapack_int LAPACKE_dgesvdx( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, double* a,
- lapack_int lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, double vl, double vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
double* s, double* u, lapack_int ldu,
double* vt, lapack_int ldvt,
lapack_int* superb );
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 lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, float vl, float vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
float* s, lapack_complex_float* u, lapack_int ldu,
lapack_complex_float* vt, lapack_int ldvt,
lapack_int* superb );
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 lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, double vl, double vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
double* s, lapack_complex_double* u, lapack_int ldu,
lapack_complex_double* vt, lapack_int ldvt,
lapack_int* superb );
lapack_int* iwork );
lapack_int LAPACKE_sbdsvdx_work( int matrix_layout, char uplo, char jobz, char range,
- lapack_int n, float* d, float* e,
- lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
- float* s, float* z, lapack_int ldz,
- float* work, lapack_int* iwork );
+ lapack_int n, float* d, float* e,
+ float vl, float vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
+ float* s, float* z, lapack_int ldz,
+ float* work, lapack_int* iwork );
lapack_int LAPACKE_dbdsvdx_work( int matrix_layout, char uplo, char jobz, char range,
- lapack_int n, double* d, double* e,
- lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
- double* s, double* z, lapack_int ldz,
- double* work, lapack_int* iwork );
+ lapack_int n, double* d, double* e,
+ double vl, double vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
+ double* s, double* z, lapack_int ldz,
+ double* work, lapack_int* iwork );
lapack_int LAPACKE_sbdsqr_work( int matrix_layout, char uplo, lapack_int n,
lapack_int ncvt, lapack_int nru, lapack_int ncc,
lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, float* a,
- lapack_int lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, float vl, float vu,
+ 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 lwork, lapack_int* iwork );
lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, double* a,
- lapack_int lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, double vl, double vu,
+ 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 lwork, lapack_int* iwork );
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 lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, float vl, float vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
float* s, lapack_complex_float* u, lapack_int ldu,
lapack_complex_float* vt, lapack_int ldvt,
lapack_complex_float* work, lapack_int lwork,
float* rwork, lapack_int* iwork );
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 lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, double vl, double vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
double* s, lapack_complex_double* u, lapack_int ldu,
lapack_complex_double* vt, lapack_int ldvt,
lapack_complex_double* work, lapack_int lwork,
float* b22d, float* b22e, float* rwork,
lapack_int lrwork );
lapack_int LAPACKE_cheswapr( int matrix_layout, char uplo, lapack_int n,
- lapack_complex_float* a, lapack_int i1,
- lapack_int i2 );
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_cheswapr_work( int matrix_layout, char uplo, lapack_int n,
- lapack_complex_float* a, lapack_int i1,
- lapack_int i2 );
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_chetri2( int matrix_layout, char uplo, lapack_int n,
lapack_complex_float* a, lapack_int lda,
const lapack_int* ipiv );
lapack_complex_float* work );
lapack_int LAPACKE_csyconv( int matrix_layout, char uplo, char way, lapack_int n,
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 n, lapack_complex_float* a,
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_complex_float* a, lapack_int i1,
- lapack_int i2 );
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_csyswapr_work( int matrix_layout, char uplo, lapack_int n,
- lapack_complex_float* a, lapack_int i1,
- lapack_int i2 );
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_csytri2( int matrix_layout, char uplo, lapack_int n,
lapack_complex_float* a, lapack_int lda,
const lapack_int* ipiv );
char jobv1t, lapack_int m, lapack_int p, lapack_int q,
lapack_complex_float* x11, lapack_int ldx11,
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 ldu2, lapack_complex_float* v1t, lapack_int ldv1t );
lapack_int LAPACKE_cuncsd2by1_work( int matrix_layout, char jobu1, char jobu2,
char jobv1t, lapack_int m, lapack_int p,
lapack_int q, lapack_complex_float* x11, lapack_int ldx11,
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 ldu2, lapack_complex_float* v1t,
lapack_int ldv1t, lapack_complex_float* work,
lapack_int ldu2, double* v1t, lapack_int ldv1t,
double* work, lapack_int lwork, lapack_int* iwork );
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 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,
- 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,
- 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,
double* a, lapack_int lda, const lapack_int* ipiv );
lapack_int LAPACKE_dsytri2_work( int matrix_layout, char uplo, lapack_int n,
double* a, lapack_int lda,
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,
double* a, lapack_int lda, const lapack_int* ipiv,
lapack_int nb );
lapack_int ldu2, float* v1t, lapack_int ldv1t,
float* work, lapack_int lwork, lapack_int* iwork );
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 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,
- 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,
- 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 lda, const lapack_int* ipiv );
lapack_int LAPACKE_ssytri2_work( int matrix_layout, char uplo, lapack_int n,
float* a, lapack_int lda,
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,
float* a, lapack_int lda, const lapack_int* ipiv,
lapack_int nb );
double* b22d, double* b22e, double* rwork,
lapack_int lrwork );
lapack_int LAPACKE_zheswapr( int matrix_layout, char uplo, lapack_int n,
- lapack_complex_double* a, lapack_int i1,
- lapack_int i2 );
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_zheswapr_work( int matrix_layout, char uplo, lapack_int n,
- lapack_complex_double* a, lapack_int i1,
- lapack_int i2 );
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_zhetri2( int matrix_layout, char uplo, lapack_int n,
lapack_complex_double* a, lapack_int lda,
const lapack_int* ipiv );
lapack_complex_double* work );
lapack_int LAPACKE_zsyconv( int matrix_layout, char uplo, char way, lapack_int n,
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 n, lapack_complex_double* a,
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_complex_double* a, lapack_int i1,
- lapack_int i2 );
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_zsyswapr_work( int matrix_layout, char uplo, lapack_int n,
- lapack_complex_double* a, lapack_int i1,
- lapack_int i2 );
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 );
lapack_int LAPACKE_zsytri2( int matrix_layout, char uplo, lapack_int n,
lapack_complex_double* a, lapack_int lda,
const lapack_int* ipiv );
char jobv1t, lapack_int m, lapack_int p, lapack_int q,
lapack_complex_double* x11, lapack_int ldx11,
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 ldu2, lapack_complex_double* v1t, lapack_int ldv1t );
lapack_int LAPACKE_zuncsd2by1_work( int matrix_layout, char jobu1, char jobu2,
char jobv1t, lapack_int m, lapack_int p,
lapack_int q, lapack_complex_double* x11, lapack_int ldx11,
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 ldu2, lapack_complex_double* v1t,
lapack_int ldv1t, lapack_complex_double* work,
lapack_int n, lapack_int k, lapack_int l,
const float* v, lapack_int ldv, const float* t,
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 LAPACKE_dtprfb_work( int matrix_layout, char side, char trans,
char direct, char storev, lapack_int m,
const double* v, lapack_int ldv,
const double* t, lapack_int ldt, double* a,
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,
char direct, char storev, lapack_int m,
lapack_int n, lapack_int k, lapack_int l,
const lapack_complex_double* x,
lapack_int incx, lapack_complex_double* a,
lapack_int lda );
-void LAPACKE_ilaver( const lapack_int* vers_major,
- const lapack_int* vers_minor,
- const lapack_int* vers_patch );
+void LAPACKE_ilaver( lapack_int* vers_major,
+ lapack_int* vers_minor,
+ lapack_int* vers_patch );
#define LAPACK_sgetrf LAPACK_GLOBAL(sgetrf,SGETRF)
lapack_int* iwork, lapack_int *info );
void LAPACK_sbdsvdx( char* uplo, char* jobz, char* range,
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,
float* s, float* z, lapack_int* ldz,
float* work, lapack_int *iwork, lapack_int *info );
void LAPACK_dbdsvdx( char* uplo, char* jobz, char* range,
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,
double* s, double* z, lapack_int* ldz,
double* work, lapack_int *iwork, lapack_int *info );
lapack_complex_double* work, lapack_int* lwork,
double* rwork, lapack_int *info );
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* ldu, float* vt, lapack_int* ldvt, float* work,
lapack_int* lwork, lapack_int *iwork, lapack_int *info );
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* ldu, double* vt, lapack_int* ldvt, double* work,
lapack_int* lwork, lapack_int *iwork, lapack_int *info );
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_complex_float* u, lapack_int* ldu,
lapack_complex_float* vt, lapack_int* ldvt,
lapack_complex_float* work, lapack_int* lwork, float* rwork,
lapack_int *iwork, lapack_int *info );
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_complex_double* u, lapack_int* ldu,
lapack_complex_double* vt, lapack_int* ldvt,
float* b12e, float* b21d, float* b21e,
float* b22d, float* b22e, float* rwork,
lapack_int* lrwork , lapack_int *info );
-void LAPACK_cheswapr( char* uplo, lapack_int* n,
- lapack_complex_float* a, lapack_int* i1,
- lapack_int* i2 );
+void LAPACK_cheswapr( char* uplo, lapack_int* n, lapack_complex_float* a,
+ lapack_int* lda, lapack_int* i1, lapack_int* i2 );
void LAPACK_chetri2( char* uplo, lapack_int* n,
lapack_complex_float* a, lapack_int* lda,
const lapack_int* ipiv,
void LAPACK_csyconv( char* uplo, char* way,
lapack_int* n, lapack_complex_float* a,
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,
- lapack_complex_float* a, lapack_int* i1,
- lapack_int* i2 );
+ lapack_complex_float* a, lapack_int* lda,
+ lapack_int* i1, lapack_int* i2 );
void LAPACK_csytri2( char* uplo, lapack_int* n,
lapack_complex_float* a, lapack_int* lda,
const lapack_int* ipiv,
char* jobv1t, lapack_int* m, lapack_int* p,
lapack_int* q, lapack_complex_float* x11,
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* u2, lapack_int* ldu2,
lapack_complex_float* v1t, lapack_int* ldv1t,
lapack_int* iwork , lapack_int *info );
void LAPACK_dsyconv( char* uplo, char* way,
lapack_int* n, double* a, lapack_int* lda,
- const lapack_int* ipiv, double* work , lapack_int *info );
-void LAPACK_dsyswapr( char* uplo, lapack_int* n,
- double* a, lapack_int* i1, lapack_int* i2 );
+ const lapack_int* ipiv, double* e , lapack_int *info );
+void LAPACK_dsyswapr( char* uplo, lapack_int* n, double* a,
+ lapack_int* lda, lapack_int* i1, lapack_int* i2 );
void LAPACK_dsytri2( char* uplo, lapack_int* n,
double* a, lapack_int* lda,
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,
double* a, lapack_int* lda,
const lapack_int* ipiv, double* work,
lapack_int* iwork , lapack_int *info );
void LAPACK_ssyconv( char* uplo, char* way,
lapack_int* n, float* a, lapack_int* lda,
- const lapack_int* ipiv, float* work , lapack_int *info );
-void LAPACK_ssyswapr( char* uplo, lapack_int* n,
- float* a, lapack_int* i1, lapack_int* i2 );
+ const lapack_int* ipiv, float* e , lapack_int *info );
+void LAPACK_ssyswapr( char* uplo, lapack_int* n, float* a,
+ lapack_int* lda, lapack_int* i1, lapack_int* i2 );
void LAPACK_ssytri2( char* uplo, lapack_int* n,
float* a, lapack_int* lda,
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,
float* a, lapack_int* lda,
const lapack_int* ipiv, float* work,
double* b12e, double* b21d, double* b21e,
double* b22d, double* b22e, double* rwork,
lapack_int* lrwork , lapack_int *info );
-void LAPACK_zheswapr( char* uplo, lapack_int* n,
- lapack_complex_double* a, lapack_int* i1,
- lapack_int* i2 );
+void LAPACK_zheswapr( char* uplo, lapack_int* n, lapack_complex_double* a,
+ lapack_int* lda, lapack_int* i1, lapack_int* i2 );
void LAPACK_zhetri2( char* uplo, lapack_int* n,
lapack_complex_double* a, lapack_int* lda,
const lapack_int* ipiv,
void LAPACK_zsyconv( char* uplo, char* way,
lapack_int* n, lapack_complex_double* a,
lapack_int* lda, const lapack_int* ipiv,
- lapack_complex_double* work , lapack_int *info );
-void LAPACK_zsyswapr( char* uplo, lapack_int* n,
- lapack_complex_double* a, lapack_int* i1,
+ lapack_complex_double* e , lapack_int *info );
+void LAPACK_zsyswapr( char* uplo, lapack_int* n, lapack_complex_double* a,
+ lapack_int* lda, lapack_int* i1,
lapack_int* i2 );
void LAPACK_zsytri2( char* uplo, lapack_int* n,
lapack_complex_double* a, lapack_int* lda,
char* jobv1t, lapack_int* m, lapack_int* p,
lapack_int* q, lapack_complex_double* x11,
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* u2, lapack_int* ldu2,
lapack_complex_double* v1t, lapack_int* ldv1t,
#ifndef _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
#if defined(LAPACK_COMPLEX_CPP)
#include <complex>
--- /dev/null
+#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
+
#
include ../../make.inc
-SRC_OBJA = \
+SRC_OBJ = \
lapacke_cbbcsd.o \
lapacke_cbbcsd_work.o \
lapacke_cbdsqr.o \
lapacke_dsytri2_work.o \
lapacke_dsytri2x.o \
lapacke_dsytri2x_work.o \
-lapacke_dsytri_work.o
-
-SRC_OBJB = \
+lapacke_dsytri_work.o \
lapacke_dsytrs.o \
lapacke_dsytrs_rook.o \
lapacke_dsytrs2.o \
lapacke_zlagsy.o \
lapacke_zlagsy_work.o
-ALLOBJA = $(SRC_OBJA)
-ALLOBJB = $(SRC_OBJB) $(MATGEN_OBJ)
+ALLOBJ = $(SRC_OBJ) $(MATGEN_OBJ)
ifdef USEXBLAS
ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC)
all: ../../$(LAPACKELIB)
-../../$(LAPACKELIB): $(ALLOBJA) $(ALLOBJB) $(ALLXOBJ) $(DEPRECATED)
- $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(ALLOBJA)
- $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(ALLOBJB) $(ALLXOBJ) $(DEPRECATED)
+../../$(LAPACKELIB): $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED)
+ $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED)
$(RANLIB) ../../$(LAPACKELIB)
.c.o:
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function cgejsv
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) &&
( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) &&
( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) :
- 1 ))))))));
+ 7 ))))))));
lapack_int* iwork = NULL;
float* rwork = NULL;
lapack_complex_float* cwork = NULL;
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
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
/* 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 ) {
info = LAPACK_WORK_MEMORY_ERROR;
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 );
if( cwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
+ lrwork = MAX3( lrwork, 7, n+2*m );
rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cgejsv
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
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 );
if( info < 0 ) {
info = info - 1;
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
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 ldu_t = MAX(1,nu);
lapack_int ldv_t = MAX(1,nv);
LAPACKE_xerbla( "LAPACKE_cgejsv_work", info );
return info;
}
- if( ldu < n ) {
+ if( ldu < ncols_u ) {
info = -14;
LAPACKE_xerbla( "LAPACKE_cgejsv_work", info );
return info;
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) {
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 ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_1;
}
/* Transpose input matrices */
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 */
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,
/* Transpose output matrices */
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
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' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
******************************************************************************
* Contents: Native high-level C interface to LAPACK function cgemqrt
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int ldt, lapack_complex_float* c,
lapack_int ldc )
{
+ lapack_int nrows_v;
lapack_int info = 0;
lapack_complex_float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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 ) ) {
return -12;
}
- if( LAPACKE_cge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
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;
}
#endif
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function cgesvdx
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
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 lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, float vl, float vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
float* s, lapack_complex_float* u, lapack_int ldu,
lapack_complex_float* vt, lapack_int ldvt,
lapack_int* superb )
lapack_int info = 0;
lapack_int lwork = -1;
lapack_complex_float* work = NULL;
- lapack_complex_float work_query;
+ lapack_complex_float work_query;
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 i;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
}
lwork = LAPACK_C2INT (work_query);
/* 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*)
- LAPACKE_malloc( sizeof(lapack_complex_float) * lrwork );
+ LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
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 ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_2;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cgesvdx
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
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 lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, float vl, float vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
float* s, lapack_complex_float* u, lapack_int ldu,
lapack_complex_float* vt, lapack_int ldvt,
lapack_complex_float* work, lapack_int lwork,
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
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 );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
- lapack_int nrows_u = ( LAPACKE_lsame( jobu, 'a' ) ||
- LAPACKE_lsame( jobu, 's' ) ) ? m : 1;
- lapack_int ncols_u = LAPACKE_lsame( jobu, 'a' ) ? m :
- ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1);
- lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n :
- ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1);
+ lapack_int nrows_u = LAPACKE_lsame( jobu, 'v' ) ? m : 0;
+ lapack_int ncols_u = LAPACKE_lsame( jobu, 'v' ) ?
+ ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0;
+ lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'v' ) ?
+ ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0;
+ lapack_int ncols_vt = LAPACKE_lsame( jobvt, 'v' ) ? n : 0;
+
lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nrows_u);
lapack_int ldvt_t = MAX(1,nrows_vt);
+
lapack_complex_float* a_t = NULL;
lapack_complex_float* u_t = NULL;
lapack_complex_float* vt_t = NULL;
LAPACKE_xerbla( "LAPACKE_cgesvdx_work", info );
return info;
}
- if( ldvt < n ) {
+ if( ldvt < ncols_vt ) {
info = -18;
LAPACKE_xerbla( "LAPACKE_cgesvdx_work", info );
return info;
/* Query optimal working array(s) size if requested */
if( lwork == -1 ) {
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 );
return (info < 0) ? (info - 1) : info;
}
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
- if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ if( LAPACKE_lsame( jobu, 'v' ) ) {
u_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * ldu_t * MAX(1,ncols_u) );
if( u_t == NULL ) {
goto exit_level_1;
}
}
- if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ if( LAPACKE_lsame( jobvt, 'v' ) ) {
vt_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * ldvt_t * MAX(1,n) );
if( vt_t == NULL ) {
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
- LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu,
- &il, &iu, &ns, s, u, &ldu_t, vt,
+ LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu,
+ &il, &iu, ns, s, u_t, &ldu_t, vt_t,
&ldvt_t, work, &lwork, rwork, iwork, &info );
if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */
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,
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,
ldvt );
}
/* Release memory and exit */
- if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ if( LAPACKE_lsame( jobvt, 'v' ) ) {
LAPACKE_free( vt_t );
}
exit_level_2:
- if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ if( LAPACKE_lsame( jobu, 'v' ) ) {
LAPACKE_free( u_t );
}
exit_level_1:
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function cgesvj
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
- nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n :
- ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1);
+ nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
+ ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0);
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -7;
}
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cgesvj
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
- lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n :
- ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1);
+ lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
+ ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0);
lapack_int lda_t = MAX(1,m);
lapack_int ldv_t = MAX(1,nrows_v);
lapack_complex_float* a_t = NULL;
}
/* Query optimal working array(s) size if requested */
if( lwork == -1 ) {
- LAPACK_cggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a_t,
- &lda_t, b_t, &ldb_t, alpha, beta, u_t, &ldu_t,
- v_t, &ldv_t, q_t, &ldq_t, work, &lwork, rwork,
+ LAPACK_cggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a,
+ &lda_t, b, &ldb_t, alpha, beta, u, &ldu_t,
+ v, &ldv_t, q, &ldq_t, work, &lwork, rwork,
iwork, &info );
return (info < 0) ? (info - 1) : info;
}
LAPACKE_xerbla( "LAPACKE_cggsvp3_work", info );
return info;
}
- if( ldv < m ) {
+ if( ldv < p ) {
info = -19;
LAPACKE_xerbla( "LAPACKE_cggsvp3_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
if( lwork == -1 ) {
- LAPACK_cggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a_t, &lda_t, b_t,
- &ldb_t, &tola, &tolb, k, l, u_t, &ldu_t, v_t, &ldv_t,
- q_t, &ldq_t, iwork, rwork, tau, work, &lwork, &info );
+ LAPACK_cggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a, &lda_t, b,
+ &ldb_t, &tola, &tolb, k, l, u, &ldu_t, v, &ldv_t,
+ q, &ldq_t, iwork, rwork, tau, work, &lwork, &info );
return (info < 0) ? (info - 1) : info;
}
/* Allocate memory for temporary array(s) */
if( LAPACKE_lsame( jobv, 'v' ) ) {
v_t = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) *
- ldv_t * MAX(1,m) );
+ ldv_t * MAX(1,p) );
if( v_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_3;
LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
}
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' ) ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function chbtrd
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
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 ) ) {
return -10;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function cheswapr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_cheswapr( int matrix_layout, char uplo, lapack_int n,
- lapack_complex_float* a, lapack_int i1,
- lapack_int i2 )
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cheswapr", -1 );
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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;
}
#endif
- return LAPACKE_cheswapr_work( matrix_layout, uplo, n, a, i1, i2 );
+ return LAPACKE_cheswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
}
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cheswapr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_cheswapr_work( int matrix_layout, char uplo, lapack_int n,
- lapack_complex_float* a, lapack_int i1,
- lapack_int i2 )
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 )
{
lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
- LAPACK_cheswapr( &uplo, &n, a, &i1, &i2 );
+ LAPACK_cheswapr( &uplo, &n, a, &lda, &i1, &i2 );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
lapack_complex_float* a_t = NULL;
/* Allocate memory for temporary array(s) */
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 ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
/* 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 */
- LAPACK_cheswapr( &uplo, &n, a_t, &i1, &i2 );
+ LAPACK_cheswapr( &uplo, &n, a_t, &lda_t, &i1, &i2 );
info = 0; /* LAPACK call is ok! */
/* 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 */
LAPACKE_free( a_t );
exit_level_0:
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function chetri2x
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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;
}
#endif
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function clantr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
LAPACKE_cge_trans( matrix_layout, nrows_v, ncols_v-k, &v[k], ldv,
&v_t[k*ldv_t], ldv_t );
} else if( LAPACKE_lsame( storev, 'r' ) &&
- LAPACKE_lsame( direct, 'b' ) ) {
+ LAPACKE_lsame( direct, 'f' ) ) {
if( k > ncols_v ) {
LAPACKE_xerbla( "LAPACKE_clarfb_work", -8 );
return -8;
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function slaswp
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
/* Optionally check input matrices for NaNs */
switch (type) {
case 'G':
- if( LAPACKE_cge_nancheck( matrix_layout, lda, n, a, lda ) ) {
- return -9;
- }
+ if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -9;
+ }
break;
case 'L':
- // TYPE = 'L' - lower triangular matrix.
- if( LAPACKE_ctr_nancheck( matrix_layout, 'L', 'N', n, a, lda ) ) {
- return -9;
- }
+ // TYPE = 'L' - lower triangle of general matrix
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ 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;
case 'U':
- // TYPE = 'U' - upper triangular matrix
- if( LAPACKE_ctr_nancheck( matrix_layout, 'U', 'N', n, a, lda ) ) {
- return -9;
- }
+ // TYPE = 'U' - upper triangle of general matrix
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ 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;
case 'H':
- // TYPE = 'H' - upper Hessenberg matrix
- if( LAPACKE_chs_nancheck( matrix_layout, n, a, lda ) ) {
- return -9;
- }
- break;
+ // TYPE = 'H' - part of upper Hessenberg matrix in general matrix
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ LAPACKE_cgb_nancheck( matrix_layout, m, n, 1, 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, 1, a-1, lda+1 ) ) {
+ return -9;
+ }
case 'B':
- // TYPE = 'B' - A is a symmetric band matrix with lower bandwidth KL
- // and upper bandwidth KU and with the only the lower
- // half stored.
- if( LAPACKE_chb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) {
- return -9;
- }
- break;
- case 'Q':
- // TYPE = 'Q' - A is a symmetric band matrix with lower bandwidth KL
- // 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;
- }
+ // TYPE = 'B' - lower part of symmetric band matrix (assume m==n)
+ if( LAPACKE_chb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) {
+ return -9;
+ }
+ break;
+ case 'Q':
+ // TYPE = 'Q' - upper part of symmetric band matrix (assume m==n)
+ if( LAPACKE_chb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) {
+ return -9;
+ }
break;
case 'Z':
- // TYPE = 'Z' - A is a band matrix with lower bandwidth KL and upper
- // bandwidth KU. See DGBTRF for storage details.
- if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, a, lda ) ) {
- return -6;
- }
+ // TYPE = 'Z' - band matrix laid out for ?GBTRF
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, a+kl, lda ) ) {
+ return -9;
+ }
+ if( matrix_layout == LAPACK_ROW_MAJOR &&
+ LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, a+lda*kl, lda ) ) {
+ return -9;
+ }
break;
}
#endif
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function slaswp
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
info = info - 1;
}
} 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;
/* Check leading dimension(s) */
if( lda < n ) {
goto exit_level_0;
}
/* 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 */
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 */
- 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 */
LAPACKE_free( a_t );
exit_level_0:
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function cstedc
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
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 ) ) {
return -6;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function csteqr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
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 ) ) {
return -6;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function csyconv
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_csyconv( int matrix_layout, char uplo, char way, lapack_int n,
lapack_complex_float* a, lapack_int lda,
const lapack_int* ipiv,
- lapack_complex_float* work )
+ lapack_complex_float* e )
{
lapack_int info = 0;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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;
}
#endif
/* Call middle-level interface */
info = LAPACKE_csyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv,
- work );
+ e );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_csyconv", info );
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function csyconv
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_csyconv_work( int matrix_layout, char uplo, char way,
lapack_int n, lapack_complex_float* a,
lapack_int lda, const lapack_int* ipiv,
- lapack_complex_float* work )
+ lapack_complex_float* e )
{
lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* 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 ) {
info = info - 1;
}
/* Transpose input matrices */
LAPACKE_cge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
/* 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 ) {
info = info - 1;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function csyswapr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_csyswapr( int matrix_layout, char uplo, lapack_int n,
- lapack_complex_float* a, lapack_int i1,
- lapack_int i2 )
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_csyswapr", -1 );
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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;
}
#endif
- return LAPACKE_csyswapr_work( matrix_layout, uplo, n, a, i1, i2 );
+ return LAPACKE_csyswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
}
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function csyswapr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_csyswapr_work( int matrix_layout, char uplo, lapack_int n,
- lapack_complex_float* a, lapack_int i1,
- lapack_int i2 )
+ lapack_complex_float* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 )
{
lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
- LAPACK_csyswapr( &uplo, &n, a, &i1, &i2 );
+ LAPACK_csyswapr( &uplo, &n, a, &lda, &i1, &i2 );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
lapack_complex_float* a_t = NULL;
/* Allocate memory for temporary array(s) */
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 ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
/* 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 */
- LAPACK_csyswapr( &uplo, &n, a_t, &i1, &i2 );
+ LAPACK_csyswapr( &uplo, &n, a_t, &lda_t, &i1, &i2 );
info = 0; /* LAPACK call is ok! */
/* 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 */
LAPACKE_free( a_t );
exit_level_0:
******************************************************************************
* Contents: Native high-level C interface to LAPACK function ctpmqrt
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* b, lapack_int ldb )
{
+ lapack_int ncols_a, nrows_a;
+ lapack_int nrows_v;
lapack_int info = 0;
lapack_complex_float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -15;
}
- if( LAPACKE_cge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
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;
}
#endif
******************************************************************************
* Contents: Native high-level C interface to LAPACK function ctprfb
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* b, lapack_int ldb )
{
+ lapack_int ncols_v, nrows_v;
lapack_int info = 0;
lapack_int ldwork;
lapack_int work_size;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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 ) ) {
return -14;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -16;
}
- if( LAPACKE_cge_nancheck( matrix_layout, ldt, k, t, ldt ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, k, k, t, ldt ) ) {
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;
}
#endif
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function cuncsd2by1
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
char jobv1t, lapack_int m, lapack_int p, lapack_int q,
lapack_complex_float* x11, lapack_int ldx11,
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 ldu2, lapack_complex_float* v1t, lapack_int ldv1t )
{
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cuncsd2by1
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
char jobv1t, lapack_int m, lapack_int p,
lapack_int q, lapack_complex_float* x11, lapack_int ldx11,
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 ldu2, lapack_complex_float* v1t,
lapack_int ldv1t, lapack_complex_float* work,
/* Query optimal working array(s) size if requested */
if( lrwork == -1 || lwork == -1 ) {
LAPACK_cuncsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p,
- &q, x11, &ldx11, x21, &ldx21,
- theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t,
+ &q, x11, &ldx11_t, x21, &ldx21_t,
+ theta, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
work, &lwork, rwork, &lrwork, iwork, &info );
return (info < 0) ? (info - 1) : info;
}
ldx21_t );
/* Call LAPACK function and adjust info */
LAPACK_cuncsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p,
- &q, x11, &ldx11, x21, &ldx21,
- theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t,
+ &q, x11_t, &ldx11_t, x21_t, &ldx21_t,
+ theta, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t, &ldv1t_t,
work, &lwork, rwork, &lrwork, iwork, &info );
if( info < 0 ) {
info = info - 1;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cunmbr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
return (info < 0) ? (info - 1) : info;
}
/* Allocate memory for temporary array(s) */
- a_t = (lapack_complex_float*)
- LAPACKE_malloc( sizeof(lapack_complex_float) *
- lda_t * MAX(1,MIN(nq,k)) );
+ if( LAPACKE_lsame( vect, 'q' ) ) {
+ a_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,k) );
+ } else {
+ a_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,nq) );
+ }
if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function cunmlq
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
{
lapack_int info = 0;
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 ) {
/* Call LAPACK function and adjust info */
LAPACK_cunmlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
r = LAPACKE_lsame( side, 'l' ) ? m : n;
- lapack_int lda_t = MAX(1,k);
- lapack_int ldc_t = MAX(1,m);
- lapack_complex_float* a_t = NULL;
- lapack_complex_float* c_t = NULL;
+ lda_t = MAX(1,k);
+ ldc_t = MAX(1,m);
/* Check leading dimension(s) */
if( lda < r ) {
info = -8;
return (info < 0) ? (info - 1) : info;
}
/* Allocate memory for temporary array(s) */
- a_t = (lapack_complex_float*)
- LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) );
+ if( LAPACKE_lsame( side, 'l' ) ) {
+ 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 ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dbdsvdx
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_dbdsvdx( int matrix_layout, char uplo, char jobz, char range,
lapack_int n, double* d, double* e,
- lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ double vl, double vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
double* s, double* z, lapack_int ldz,
lapack_int* superb )
{
lapack_int info = 0;
- lapack_int lwork = 14*n;
+ lapack_int lwork = MAX(14*n,1);
double* work = NULL;
lapack_int* iwork = NULL;
lapack_int i;
if( LAPACKE_d_nancheck( n, d, 1 ) ) {
return -6;
}
- if( LAPACKE_d_nancheck( n, e, 1 ) ) {
+ if( LAPACKE_d_nancheck( n - 1, e, 1 ) ) {
return -7;
}
#endif
info = LAPACK_WORK_MEMORY_ERROR;
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 ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
/* Call middle-level interface */
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);
/* Backup significant data from working array(s) */
for( i=0; i<12*n-1; i++ ) {
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dbdsvdx
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_dbdsvdx_work( int matrix_layout, char uplo, char jobz, char range,
lapack_int n, double* d, double* e,
- lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ double vl, double vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
double* s, double* z, lapack_int ldz,
double* work, lapack_int* iwork )
{
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
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 );
if( info < 0 ) {
info = info - 1;
}
} 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);
double* z_t = NULL;
/* Check leading dimension(s) */
- if( ldz < nrows_z ) {
+ if( ldz < ncols_z ) {
info = -3;
LAPACKE_xerbla( "LAPACKE_dbdsvdx_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
- if( LAPACKE_lsame( jobz, 'n' ) ) {
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
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 ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
/* Call LAPACK function and adjust info */
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 );
if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */
- if( LAPACKE_lsame( jobz, 'n' ) ) {
- LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_z, nrows_z, z_t, ldz_t, z, ldz);
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_z, ncols_z, z_t, ldz_t, z, ldz);
}
/* Release memory and exit */
- if( LAPACKE_lsame( jobz, 'n' ) ) {
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
LAPACKE_free( z_t );
}
exit_level_0:
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dgejsv
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
( LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'j' ) ) &&
LAPACKE_lsame( jobv, 'j' ) ? MAX(7,m+3*n+n*n) :
- 1) ) ) ) ) );
+ 7) ) ) ) ) );
lapack_int* iwork = NULL;
double* work = NULL;
lapack_int i;
if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
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
/* 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 ) {
info = LAPACK_WORK_MEMORY_ERROR;
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 );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dgejsv
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
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 ldu_t = MAX(1,nu);
lapack_int ldv_t = MAX(1,nv);
LAPACKE_xerbla( "LAPACKE_dgejsv_work", info );
return info;
}
- if( ldu < n ) {
+ if( ldu < ncols_u ) {
info = -14;
LAPACKE_xerbla( "LAPACKE_dgejsv_work", info );
return info;
}
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
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 ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_1;
}
/* Transpose input matrices */
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 */
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,
/* Transpose output matrices */
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
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' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
******************************************************************************
* Contents: Native high-level C interface to LAPACK function dgemqrt
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
const double* t, lapack_int ldt, double* c,
lapack_int ldc )
{
+ lapack_int nrows_v;
lapack_int info = 0;
double* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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 ) ) {
return -12;
}
- if( LAPACKE_dge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
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;
}
#endif
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dgesvdx
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_dgesvdx( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, double* a,
- lapack_int lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, double vl, double vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
double* s, double* u, lapack_int ldu,
double* vt, lapack_int ldvt,
lapack_int* superb )
info = LAPACK_WORK_MEMORY_ERROR;
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 ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dgesvdx
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, double* a,
- lapack_int lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, double vl, double vu,
+ 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 lwork, lapack_int* iwork )
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
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 );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
- lapack_int nrows_u = ( LAPACKE_lsame( jobu, 'a' ) ||
- LAPACKE_lsame( jobu, 's' ) ) ? m : 1;
- lapack_int ncols_u = LAPACKE_lsame( jobu, 'a' ) ? m :
- ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1);
- lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n :
- ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1);
+ lapack_int nrows_u = LAPACKE_lsame( jobu, 'v' ) ? m : 0;
+ lapack_int ncols_u = LAPACKE_lsame( jobu, 'v' ) ?
+ ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0;
+ lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'v' ) ?
+ ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0;
+ lapack_int ncols_vt = LAPACKE_lsame( jobvt, 'v' ) ? n : 0;
+
lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nrows_u);
lapack_int ldvt_t = MAX(1,nrows_vt);
+
double* a_t = NULL;
double* u_t = NULL;
double* vt_t = NULL;
LAPACKE_xerbla( "LAPACKE_dgesvdx_work", info );
return info;
}
- if( ldvt < n ) {
+ if( ldvt < ncols_vt ) {
info = -18;
LAPACKE_xerbla( "LAPACKE_dgesvdx_work", info );
return info;
/* Query optimal working array(s) size if requested */
if( lwork == -1 ) {
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 );
return (info < 0) ? (info - 1) : info;
}
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
- if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ if( LAPACKE_lsame( jobu, 'v' ) ) {
u_t = (double*)
LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,ncols_u) );
if( u_t == NULL ) {
goto exit_level_1;
}
}
- if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ if( LAPACKE_lsame( jobvt, 'v' ) ) {
vt_t = (double*)
LAPACKE_malloc( sizeof(double) * ldvt_t * MAX(1,n) );
if( vt_t == NULL ) {
/* Transpose input matrices */
LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
- LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu,
- &il, &iu, &ns, s, u, &ldu_t, vt,
+ LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu,
+ &il, &iu, ns, s, u_t, &ldu_t, vt_t,
&ldvt_t, work, &lwork, iwork, &info );
if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */
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,
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,
ldvt );
}
/* Release memory and exit */
- if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ if( LAPACKE_lsame( jobvt, 'v' ) ) {
LAPACKE_free( vt_t );
}
exit_level_2:
- if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ if( LAPACKE_lsame( jobu, 'v' ) ) {
LAPACKE_free( u_t );
}
exit_level_1:
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dgesvj
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
- nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n :
- ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1);
+ nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
+ ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0);
if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -7;
}
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dgesvj
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
- lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n :
- ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1);
+ lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
+ ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0);
lapack_int lda_t = MAX(1,m);
lapack_int ldv_t = MAX(1,nrows_v);
double* a_t = NULL;
}
/* Query optimal working array(s) size if requested */
if( lwork == -1 ) {
- LAPACK_dggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a_t, &lda_t,
- b_t, &ldb_t, alpha, beta, u_t, &ldu_t, v_t, &ldv_t,
- q_t, &ldq_t, work, &lwork, iwork, &info );
+ LAPACK_dggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a, &lda_t,
+ b, &ldb_t, alpha, beta, u, &ldu_t, v, &ldv_t,
+ q, &ldq_t, work, &lwork, iwork, &info );
return (info < 0) ? (info - 1) : info;
}
/* Allocate memory for temporary array(s) */
LAPACKE_xerbla( "LAPACKE_dggsvp3_work", info );
return info;
}
- if( ldv < m ) {
+ if( ldv < p ) {
info = -19;
LAPACKE_xerbla( "LAPACKE_dggsvp3_work", info );
return info;
}
if( lwork == -1 ) {
- LAPACK_dggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a_t, &lda_t, b_t,
- &ldb_t, &tola, &tolb, k, l, u_t, &ldu_t, v_t,
- &ldv_t, q_t, &ldq_t, iwork, tau, work, &lwork,
+ LAPACK_dggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a, &lda_t, b,
+ &ldb_t, &tola, &tolb, k, l, u, &ldu_t, v,
+ &ldv_t, q, &ldq_t, iwork, tau, work, &lwork,
&info );
return (info < 0) ? (info - 1) : info;
}
}
}
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 ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_3;
LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
}
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' ) ) {
LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dlantr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dlantr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
LAPACKE_dge_trans( matrix_layout, nrows_v, ncols_v-k, &v[k], ldv,
&v_t[k*ldv_t], ldv_t );
} else if( LAPACKE_lsame( storev, 'r' ) &&
- LAPACKE_lsame( direct, 'b' ) ) {
+ LAPACKE_lsame( direct, 'f' ) ) {
if( k > ncols_v ) {
LAPACKE_xerbla( "LAPACKE_dlarfb_work", -8 );
return -8;
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dlaswp
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
/* Optionally check input matrices for NaNs */
switch (type) {
case 'G':
- if( LAPACKE_dge_nancheck( matrix_layout, lda, n, a, lda ) ) {
- return -9;
- }
+ if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -9;
+ }
break;
case 'L':
- // TYPE = 'L' - lower triangular matrix.
- if( LAPACKE_dtr_nancheck( matrix_layout, 'L', 'N', n, a, lda ) ) {
- return -9;
- }
+ // TYPE = 'L' - lower triangle of general matrix
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ 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;
case 'U':
- // TYPE = 'U' - upper triangular matrix
- if( LAPACKE_dtr_nancheck( matrix_layout, 'U', 'N', n, a, lda ) ) {
- return -9;
- }
+ // TYPE = 'U' - upper triangle of general matrix
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ 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;
case 'H':
- // TYPE = 'H' - upper Hessenberg matrix
- if( LAPACKE_dhs_nancheck( matrix_layout, n, a, lda ) ) {
- return -9;
- }
- break;
+ // TYPE = 'H' - part of upper Hessenberg matrix in general matrix
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ LAPACKE_dgb_nancheck( matrix_layout, m, n, 1, 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, 1, a-1, lda+1 ) ) {
+ return -9;
+ }
case 'B':
- // TYPE = 'B' - A is a symmetric band matrix with lower bandwidth KL
- // and upper bandwidth KU and with the only the lower
- // half stored.
- if( LAPACKE_dsb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) {
- return -9;
- }
- break;
- case 'Q':
- // TYPE = 'Q' - A is a symmetric band matrix with lower bandwidth KL
- // 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;
- }
+ // TYPE = 'B' - lower part of symmetric band matrix (assume m==n)
+ if( LAPACKE_dsb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) {
+ return -9;
+ }
+ break;
+ case 'Q':
+ // TYPE = 'Q' - upper part of symmetric band matrix (assume m==n)
+ if( LAPACKE_dsb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) {
+ return -9;
+ }
break;
case 'Z':
- // TYPE = 'Z' - A is a band matrix with lower bandwidth KL and upper
- // bandwidth KU. See DGBTRF for storage details.
- if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, a, lda ) ) {
- return -6;
- }
+ // TYPE = 'Z' - band matrix laid out for ?GBTRF
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, a+kl, lda ) ) {
+ return -9;
+ }
+ if( matrix_layout == LAPACK_ROW_MAJOR &&
+ LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, a+lda*kl, lda ) ) {
+ return -9;
+ }
break;
}
#endif
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dlaswp
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
info = info - 1;
}
} 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;
/* Check leading dimension(s) */
if( lda < n ) {
goto exit_level_0;
}
/* 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 */
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 */
- 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 */
LAPACKE_free( a_t );
exit_level_0:
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dorcsd2by1
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
/* Query optimal working array(s) size if requested */
if( lwork == -1 ) {
LAPACK_dorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p,
- &q, x11, &ldx11, x21, &ldx21,
- theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t,
+ &q, x11, &ldx11_t, x21, &ldx21_t,
+ theta, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
work, &lwork, iwork, &info );
return (info < 0) ? (info - 1) : info;
}
ldx21_t );
/* Call LAPACK function and adjust info */
LAPACK_dorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p,
- &q, x11, &ldx11, x21, &ldx21,
- theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t,
+ &q, x11_t, &ldx11_t, x21_t, &ldx21_t,
+ theta, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t, &ldv1t_t,
work, &lwork, iwork, &info );
if( info < 0 ) {
info = info - 1;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dormbr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dormlq
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dsbtrd
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
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 ) ) {
return -10;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dstedc
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
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 ) ) {
return -6;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dsteqr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
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 ) ) {
return -6;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dsyconv
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
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;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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;
}
#endif
/* Call middle-level interface */
info = LAPACKE_dsyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv,
- work );
+ e );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_dsyconv", info );
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dsyconv
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_dsyconv_work( int matrix_layout, char uplo, char way,
lapack_int n, double* a, lapack_int lda,
- const lapack_int* ipiv, double* work )
+ const lapack_int* ipiv, double* e )
{
lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* 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 ) {
info = info - 1;
}
/* Transpose input matrices */
LAPACKE_dge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
/* 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 ) {
info = info - 1;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dsyswapr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
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 ) {
LAPACKE_xerbla( "LAPACKE_dsyswapr", -1 );
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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;
}
#endif
- return LAPACKE_dsyswapr_work( matrix_layout, uplo, n, a, i1, i2 );
+ return LAPACKE_dsyswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
}
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dsyswapr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
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;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
- LAPACK_dsyswapr( &uplo, &n, a, &i1, &i2 );
+ LAPACK_dsyswapr( &uplo, &n, a, &lda, &i1, &i2 );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
double* a_t = NULL;
/* 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 ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
/* 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 */
- LAPACK_dsyswapr( &uplo, &n, a_t, &i1, &i2 );
+ LAPACK_dsyswapr( &uplo, &n, a_t, &lda_t, &i1, &i2 );
info = 0; /* LAPACK call is ok! */
/* 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 */
LAPACKE_free( a_t );
exit_level_0:
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dsytri2
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
{
lapack_int info = 0;
lapack_int lwork = -1;
- lapack_complex_double* work = NULL;
- lapack_complex_double work_query;
+ double* work = NULL;
+ double work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_dsytri2", -1 );
return -1;
}
lwork = LAPACK_Z2INT( work_query );
/* Allocate memory for work arrays */
- work = (lapack_complex_double*)
- LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+ work = (double*)
+ LAPACKE_malloc( sizeof(double) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dsytri2
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_dsytri2_work( int matrix_layout, char uplo, lapack_int n,
double* a, lapack_int lda,
const lapack_int* ipiv,
- lapack_complex_double* work, lapack_int lwork )
+ double* work, lapack_int lwork )
{
lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
******************************************************************************
* Contents: Native high-level C interface to LAPACK function dtpmqrt
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
double* a, lapack_int lda, double* b,
lapack_int ldb )
{
+ lapack_int ncols_a, nrows_a;
+ lapack_int nrows_v;
lapack_int info = 0;
double* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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;
}
if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -15;
}
- if( LAPACKE_dge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
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;
}
#endif
******************************************************************************
* Contents: Native high-level C interface to LAPACK function dtprfb
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int ldv, const double* t, lapack_int ldt,
double* a, lapack_int lda, double* b, lapack_int ldb )
{
+ lapack_int ncols_v, nrows_v;
lapack_int info = 0;
lapack_int ldwork;
lapack_int work_size;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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 ) ) {
return -14;
}
if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -16;
}
- if( LAPACKE_dge_nancheck( matrix_layout, ldt, k, t, ldt ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, k, k, t, ldt ) ) {
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;
}
#endif
******************************************************************************
* Contents: Native middle-level C interface to LAPACK function dtprfb
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
const double* v, lapack_int ldv,
const double* t, lapack_int ldt, double* a,
lapack_int lda, double* b, lapack_int ldb,
- const double* work, lapack_int ldwork )
+ double* work, lapack_int ldwork )
{
lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dgesv
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
-void LAPACKE_ilaver( const lapack_int* vers_major,
- const lapack_int* vers_minor,
- const lapack_int* vers_patch )
+void LAPACKE_ilaver( lapack_int* vers_major,
+ lapack_int* vers_minor,
+ lapack_int* vers_patch )
{
/* Call LAPACK function */
LAPACK_ilaver( vers_major, vers_minor, vers_patch );
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function sbdsvdx
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_sbdsvdx( int matrix_layout, char uplo, char jobz, char range,
lapack_int n, float* d, float* e,
- lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ float vl, float vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
float* s, float* z, lapack_int ldz,
lapack_int* superb )
{
lapack_int info = 0;
- lapack_int lwork = 14*n;
+ lapack_int lwork = MAX(14*n,1);
float* work = NULL;
lapack_int* iwork = NULL;
lapack_int i;
if( LAPACKE_s_nancheck( n, d, 1 ) ) {
return -6;
}
- if( LAPACKE_s_nancheck( n, e, 1 ) ) {
+ if( LAPACKE_s_nancheck( n - 1, e, 1 ) ) {
return -7;
}
#endif
info = LAPACK_WORK_MEMORY_ERROR;
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 ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
/* Call middle-level interface */
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);
/* Backup significant data from working array(s) */
for( i=0; i<12*n-1; i++ ) {
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function sbdsvdx
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_sbdsvdx_work( int matrix_layout, char uplo, char jobz, char range,
lapack_int n, float* d, float* e,
- lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ float vl, float vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
float* s, float* z, lapack_int ldz,
float* work, lapack_int* iwork )
{
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
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 );
if( info < 0 ) {
info = info - 1;
}
} 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);
float* z_t = NULL;
/* Check leading dimension(s) */
- if( ldz < nrows_z ) {
+ if( ldz < ncols_z ) {
info = -3;
LAPACKE_xerbla( "LAPACKE_sbdsvdx_work", info );
return info;
}
/* Allocate memory for temporary array(s) */
- if( LAPACKE_lsame( jobz, 'n' ) ) {
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
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 ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
/* Call LAPACK function and adjust info */
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 );
if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */
- if( LAPACKE_lsame( jobz, 'n' ) ) {
- LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_z, nrows_z, z_t, ldz_t, z, ldz);
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
+ LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_z, ncols_z, z_t, ldz_t, z, ldz);
}
/* Release memory and exit */
- if( LAPACKE_lsame( jobz, 'n' ) ) {
+ if( LAPACKE_lsame( jobz, 'v' ) ) {
LAPACKE_free( z_t );
}
exit_level_0:
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function sgejsv
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
( LAPACKE_lsame( jobv, 'v' ) ||
LAPACKE_lsame( jobv, 'j' ) ) &&
LAPACKE_lsame( jobv, 'j' ) ? MAX(7,m+3*n+n*n) :
- 1) ) ) ) ) );
+ 7) ) ) ) ) );
lapack_int* iwork = NULL;
float* work = NULL;
lapack_int i;
if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
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
/* 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 ) {
info = LAPACK_WORK_MEMORY_ERROR;
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 );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function sgejsv
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
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 ldu_t = MAX(1,nu);
lapack_int ldv_t = MAX(1,nv);
LAPACKE_xerbla( "LAPACKE_sgejsv_work", info );
return info;
}
- if( ldu < n ) {
+ if( ldu < ncols_u ) {
info = -14;
LAPACKE_xerbla( "LAPACKE_sgejsv_work", info );
return info;
}
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
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 ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_1;
}
/* Transpose input matrices */
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 */
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,
/* Transpose output matrices */
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
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' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
******************************************************************************
* Contents: Native high-level C interface to LAPACK function sgemqrt
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
const float* t, lapack_int ldt, float* c,
lapack_int ldc )
{
+ lapack_int nrows_v;
lapack_int info = 0;
float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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 ) ) {
return -12;
}
- if( LAPACKE_sge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
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;
}
#endif
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function sgesvdx
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_sgesvdx( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, float* a,
- lapack_int lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, float vl, float vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
float* s, float* u, lapack_int ldu,
float* vt, lapack_int ldvt,
lapack_int* superb )
info = LAPACK_WORK_MEMORY_ERROR;
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 ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function sgesvdx
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char range,
lapack_int m, lapack_int n, float* a,
- lapack_int lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, float vl, float vu,
+ 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 lwork, lapack_int* iwork )
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
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 );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
- lapack_int nrows_u = ( LAPACKE_lsame( jobu, 'a' ) ||
- LAPACKE_lsame( jobu, 's' ) ) ? m : 1;
- lapack_int ncols_u = LAPACKE_lsame( jobu, 'a' ) ? m :
- ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1);
- lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n :
- ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1);
+ lapack_int nrows_u = LAPACKE_lsame( jobu, 'v' ) ? m : 0;
+ lapack_int ncols_u = LAPACKE_lsame( jobu, 'v' ) ?
+ ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0;
+ lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'v' ) ?
+ ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0;
+ lapack_int ncols_vt = LAPACKE_lsame( jobvt, 'v' ) ? n : 0;
+
lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nrows_u);
lapack_int ldvt_t = MAX(1,nrows_vt);
+
float* a_t = NULL;
float* u_t = NULL;
float* vt_t = NULL;
LAPACKE_xerbla( "LAPACKE_sgesvdx_work", info );
return info;
}
- if( ldvt < n ) {
+ if( ldvt < ncols_vt ) {
info = -18;
LAPACKE_xerbla( "LAPACKE_sgesvdx_work", info );
return info;
/* Query optimal working array(s) size if requested */
if( lwork == -1 ) {
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 );
return (info < 0) ? (info - 1) : info;
}
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
- if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ if( LAPACKE_lsame( jobu, 'v' ) ) {
u_t = (float*)
LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,ncols_u) );
if( u_t == NULL ) {
goto exit_level_1;
}
}
- if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ if( LAPACKE_lsame( jobvt, 'v' ) ) {
vt_t = (float*)
LAPACKE_malloc( sizeof(float) * ldvt_t * MAX(1,n) );
if( vt_t == NULL ) {
/* Transpose input matrices */
LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
- LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu,
- &il, &iu, &ns, s, u, &ldu_t, vt,
+ LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu,
+ &il, &iu, ns, s, u_t, &ldu_t, vt_t,
&ldvt_t, work, &lwork, iwork, &info );
if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */
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,
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,
ldvt );
}
/* Release memory and exit */
- if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ if( LAPACKE_lsame( jobvt, 'v' ) ) {
LAPACKE_free( vt_t );
}
exit_level_2:
- if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ if( LAPACKE_lsame( jobu, 'v' ) ) {
LAPACKE_free( u_t );
}
exit_level_1:
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function sgesvj
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
- nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n :
- ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1);
+ nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
+ ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0 );
if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -7;
}
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function sgesvj
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
- lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n :
- ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1);
+ lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
+ ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0);
lapack_int lda_t = MAX(1,m);
lapack_int ldv_t = MAX(1,nrows_v);
float* a_t = NULL;
}
/* Query optimal working array(s) size if requested */
if( lwork == -1 ) {
- LAPACK_sggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a_t, &lda_t,
- b_t, &ldb_t, alpha, beta, u_t, &ldu_t, v_t, &ldv_t,
- q_t, &ldq_t, work, &lwork, iwork, &info );
+ LAPACK_sggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a, &lda_t,
+ b, &ldb_t, alpha, beta, u, &ldu_t, v, &ldv_t,
+ q, &ldq_t, work, &lwork, iwork, &info );
return (info < 0) ? (info - 1) : info;
}
LAPACKE_xerbla( "LAPACKE_sggsvp3_work", info );
return info;
}
- if( ldv < m ) {
+ if( ldv < p ) {
info = -19;
LAPACKE_xerbla( "LAPACKE_sggsvp3_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
if( lwork == -1 ) {
- LAPACK_sggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a_t, &lda_t, b_t,
- &ldb_t, &tola, &tolb, k, l, u_t, &ldu_t,
- v_t, &ldv_t, q_t, &ldq_t, iwork, tau, work, &lwork,
+ LAPACK_sggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a, &lda_t, b,
+ &ldb_t, &tola, &tolb, k, l, u, &ldu_t,
+ v, &ldv_t, q, &ldq_t, iwork, tau, work, &lwork,
&info );
return (info < 0) ? (info - 1) : info;
}
}
}
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 ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_3;
LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
}
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' ) ) {
LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function slantr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function slantr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
LAPACKE_sge_trans( matrix_layout, nrows_v, ncols_v-k, &v[k], ldv,
&v_t[k*ldv_t], ldv_t );
} else if( LAPACKE_lsame( storev, 'r' ) &&
- LAPACKE_lsame( direct, 'b' ) ) {
+ LAPACKE_lsame( direct, 'f' ) ) {
if( k > ncols_v ) {
LAPACKE_xerbla( "LAPACKE_slarfb_work", -8 );
return -8;
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function slaswp
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_slascl( int matrix_layout, char type, lapack_int kl,
- lapack_int ku, float cfrom, float cto,
- lapack_int m, lapack_int n, float* a,
+ lapack_int ku, float cfrom, float cto,
+ lapack_int m, lapack_int n, float* a,
lapack_int lda )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
/* Optionally check input matrices for NaNs */
switch (type) {
case 'G':
- if( LAPACKE_sge_nancheck( matrix_layout, lda, n, a, lda ) ) {
- return -9;
- }
+ if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -9;
+ }
break;
case 'L':
- // TYPE = 'L' - lower triangular matrix.
- if( LAPACKE_str_nancheck( matrix_layout, 'L', 'N', n, a, lda ) ) {
- return -9;
- }
+ // TYPE = 'L' - lower triangle of general matrix
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ 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;
case 'U':
- // TYPE = 'U' - upper triangular matrix
- if( LAPACKE_str_nancheck( matrix_layout, 'U', 'N', n, a, lda ) ) {
- return -9;
- }
+ // TYPE = 'U' - upper triangle of general matrix
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ 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;
case 'H':
- // TYPE = 'H' - upper Hessenberg matrix
- if( LAPACKE_shs_nancheck( matrix_layout, n, a, lda ) ) {
- return -9;
- }
- break;
+ // TYPE = 'H' - part of upper Hessenberg matrix in general matrix
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ LAPACKE_sgb_nancheck( matrix_layout, m, n, 1, 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, 1, a-1, lda+1 ) ) {
+ return -9;
+ }
case 'B':
- // TYPE = 'B' - A is a symmetric band matrix with lower bandwidth KL
- // and upper bandwidth KU and with the only the lower
- // half stored.
- if( LAPACKE_ssb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) {
- return -9;
- }
- break;
- case 'Q':
- // TYPE = 'Q' - A is a symmetric band matrix with lower bandwidth KL
- // 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;
- }
+ // TYPE = 'B' - lower part of symmetric band matrix (assume m==n)
+ if( LAPACKE_ssb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) {
+ return -9;
+ }
+ break;
+ case 'Q':
+ // TYPE = 'Q' - upper part of symmetric band matrix (assume m==n)
+ if( LAPACKE_ssb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) {
+ return -9;
+ }
break;
case 'Z':
- // TYPE = 'Z' - A is a band matrix with lower bandwidth KL and upper
- // bandwidth KU. See DGBTRF for storage details.
- if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, a, lda ) ) {
- return -6;
- }
+ // TYPE = 'Z' - band matrix laid out for ?GBTRF
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, a+kl, lda ) ) {
+ return -9;
+ }
+ if( matrix_layout == LAPACK_ROW_MAJOR &&
+ LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, a+lda*kl, lda ) ) {
+ return -9;
+ }
break;
}
#endif
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function slaswp
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
info = info - 1;
}
} 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;
/* Check leading dimension(s) */
if( lda < n ) {
goto exit_level_0;
}
/* 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 */
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 */
- 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 */
LAPACKE_free( a_t );
exit_level_0:
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function sorcsd2by1
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
/* Query optimal working array(s) size if requested */
if( lwork == -1 ) {
LAPACK_sorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p,
- &q, x11, &ldx11, x21, &ldx21,
- theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t,
+ &q, x11, &ldx11_t, x21, &ldx21_t,
+ theta, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
work, &lwork, iwork, &info );
return (info < 0) ? (info - 1) : info;
}
ldx21_t );
/* Call LAPACK function and adjust info */
LAPACK_sorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p,
- &q, x11, &ldx11, x21, &ldx21,
- theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t,
+ &q, x11_t, &ldx11_t, x21_t, &ldx21_t,
+ theta, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t, &ldv1t_t,
work, &lwork, iwork, &info );
if( info < 0 ) {
info = info - 1;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function sormbr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function sormlq
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function ssbtrd
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
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 ) ) {
return -10;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function sstedc
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
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 ) ) {
return -6;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function ssteqr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
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 ) ) {
return -6;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function ssyconv
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
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;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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;
}
#endif
/* Call middle-level interface */
info = LAPACKE_ssyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv,
- work );
+ e );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_ssyconv", info );
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function ssyconv
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_ssyconv_work( int matrix_layout, char uplo, char way,
lapack_int n, float* a, lapack_int lda,
- const lapack_int* ipiv, float* work )
+ const lapack_int* ipiv, float* e )
{
lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* 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 ) {
info = info - 1;
}
/* Transpose input matrices */
LAPACKE_sge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
/* 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 ) {
info = info - 1;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function ssyswapr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
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 ) {
LAPACKE_xerbla( "LAPACKE_ssyswapr", -1 );
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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;
}
#endif
- return LAPACKE_ssyswapr_work( matrix_layout, uplo, n, a, i1, i2 );
+ return LAPACKE_ssyswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
}
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function ssyswapr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
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;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
- LAPACK_ssyswapr( &uplo, &n, a, &i1, &i2 );
+ LAPACK_ssyswapr( &uplo, &n, a, &lda, &i1, &i2 );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
float* a_t = NULL;
/* 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 ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
/* 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 */
- LAPACK_ssyswapr( &uplo, &n, a_t, &i1, &i2 );
+ LAPACK_ssyswapr( &uplo, &n, a_t, &lda_t, &i1, &i2 );
info = 0; /* LAPACK call is ok! */
/* 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 */
LAPACKE_free( a_t );
exit_level_0:
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function ssytri2
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
{
lapack_int info = 0;
lapack_int lwork = -1;
- lapack_complex_float* work = NULL;
- lapack_complex_float work_query;
+ float* work = NULL;
+ float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_ssytri2", -1 );
return -1;
}
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
- work = (lapack_complex_float*)
- LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+ work = (float*)
+ LAPACKE_malloc( sizeof(float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function ssytri2
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_ssytri2_work( int matrix_layout, char uplo, lapack_int n,
float* a, lapack_int lda,
const lapack_int* ipiv,
- lapack_complex_float* work, lapack_int lwork )
+ float* work, lapack_int lwork )
{
lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
******************************************************************************
* Contents: Native high-level C interface to LAPACK function stpmqrt
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int ldv, const float* t, lapack_int ldt,
float* a, lapack_int lda, float* b, lapack_int ldb )
{
+ lapack_int ncols_a, nrows_a;
+ lapack_int nrows_v;
lapack_int info = 0;
float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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;
}
if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -15;
}
- if( LAPACKE_sge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
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;
}
#endif
******************************************************************************
* Contents: Native high-level C interface to LAPACK function stprfb
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int ldv, const float* t, lapack_int ldt,
float* a, lapack_int lda, float* b, lapack_int ldb)
{
+ lapack_int ncols_v, nrows_v;
lapack_int info = 0;
lapack_int ldwork;
lapack_int work_size;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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 ) ) {
return -14;
}
if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -16;
}
- if( LAPACKE_sge_nancheck( matrix_layout, ldt, k, t, ldt ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, k, k, t, ldt ) ) {
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;
}
#endif
******************************************************************************
* Contents: Native middle-level C interface to LAPACK function stprfb
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int n, lapack_int k, lapack_int l,
const float* v, lapack_int ldv, const float* t,
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 info = 0;
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function zgejsv
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) &&
( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) &&
( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) :
- 1) ) ) ) ) ) ) ) );
+ 7) ) ) ) ) ) ) ) );
lapack_int* iwork = NULL;
double* rwork = NULL;
lapack_complex_double* cwork = NULL;
if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
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
/* 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 ) {
info = LAPACK_WORK_MEMORY_ERROR;
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 );
if( cwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
+ lrwork = MAX3( lrwork, 7, n+2*m );
rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork );
if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function zgejsv
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
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 );
if( info < 0 ) {
info = info - 1;
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
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 ldu_t = MAX(1,nu);
lapack_int ldv_t = MAX(1,nv);
LAPACKE_xerbla( "LAPACKE_zgejsv_work", info );
return info;
}
- if( ldu < n ) {
+ if( ldu < ncols_u ) {
info = -14;
LAPACKE_xerbla( "LAPACKE_zgejsv_work", info );
return info;
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
LAPACKE_lsame( jobu, 'w' ) ) {
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 ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_1;
}
/* Transpose input matrices */
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 */
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,
/* Transpose output matrices */
if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) ||
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' ) ||
LAPACKE_lsame( jobv, 'w' ) ) {
******************************************************************************
* Contents: Native high-level C interface to LAPACK function zgemqrt
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int ldt, lapack_complex_double* c,
lapack_int ldc )
{
+ lapack_int nrows_v;
lapack_int info = 0;
lapack_complex_double* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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 ) ) {
return -12;
}
- if( LAPACKE_zge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
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;
}
#endif
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function zgesvdx
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
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 lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, double vl, double vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
double* s, lapack_complex_double* u, lapack_int ldu,
lapack_complex_double* vt, lapack_int ldvt,
lapack_int* superb )
lapack_int info = 0;
lapack_int lwork = -1;
lapack_complex_double* work = NULL;
- lapack_complex_double work_query;
+ lapack_complex_double work_query;
double* 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 i;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
}
lwork = LAPACK_Z2INT (work_query);
/* Allocate memory for work arrays */
- rwork = (double*)LAPACKE_malloc( sizeof(double) * lwork );
- if( work == NULL ) {
- info = LAPACK_WORK_MEMORY_ERROR;
- goto exit_level_0;
- }
work = (lapack_complex_double*)
- LAPACKE_malloc( sizeof(lapack_complex_double) * lrwork );
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
- iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * (12*MIN(m,n)) );
+ rwork = (double*)LAPACKE_malloc( sizeof(double) * 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 ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_2;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function zgesvdx
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
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 lda, lapack_int vl, lapack_int vu,
- lapack_int il, lapack_int iu, lapack_int ns,
+ lapack_int lda, double vl, double vu,
+ lapack_int il, lapack_int iu, lapack_int* ns,
double* s, lapack_complex_double* u, lapack_int ldu,
lapack_complex_double* vt, lapack_int ldvt,
lapack_complex_double* work, lapack_int lwork,
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_zgesvdx( &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 );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
- lapack_int nrows_u = ( LAPACKE_lsame( jobu, 'a' ) ||
- LAPACKE_lsame( jobu, 's' ) ) ? m : 1;
- lapack_int ncols_u = LAPACKE_lsame( jobu, 'a' ) ? m :
- ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1);
- lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n :
- ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1);
+ lapack_int nrows_u = LAPACKE_lsame( jobu, 'v' ) ? m : 0;
+ lapack_int ncols_u = LAPACKE_lsame( jobu, 'v' ) ?
+ ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0;
+ lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'v' ) ?
+ ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0;
+ lapack_int ncols_vt = LAPACKE_lsame( jobvt, 'v' ) ? n : 0;
+
lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nrows_u);
lapack_int ldvt_t = MAX(1,nrows_vt);
+
lapack_complex_double* a_t = NULL;
lapack_complex_double* u_t = NULL;
lapack_complex_double* vt_t = NULL;
LAPACKE_xerbla( "LAPACKE_zgesvdx_work", info );
return info;
}
- if( ldvt < n ) {
+ if( ldvt < ncols_vt ) {
info = -18;
LAPACKE_xerbla( "LAPACKE_zgesvdx_work", info );
return info;
/* Query optimal working array(s) size if requested */
if( lwork == -1 ) {
LAPACK_zgesvdx( &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 );
return (info < 0) ? (info - 1) : info;
}
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
- if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ if( LAPACKE_lsame( jobu, 'v' ) ) {
u_t = (lapack_complex_double*)
LAPACKE_malloc( sizeof(lapack_complex_double) * ldu_t * MAX(1,ncols_u) );
if( u_t == NULL ) {
goto exit_level_1;
}
}
- if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ if( LAPACKE_lsame( jobvt, 'v' ) ) {
vt_t = (lapack_complex_double*)
LAPACKE_malloc( sizeof(lapack_complex_double) * ldvt_t * MAX(1,n) );
if( vt_t == NULL ) {
/* Transpose input matrices */
LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
- LAPACK_zgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu,
- &il, &iu, &ns, s, u, &ldu_t, vt,
+ LAPACK_zgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu,
+ &il, &iu, ns, s, u_t, &ldu_t, vt_t,
&ldvt_t, work, &lwork, rwork, iwork, &info );
if( info < 0 ) {
info = info - 1;
}
/* Transpose output matrices */
LAPACKE_zge_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_zge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t,
u, ldu );
}
- if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ if( LAPACKE_lsame( jobvt, 'v' ) ) {
LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt,
ldvt );
}
/* Release memory and exit */
- if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) {
+ if( LAPACKE_lsame( jobvt, 'v' ) ) {
LAPACKE_free( vt_t );
}
exit_level_2:
- if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) {
+ if( LAPACKE_lsame( jobu, 'v' ) ) {
LAPACKE_free( u_t );
}
exit_level_1:
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function zgesvj
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
- nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n :
- ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1);
+ nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
+ ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0);
if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -7;
}
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function zgesvj
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
- lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n :
- ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1);
+ lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
+ ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0);
lapack_int lda_t = MAX(1,m);
lapack_int ldv_t = MAX(1,nrows_v);
lapack_complex_double* a_t = NULL;
if( info != 0 ) {
goto exit_level_0;
}
- lwork = LAPACK_C2INT( work_query );
+ lwork = LAPACK_Z2INT( work_query );
/* Allocate memory for work arrays */
work = (lapack_complex_double*)
LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
}
/* Query optimal working array(s) size if requested */
if( lwork == -1 ) {
- LAPACK_zggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a_t, &lda_t,
- b_t, &ldb_t, alpha, beta, u_t, &ldu_t, v_t, &ldv_t,
- q_t, &ldq_t, work, &lwork, rwork, iwork, &info );
+ LAPACK_zggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a, &lda_t,
+ b, &ldb_t, alpha, beta, u, &ldu_t, v, &ldv_t,
+ q, &ldq_t, work, &lwork, rwork, iwork, &info );
return (info < 0) ? (info - 1) : info;
}
/* Allocate memory for temporary array(s) */
LAPACKE_xerbla( "LAPACKE_zggsvp3_work", info );
return info;
}
- if( ldv < m ) {
+ if( ldv < p ) {
info = -19;
LAPACKE_xerbla( "LAPACKE_zggsvp3_work", info );
return info;
}
/* Query optimal working array(s) size if requested */
if( lwork == -1 ) {
- LAPACK_zggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a_t, &lda_t, b_t,
- &ldb_t, &tola, &tolb, k, l, u_t, &ldu_t, v_t,
- &ldv_t, q_t, &ldq_t, iwork, rwork, tau, work,
+ LAPACK_zggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a, &lda_t, b,
+ &ldb_t, &tola, &tolb, k, l, u, &ldu_t, v,
+ &ldv_t, q, &ldq_t, iwork, rwork, tau, work,
&lwork, &info );
return (info < 0) ? (info - 1) : info;
}
if( LAPACKE_lsame( jobv, 'v' ) ) {
v_t = (lapack_complex_double*)
LAPACKE_malloc( sizeof(lapack_complex_double) *
- ldv_t * MAX(1,m) );
+ ldv_t * MAX(1,p) );
if( v_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_3;
LAPACKE_zge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu );
}
if( LAPACKE_lsame( jobv, 'v' ) ) {
- LAPACKE_zge_trans( LAPACK_COL_MAJOR, p, m, v_t, ldv_t, v, ldv );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv );
}
if( LAPACKE_lsame( jobq, 'q' ) ) {
LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq );
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function zhbtrd
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
return -6;
}
- if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) {
+ if( LAPACKE_lsame( vect, 'u' ) ) {
if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
return -10;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function zheswapr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_zheswapr( int matrix_layout, char uplo, lapack_int n,
- lapack_complex_double* a, lapack_int i1,
- lapack_int i2 )
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_zheswapr", -1 );
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
- if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, n ) ) {
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -4;
}
#endif
- return LAPACKE_zheswapr_work( matrix_layout, uplo, n, a, i1, i2 );
+ return LAPACKE_zheswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
}
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function zheswapr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_zheswapr_work( int matrix_layout, char uplo, lapack_int n,
- lapack_complex_double* a, lapack_int i1,
- lapack_int i2 )
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 )
{
lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
- LAPACK_zheswapr( &uplo, &n, a, &i1, &i2 );
+ LAPACK_zheswapr( &uplo, &n, a, &lda, &i1, &i2 );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
lapack_complex_double* a_t = NULL;
/* Allocate memory for temporary array(s) */
a_t = (lapack_complex_double*)
- LAPACKE_malloc( sizeof(lapack_complex_double) * n * MAX(1,n) );
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
/* Transpose input matrices */
- LAPACKE_zhe_trans( matrix_layout, uplo, n, a, n, a_t, n );
+ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
- LAPACK_zheswapr( &uplo, &n, a_t, &i1, &i2 );
+ LAPACK_zheswapr( &uplo, &n, a_t, &lda_t, &i1, &i2 );
info = 0; /* LAPACK call is ok! */
/* Transpose output matrices */
- LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n );
+ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
/* Release memory and exit */
LAPACKE_free( a_t );
exit_level_0:
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function zhetri2x
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
- if( LAPACKE_zge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
return -4;
}
#endif
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function zlantr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function zlantr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
LAPACKE_zge_trans( matrix_layout, nrows_v, ncols_v-k, &v[k], ldv,
&v_t[k*ldv_t], ldv_t );
} else if( LAPACKE_lsame( storev, 'r' ) &&
- LAPACKE_lsame( direct, 'b' ) ) {
+ LAPACKE_lsame( direct, 'f' ) ) {
if( k > ncols_v ) {
LAPACKE_xerbla( "LAPACKE_zlarfb_work", -8 );
return -8;
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dlaswp
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
LAPACKE_xerbla( "LAPACKE_zlascl", -1 );
return -1;
}
-#ifndef LAPACK_zISABLE_NAN_CHECK
+#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
switch (type) {
case 'G':
- if( LAPACKE_zge_nancheck( matrix_layout, lda, n, a, lda ) ) {
- return -9;
- }
+ if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+ return -9;
+ }
break;
case 'L':
- // TYPE = 'L' - lower triangular matrix.
- if( LAPACKE_ztr_nancheck( matrix_layout, 'L', 'N', n, a, lda ) ) {
- return -9;
- }
+ // TYPE = 'L' - lower triangle of general matrix
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ LAPACKE_zgb_nancheck( matrix_layout, m, n, m-1, 0, a, lda+1 ) ) {
+ return -9;
+ }
+ if( matrix_layout == LAPACK_ROW_MAJOR &&
+ LAPACKE_zgb_nancheck( LAPACK_COL_MAJOR, n, m, 0, m-1, a-m+1, lda+1 ) ) {
+ return -9;
+ }
break;
case 'U':
- // TYPE = 'U' - upper triangular matrix
- if( LAPACKE_ztr_nancheck( matrix_layout, 'U', 'N', n, a, lda ) ) {
- return -9;
- }
+ // TYPE = 'U' - upper triangle of general matrix
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ LAPACKE_zgb_nancheck( matrix_layout, m, n, 0, n-1, a-n+1, lda+1 ) ) {
+ return -9;
+ }
+ if( matrix_layout == LAPACK_ROW_MAJOR &&
+ LAPACKE_zgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 0, a, lda+1 ) ) {
+ return -9;
+ }
break;
case 'H':
- // TYPE = 'H' - upper Hessenberg matrix
- if( LAPACKE_zhs_nancheck( matrix_layout, n, a, lda ) ) {
- return -9;
- }
- break;
+ // TYPE = 'H' - part of upper Hessenberg matrix in general matrix
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ LAPACKE_zgb_nancheck( matrix_layout, m, n, 1, n-1, a-n+1, lda+1 ) ) {
+ return -9;
+ }
+ if( matrix_layout == LAPACK_ROW_MAJOR &&
+ LAPACKE_zgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 1, a-1, lda+1 ) ) {
+ return -9;
+ }
case 'B':
- // TYPE = 'B' - A is a symmetric band matrix with lower bandwidth KL
- // and upper bandwidth KU and with the only the lower
- // half stored.
- if( LAPACKE_zhb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) {
- return -9;
- }
- break;
- case 'Q':
- // TYPE = 'Q' - A is a symmetric band matrix with lower bandwidth KL
- // and upper bandwidth KU and with the only the upper
- // half stored.
- if( LAPACKE_zhb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) {
- return -9;
- }
+ // TYPE = 'B' - lower part of symmetric band matrix (assume m==n)
+ if( LAPACKE_zhb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) {
+ return -9;
+ }
+ break;
+ case 'Q':
+ // TYPE = 'Q' - upper part of symmetric band matrix (assume m==n)
+ if( LAPACKE_zhb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) {
+ return -9;
+ }
break;
case 'Z':
- // TYPE = 'Z' - A is a band matrix with lower bandwidth KL and upper
- // bandwidth KU. See DGBTRF for storage details.
- if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, a, lda ) ) {
- return -6;
- }
+ // TYPE = 'Z' - band matrix laid out for ?GBTRF
+ if( matrix_layout == LAPACK_COL_MAJOR &&
+ LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, a+kl, lda ) ) {
+ return -9;
+ }
+ if( matrix_layout == LAPACK_ROW_MAJOR &&
+ LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, a+lda*kl, lda ) ) {
+ return -9;
+ }
break;
}
#endif
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function dlaswp
* Author: Intel Corporation
-* Generated November, 2011
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
info = info - 1;
}
} 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_double* a_t = NULL;
/* Check leading dimension(s) */
if( lda < n ) {
goto exit_level_0;
}
/* Transpose input matrices */
- LAPACKE_zge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
+ LAPACKE_zge_trans( matrix_layout, nrows_a, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
LAPACK_zlascl( &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 */
- LAPACKE_zge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda );
+ LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_a, n, a_t, lda_t, a, lda );
/* Release memory and exit */
LAPACKE_free( a_t );
exit_level_0:
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function zstedc
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
return -5;
}
- if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_lsame( compz, 'v' ) ) {
if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
return -6;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function zsteqr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
return -5;
}
- if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+ if( LAPACKE_lsame( compz, 'v' ) ) {
if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
return -6;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function zsyconv
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_zsyconv( int matrix_layout, char uplo, char way, lapack_int n,
lapack_complex_double* a, lapack_int lda,
const lapack_int* ipiv,
- lapack_complex_double* work )
+ lapack_complex_double* e )
{
lapack_int info = 0;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
- if( LAPACKE_zge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
return -5;
}
#endif
/* Call middle-level interface */
info = LAPACKE_zsyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv,
- work );
+ e );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function zsyconv
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_zsyconv_work( int matrix_layout, char uplo, char way,
lapack_int n, lapack_complex_double* a,
lapack_int lda, const lapack_int* ipiv,
- lapack_complex_double* work )
+ lapack_complex_double* e )
{
lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
- LAPACK_zsyconv( &uplo, &way, &n, a, &lda, ipiv, work, &info );
+ LAPACK_zsyconv( &uplo, &way, &n, a, &lda, ipiv, e, &info );
if( info < 0 ) {
info = info - 1;
}
/* Transpose input matrices */
LAPACKE_zge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
- LAPACK_zsyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, work, &info );
+ LAPACK_zsyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, e, &info );
if( info < 0 ) {
info = info - 1;
}
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function zsyswapr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_zsyswapr( int matrix_layout, char uplo, lapack_int n,
- lapack_complex_double* a, lapack_int i1,
- lapack_int i2 )
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_zsyswapr", -1 );
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
- if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, n ) ) {
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -4;
}
#endif
- return LAPACKE_zsyswapr_work( matrix_layout, uplo, n, a, i1, i2 );
+ return LAPACKE_zsyswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
}
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function zsyswapr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_int LAPACKE_zsyswapr_work( int matrix_layout, char uplo, lapack_int n,
- lapack_complex_double* a, lapack_int i1,
- lapack_int i2 )
+ lapack_complex_double* a, lapack_int lda,
+ lapack_int i1, lapack_int i2 )
{
lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
- LAPACK_zsyswapr( &uplo, &n, a, &i1, &i2 );
+ LAPACK_zsyswapr( &uplo, &n, a, &lda, &i1, &i2 );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+ lapack_int lda_t = MAX(1,n);
lapack_complex_double* a_t = NULL;
/* Allocate memory for temporary array(s) */
a_t = (lapack_complex_double*)
- LAPACKE_malloc( sizeof(lapack_complex_double) * n * MAX(1,n) );
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
/* Transpose input matrices */
- LAPACKE_zsy_trans( matrix_layout, uplo, n, a, n, a_t, n );
+ LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
/* Call LAPACK function and adjust info */
- LAPACK_zsyswapr( &uplo, &n, a_t, &i1, &i2 );
+ LAPACK_zsyswapr( &uplo, &n, a_t, &lda_t, &i1, &i2 );
info = 0; /* LAPACK call is ok! */
/* Transpose output matrices */
- LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n );
+ LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
/* Release memory and exit */
LAPACKE_free( a_t );
exit_level_0:
******************************************************************************
* Contents: Native high-level C interface to LAPACK function ztpmqrt
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_complex_double* a, lapack_int lda,
lapack_complex_double* b, lapack_int ldb )
{
+ lapack_int ncols_a, nrows_a;
+ lapack_int nrows_v;
lapack_int info = 0;
lapack_complex_double* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
- if( LAPACKE_zge_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_zge_nancheck( matrix_layout, nrows_a, ncols_a, a, lda ) ) {
return -13;
}
if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -15;
}
- if( LAPACKE_zge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
return -11;
}
- if( LAPACKE_zge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
return -9;
}
#endif
******************************************************************************
* Contents: Native high-level C interface to LAPACK function ztprfb
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
lapack_complex_double* a, lapack_int lda,
lapack_complex_double* b, lapack_int ldb)
{
+ lapack_int ncols_v, nrows_v;
lapack_int info = 0;
lapack_int ldwork;
lapack_int work_size;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* 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_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
return -14;
}
if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -16;
}
- if( LAPACKE_zge_nancheck( matrix_layout, ldt, k, t, ldt ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, k, k, t, ldt ) ) {
return -12;
}
- if( LAPACKE_zge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
return -10;
}
#endif
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function zuncsd2by1
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
char jobv1t, lapack_int m, lapack_int p, lapack_int q,
lapack_complex_double* x11, lapack_int ldx11,
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 ldu2, lapack_complex_double* v1t, lapack_int ldv1t )
{
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function zuncsd2by1
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
char jobv1t, lapack_int m, lapack_int p,
lapack_int q, lapack_complex_double* x11, lapack_int ldx11,
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 ldu2, lapack_complex_double* v1t,
lapack_int ldv1t, lapack_complex_double* work,
/* Query optimal working array(s) size if requested */
if( lrwork == -1 || lwork == -1 ) {
LAPACK_zuncsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p,
- &q, x11, &ldx11, x21, &ldx21,
- theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t,
+ &q, x11, &ldx11_t, x21, &ldx21_t,
+ theta, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
work, &lwork, rwork, &lrwork, iwork, &info );
return (info < 0) ? (info - 1) : info;
}
ldx21_t );
/* Call LAPACK function and adjust info */
LAPACK_zuncsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p,
- &q, x11, &ldx11, x21, &ldx21,
- theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t,
+ &q, x11_t, &ldx11_t, x21_t, &ldx21_t,
+ theta, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t, &ldv1t_t,
work, &lwork, rwork, &lrwork, iwork, &info );
if( info < 0 ) {
info = info - 1;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function zunmbr
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
return (info < 0) ? (info - 1) : info;
}
/* Allocate memory for temporary array(s) */
- a_t = (lapack_complex_double*)
- LAPACKE_malloc( sizeof(lapack_complex_double) *
- lda_t * MAX(1,MIN(nq,k)) );
+ if( LAPACKE_lsame( vect, 'q' ) ) {
+ a_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,k) );
+ } else {
+ a_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,nq) );
+ }
if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function zunmlq
* Author: Intel Corporation
-* Generated November 2015
+* Generated June 2016
*****************************************************************************/
#include "lapacke_utils.h"
{
lapack_int info = 0;
lapack_int r;
+ lapack_int lda_t, ldc_t;
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* c_t = NULL;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_zunmlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
r = LAPACKE_lsame( side, 'l' ) ? m : n;
- lapack_int lda_t = MAX(1,k);
- lapack_int ldc_t = MAX(1,m);
- lapack_complex_double* a_t = NULL;
- lapack_complex_double* c_t = NULL;
+ lda_t = MAX(1,k);
+ ldc_t = MAX(1,m);
/* Check leading dimension(s) */
if( lda < r ) {
info = -8;
return (info < 0) ? (info - 1) : info;
}
/* Allocate memory for temporary array(s) */
- a_t = (lapack_complex_double*)
- LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,m) );
+ if( LAPACKE_lsame( side, 'l' ) ) {
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,m) );
+ } else {
+ a_t = (lapack_complex_double*)
+ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+ }
if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
for( j = 0; j < n; j++ ) {
- for( i = MAX( ku-j, 0 ); i < MIN3( ldab, m+ku-j, kl+ku+1 );
+ for( i = MAX( ku-j, 0 ); i < MIN( m+ku-j, kl+ku+1 );
i++ ) {
if( LAPACK_CISNAN( ab[i+(size_t)j*ldab] ) )
return (lapack_logical) 1;
}
}
} else if ( matrix_layout == LAPACK_ROW_MAJOR ) {
- for( j = 0; j < MIN( n, ldab ); j++ ) {
+ for( j = 0; j < n; j++ ) {
for( i = MAX( ku-j, 0 ); i < MIN( m+ku-j, kl+ku+1 ); i++ ) {
if( LAPACK_CISNAN( ab[(size_t)i*ldab+j] ) )
return (lapack_logical) 1;
if( matrix_layout == LAPACK_COL_MAJOR ) {
for( j = 0; j < n; j++ ) {
- for( i = MAX( ku-j, 0 ); i < MIN3( ldab, m+ku-j, kl+ku+1 );
+ for( i = MAX( ku-j, 0 ); i < MIN( m+ku-j, kl+ku+1 );
i++ ) {
if( LAPACK_DISNAN( ab[i+(size_t)j*ldab] ) )
return (lapack_logical) 1;
}
}
} else if ( matrix_layout == LAPACK_ROW_MAJOR ) {
- for( j = 0; j < MIN( n, ldab ); j++ ) {
+ for( j = 0; j < n; j++ ) {
for( i = MAX( ku-j, 0 ); i < MIN( m+ku-j, kl+ku+1 ); i++ ) {
if( LAPACK_DISNAN( ab[(size_t)i*ldab+j] ) )
return (lapack_logical) 1;
if( matrix_layout == LAPACK_COL_MAJOR ) {
for( j = 0; j < n; j++ ) {
- for( i = MAX( ku-j, 0 ); i < MIN3( ldab, m+ku-j, kl+ku+1 );
+ for( i = MAX( ku-j, 0 ); i < MIN( m+ku-j, kl+ku+1 );
i++ ) {
if( LAPACK_SISNAN( ab[i+(size_t)j*ldab] ) )
return (lapack_logical) 1;
}
}
} else if ( matrix_layout == LAPACK_ROW_MAJOR ) {
- for( j = 0; j < MIN( n, ldab ); j++ ) {
+ for( j = 0; j < n; j++ ) {
for( i = MAX( ku-j, 0 ); i < MIN( m+ku-j, kl+ku+1 ); i++ ) {
if( LAPACK_SISNAN( ab[(size_t)i*ldab+j] ) )
return (lapack_logical) 1;
if( matrix_layout == LAPACK_COL_MAJOR ) {
for( j = 0; j < n; j++ ) {
- for( i = MAX( ku-j, 0 ); i < MIN3( ldab, m+ku-j, kl+ku+1 );
+ for( i = MAX( ku-j, 0 ); i < MIN( m+ku-j, kl+ku+1 );
i++ ) {
if( LAPACK_ZISNAN( ab[i+(size_t)j*ldab] ) )
return (lapack_logical) 1;
}
}
} else if ( matrix_layout == LAPACK_ROW_MAJOR ) {
- for( j = 0; j < MIN( n, ldab ); j++ ) {
+ for( j = 0; j < n; j++ ) {
for( i = MAX( ku-j, 0 ); i < MIN( m+ku-j, kl+ku+1 ); i++ ) {
if( LAPACK_ZISNAN( ab[(size_t)i*ldab+j] ) )
return (lapack_logical) 1;