本文整理汇总了C++中LAPACK_C2INT函数的典型用法代码示例。如果您正苦于以下问题:C++ LAPACK_C2INT函数的具体用法?C++ LAPACK_C2INT怎么用?C++ LAPACK_C2INT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LAPACK_C2INT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: LAPACKE_cgelss
lapack_int LAPACKE_cgelss( int matrix_order, lapack_int m, lapack_int n,
lapack_int nrhs, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* b,
lapack_int ldb, float* s, float rcond,
lapack_int* rank )
{
lapack_int info = 0;
lapack_int lwork = -1;
float* rwork = NULL;
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgelss", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_order, m, n, a, lda ) ) {
return -5;
}
if( LAPACKE_cge_nancheck( matrix_order, MAX(m,n), nrhs, b, ldb ) ) {
return -7;
}
if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
return -10;
}
#endif
/* Allocate memory for working array(s) */
rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,5*MIN(m,n)) );
if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
/* Query optimal working array(s) size */
info = LAPACKE_cgelss_work( matrix_order, m, n, nrhs, a, lda, b, ldb, s,
rcond, rank, &work_query, lwork, rwork );
if( info != 0 ) {
goto exit_level_1;
}
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgelss_work( matrix_order, m, n, nrhs, a, lda, b, ldb, s,
rcond, rank, work, lwork, rwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgelss", info );
}
return info;
}
开发者ID:BOHICAMAN,项目名称:OpenBLAS,代码行数:60,代码来源:lapacke_cgelss.c
示例2: LAPACKE_cgeevx
lapack_int LAPACKE_cgeevx( int matrix_order, char balanc, char jobvl,
char jobvr, char sense, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* w, lapack_complex_float* vl,
lapack_int ldvl, lapack_complex_float* vr,
lapack_int ldvr, lapack_int* ilo, lapack_int* ihi,
float* scale, float* abnrm, float* rconde,
float* rcondv )
{
lapack_int info = 0;
lapack_int lwork = -1;
float* rwork = NULL;
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgeevx", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_order, n, n, a, lda ) ) {
return -7;
}
#endif
/* Allocate memory for working array(s) */
rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
/* Query optimal working array(s) size */
info = LAPACKE_cgeevx_work( matrix_order, balanc, jobvl, jobvr, sense, n, a,
lda, w, vl, ldvl, vr, ldvr, ilo, ihi, scale,
abnrm, rconde, rcondv, &work_query, lwork,
rwork );
if( info != 0 ) {
goto exit_level_1;
}
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgeevx_work( matrix_order, balanc, jobvl, jobvr, sense, n, a,
lda, w, vl, ldvl, vr, ldvr, ilo, ihi, scale,
abnrm, rconde, rcondv, work, lwork, rwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgeevx", info );
}
return info;
}
开发者ID:BOHICAMAN,项目名称:OpenBLAS,代码行数:60,代码来源:lapacke_cgeevx.c
示例3: LAPACKE_cgesvd
lapack_int LAPACKE_cgesvd( int matrix_order, char jobu, char jobvt,
lapack_int m, lapack_int n, lapack_complex_float* a,
lapack_int lda, float* s, lapack_complex_float* u,
lapack_int ldu, lapack_complex_float* vt,
lapack_int ldvt, float* superb )
{
lapack_int info = 0;
lapack_int lwork = -1;
float* rwork = NULL;
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
lapack_int i;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgesvd", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_order, m, n, a, lda ) ) {
return -6;
}
#endif
/* Allocate memory for working array(s) */
rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,5*MIN(m,n)) );
if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
/* Query optimal working array(s) size */
info = LAPACKE_cgesvd_work( matrix_order, jobu, jobvt, m, n, a, lda, s, u,
ldu, vt, ldvt, &work_query, lwork, rwork );
if( info != 0 ) {
goto exit_level_1;
}
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_cgesvd_work( matrix_order, jobu, jobvt, m, n, a, lda, s, u,
ldu, vt, ldvt, work, lwork, rwork );
/* Backup significant data from working array(s) */
for( i=0; i<MIN(m,n)-1; i++ ) {
superb[i] = rwork[i];
}
/* Release memory and exit */
LAPACKE_free( work );
exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgesvd", info );
}
return info;
}
开发者ID:checco74,项目名称:uquantchem,代码行数:59,代码来源:lapacke_cgesvd.c
示例4: LAPACKE_chegv
lapack_int LAPACKE_chegv( int matrix_layout, lapack_int itype, char jobz,
char uplo, lapack_int n, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* b,
lapack_int ldb, float* w )
{
lapack_int info = 0;
lapack_int lwork = -1;
float* rwork = NULL;
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_chegv", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
return -6;
}
if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
return -8;
}
}
#endif
/* Allocate memory for working array(s) */
rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,3*n-2) );
if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
/* Query optimal working array(s) size */
info = LAPACKE_chegv_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
ldb, w, &work_query, lwork, rwork );
if( info != 0 ) {
goto exit_level_1;
}
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_chegv_work( matrix_layout, itype, jobz, uplo, n, a, lda, b,
ldb, w, work, lwork, rwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_chegv", info );
}
return info;
}
开发者ID:Reference-LAPACK,项目名称:lapack,代码行数:58,代码来源:lapacke_chegv.c
示例5: LAPACKE_cgglse
lapack_int LAPACKE_cgglse( int matrix_order, lapack_int m, lapack_int n,
lapack_int p, lapack_complex_float* a,
lapack_int lda, lapack_complex_float* b,
lapack_int ldb, lapack_complex_float* c,
lapack_complex_float* d, lapack_complex_float* x )
{
lapack_int info = 0;
lapack_int lwork = -1;
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgglse", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_order, m, n, a, lda ) ) {
return -5;
}
if( LAPACKE_cge_nancheck( matrix_order, p, n, b, ldb ) ) {
return -7;
}
if( LAPACKE_c_nancheck( m, c, 1 ) ) {
return -9;
}
if( LAPACKE_c_nancheck( p, d, 1 ) ) {
return -10;
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cgglse_work( matrix_order, m, n, p, a, lda, b, ldb, c, d, x,
&work_query, lwork );
if( info != 0 ) {
goto exit_level_0;
}
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cgglse_work( matrix_order, m, n, p, a, lda, b, ldb, c, d, x,
work, lwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgglse", info );
}
return info;
}
开发者ID:checco74,项目名称:uquantchem,代码行数:54,代码来源:lapacke_cgglse.c
示例6: LAPACKE_cunmqr
lapack_int LAPACKE_cunmqr( int matrix_layout, char side, char trans,
lapack_int m, lapack_int n, lapack_int k,
const lapack_complex_float* a, lapack_int lda,
const lapack_complex_float* tau,
lapack_complex_float* c, lapack_int ldc )
{
lapack_int info = 0;
lapack_int lwork = -1;
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
lapack_int r;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cunmqr", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
r = LAPACKE_lsame( side, 'l' ) ? m : n;
if( LAPACKE_cge_nancheck( matrix_layout, r, k, a, lda ) ) {
return -7;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
return -10;
}
if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
return -9;
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cunmqr_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
c, ldc, &work_query, lwork );
if( info != 0 ) {
goto exit_level_0;
}
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cunmqr_work( matrix_layout, side, trans, m, n, k, a, lda, tau,
c, ldc, work, lwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cunmqr", info );
}
return info;
}
开发者ID:4ker,项目名称:OpenBLAS,代码行数:53,代码来源:lapacke_cunmqr.c
示例7: LAPACKE_chseqr
lapack_int LAPACKE_chseqr( int matrix_order, char job, char compz, lapack_int n,
lapack_int ilo, lapack_int ihi,
lapack_complex_float* h, lapack_int ldh,
lapack_complex_float* w, lapack_complex_float* z,
lapack_int ldz )
{
lapack_int info = 0;
lapack_int lwork = -1;
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_chseqr", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_order, n, n, h, ldh ) ) {
return -7;
}
if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
if( LAPACKE_cge_nancheck( matrix_order, n, n, z, ldz ) ) {
return -10;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_chseqr_work( matrix_order, job, compz, n, ilo, ihi, h, ldh,
w, z, ldz, &work_query, lwork );
if( info != 0 ) {
goto exit_level_0;
}
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_chseqr_work( matrix_order, job, compz, n, ilo, ihi, h, ldh,
w, z, ldz, work, lwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_chseqr", info );
}
return info;
}
开发者ID:BOHICAMAN,项目名称:OpenBLAS,代码行数:50,代码来源:lapacke_chseqr.c
示例8: LAPACKE_cgeqr
lapack_int LAPACKE_cgeqr( int matrix_layout, lapack_int m, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* t, lapack_int tsize )
{
lapack_int info = 0;
lapack_int lwork = -1;
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgeqr", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
return -4;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cgeqr_work( matrix_layout, m, n, a, lda, t, tsize, &work_query,
lwork );
if( info != 0 ) {
goto exit_level_0;
}
if( tsize == -1 || tsize == -2 ) {
goto exit_level_0;
}
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_cgeqr_work( matrix_layout, m, n, a, lda, t, tsize, work, lwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgeqr", info );
}
return info;
}
开发者ID:Reference-LAPACK,项目名称:lapack,代码行数:47,代码来源:lapacke_cgeqr.c
示例9: LAPACKE_csysv_rook
lapack_int LAPACKE_csysv_rook( int matrix_layout, char uplo, lapack_int n,
lapack_int nrhs, lapack_complex_float* a,
lapack_int lda, lapack_int* ipiv,
lapack_complex_float* b, lapack_int ldb )
{
lapack_int info = 0;
lapack_int lwork = -1;
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_csysv_rook", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -5;
}
if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
return -8;
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_csysv_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv,
b, ldb, &work_query, lwork );
if( info != 0 ) {
goto exit_level_0;
}
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
/* Call middle-level interface */
info = LAPACKE_csysv_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv,
b, ldb, work, lwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_csysv_rook", info );
}
return info;
}
开发者ID:4ker,项目名称:OpenBLAS,代码行数:47,代码来源:lapacke_csysv_rook.c
示例10: LAPACKE_cuncsd
lapack_int LAPACKE_cuncsd( int matrix_order, char jobu1, char jobu2,
char jobv1t, char jobv2t, char trans, char signs,
lapack_int m, lapack_int p, lapack_int q,
lapack_complex_float* x11, lapack_int ldx11,
lapack_complex_float* x12, lapack_int ldx12,
lapack_complex_float* x21, lapack_int ldx21,
lapack_complex_float* x22, lapack_int ldx22,
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* v2t,
lapack_int ldv2t )
{
lapack_int info = 0;
lapack_int lrwork = -1;
lapack_int lwork = -1;
lapack_int* iwork = NULL;
float* rwork = NULL;
lapack_complex_float* work = NULL;
float rwork_query;
lapack_complex_float work_query;
lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cuncsd", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
if( LAPACKE_cge_nancheck( matrix_order, nrows_x11, q, x11, ldx11 ) ) {
return -11;
}
if( LAPACKE_cge_nancheck( matrix_order, nrows_x12, m-q, x12, ldx12 ) ) {
return -13;
}
if( LAPACKE_cge_nancheck( matrix_order, nrows_x21, q, x21, ldx21 ) ) {
return -15;
}
if( LAPACKE_cge_nancheck( matrix_order, nrows_x22, m-q, x22, ldx22 ) ) {
return -17;
}
#endif
/* Allocate memory for working array(s) */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m-q) );
if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
/* Query optimal working array(s) size */
info = LAPACKE_cuncsd_work( matrix_order, jobu1, jobu2, jobv1t, jobv2t,
trans, signs, m, p, q, x11, ldx11, x12, ldx12,
x21, ldx21, x22, ldx22, theta, u1, ldu1, u2,
ldu2, v1t, ldv1t, v2t, ldv2t, &work_query,
lwork, &rwork_query, lrwork, iwork );
if( info != 0 ) {
goto exit_level_1;
}
lrwork = (lapack_int)rwork_query;
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_2;
}
/* Call middle-level interface */
info = LAPACKE_cuncsd_work( matrix_order, jobu1, jobu2, jobv1t, jobv2t,
trans, signs, m, p, q, x11, ldx11, x12, ldx12,
x21, ldx21, x22, ldx22, theta, u1, ldu1, u2,
ldu2, v1t, ldv1t, v2t, ldv2t, work, lwork,
rwork, lrwork, iwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_2:
LAPACKE_free( rwork );
exit_level_1:
LAPACKE_free( iwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cuncsd", info );
}
return info;
}
开发者ID:BOHICAMAN,项目名称:OpenBLAS,代码行数:92,代码来源:lapacke_cuncsd.c
示例11: LAPACKE_ctgsyl
lapack_int LAPACKE_ctgsyl( int matrix_order, char trans, lapack_int ijob,
lapack_int m, lapack_int n,
const lapack_complex_float* a, lapack_int lda,
const lapack_complex_float* b, lapack_int ldb,
lapack_complex_float* c, lapack_int ldc,
const lapack_complex_float* d, lapack_int ldd,
const lapack_complex_float* e, lapack_int lde,
lapack_complex_float* f, lapack_int ldf,
float* scale, float* dif )
{
lapack_int info = 0;
lapack_int lwork = -1;
lapack_int* iwork = NULL;
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_ctgsyl", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_order, m, m, a, lda ) ) {
return -6;
}
if( LAPACKE_cge_nancheck( matrix_order, n, n, b, ldb ) ) {
return -8;
}
if( LAPACKE_cge_nancheck( matrix_order, m, n, c, ldc ) ) {
return -10;
}
if( LAPACKE_cge_nancheck( matrix_order, m, m, d, ldd ) ) {
return -12;
}
if( LAPACKE_cge_nancheck( matrix_order, n, n, e, lde ) ) {
return -14;
}
if( LAPACKE_cge_nancheck( matrix_order, m, n, f, ldf ) ) {
return -16;
}
#endif
/* Allocate memory for working array(s) */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m+n+2) );
if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
/* Query optimal working array(s) size */
info = LAPACKE_ctgsyl_work( matrix_order, trans, ijob, m, n, a, lda, b, ldb,
c, ldc, d, ldd, e, lde, f, ldf, scale, dif,
&work_query, lwork, iwork );
if( info != 0 ) {
goto exit_level_1;
}
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_ctgsyl_work( matrix_order, trans, ijob, m, n, a, lda, b, ldb,
c, ldc, d, ldd, e, lde, f, ldf, scale, dif,
work, lwork, iwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_1:
LAPACKE_free( iwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_ctgsyl", info );
}
return info;
}
开发者ID:checco74,项目名称:uquantchem,代码行数:75,代码来源:lapacke_ctgsyl.c
示例12: LAPACKE_ctgsna
lapack_int LAPACKE_ctgsna( int matrix_layout, char job, char howmny,
const lapack_logical* select, lapack_int n,
const lapack_complex_float* a, lapack_int lda,
const lapack_complex_float* b, lapack_int ldb,
const lapack_complex_float* vl, lapack_int ldvl,
const lapack_complex_float* vr, lapack_int ldvr,
float* s, float* dif, lapack_int mm, lapack_int* m )
{
lapack_int info = 0;
lapack_int lwork = -1;
lapack_int* iwork = NULL;
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_ctgsna", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
return -6;
}
if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
return -8;
}
if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
return -10;
}
}
if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
return -12;
}
}
}
#endif
/* Allocate memory for working array(s) */
if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,n+2) );
if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
}
/* Query optimal working array(s) size */
info = LAPACKE_ctgsna_work( matrix_layout, job, howmny, select, n, a, lda, b,
ldb, vl, ldvl, vr, ldvr, s, dif, mm, m,
&work_query, lwork, iwork );
if( info != 0 ) {
goto exit_level_1;
}
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
}
/* Call middle-level interface */
info = LAPACKE_ctgsna_work( matrix_layout, job, howmny, select, n, a, lda, b,
ldb, vl, ldvl, vr, ldvr, s, dif, mm, m, work,
lwork, iwork );
/* Release memory and exit */
if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
LAPACKE_free( work );
}
exit_level_1:
if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'v' ) ) {
LAPACKE_free( iwork );
}
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_ctgsna", info );
}
return info;
}
开发者ID:Reference-LAPACK,项目名称:lapack,代码行数:81,代码来源:lapacke_ctgsna.c
示例13: LAPACKE_cgesdd
lapack_int LAPACKE_cgesdd( int matrix_order, char jobz, lapack_int m,
lapack_int n, lapack_complex_float* a,
lapack_int lda, float* s, lapack_complex_float* u,
lapack_int ldu, lapack_complex_float* vt,
lapack_int ldvt )
{
lapack_int info = 0;
lapack_int lwork = -1;
/* Additional scalars declarations for work arrays */
size_t lrwork;
lapack_int* iwork = NULL;
float* rwork = NULL;
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cgesdd", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_order, m, n, a, lda ) ) {
return -5;
}
#endif
/* Additional scalars initializations for work arrays */
if( LAPACKE_lsame( jobz, 'n' ) ) {
lrwork = MAX(1,5*MIN(m,n));
} else {
lrwork = (size_t)5*MAX(1,MIN(m,n))*MAX(1,MIN(m,n))+7*MIN(m,n);
}
/* Allocate memory for working array(s) */
iwork = (lapack_int*)
LAPACKE_malloc( sizeof(lapack_int) * MAX(1,8*MIN(m,n)) );
if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
/* Query optimal working array(s) size */
info = LAPACKE_cgesdd_work( matrix_order, jobz, m, n, a, lda, s, u, ldu, vt,
ldvt, &work_query, lwork, rwork, iwork );
if( info != 0 ) {
goto exit_level_2;
}
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_2;
}
/* Call middle-level interface */
info = LAPACKE_cgesdd_work( matrix_order, jobz, m, n, a, lda, s, u, ldu, vt,
ldvt, work, lwork, rwork, iwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_2:
LAPACKE_free( rwork );
exit_level_1:
LAPACKE_free( iwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cgesdd", info );
}
return info;
}
开发者ID:checco74,项目名称:uquantchem,代码行数:71,代码来源:lapacke_cgesdd.c
示例14: LAPACKE_cstedc
lapack_int LAPACKE_cstedc( int matrix_order, char compz, lapack_int n, float* d,
float* e, lapack_complex_float* z, lapack_int ldz )
{
lapack_int info = 0;
lapack_int liwork = -1;
lapack_int lrwork = -1;
lapack_int lwork = -1;
lapack_int* iwork = NULL;
float* rwork = NULL;
lapack_complex_float* work = NULL;
lapack_int iwork_query;
float rwork_query;
lapack_complex_float work_query;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_cstedc", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
if( LAPACKE_s_nancheck( n, d, 1 ) ) {
return -4;
}
if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
return -5;
}
if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
if( LAPACKE_cge_nancheck( matrix_order, n, n, z, ldz ) ) {
return -6;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_cstedc_work( matrix_order, compz, n, d, e, z, ldz,
&work_query, lwork, &rwork_query, lrwork,
&iwork_query, liwork );
if( info != 0 ) {
goto exit_level_0;
}
liwork = (lapack_int)iwork_query;
lrwork = (lapack_int)rwork_query;
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork );
if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_2;
}
/* Call middle-level interface */
info = LAPACKE_cstedc_work( matrix_order, compz, n, d, e, z, ldz, work,
lwork, rwork, lrwork, iwork, liwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_2:
LAPACKE_free( rwork );
exit_level_1:
LAPACKE_free( iwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_cstedc", info );
}
return info;
}
开发者ID:checco74,项目名称:uquantchem,代码行数:73,代码来源:lapacke_cstedc.c
示例15: LAPACKE_chesvx
lapack_int LAPACKE_chesvx( int matrix_order, char fact, char uplo, lapack_int n,
lapack_int nrhs, const lapack_complex_float* a,
lapack_int lda, lapack_complex_float* af,
lapack_int ldaf, lapack_int* ipiv,
const lapack_complex_float* b, lapack_int ldb,
lapack_complex_float* x, lapack_int ldx,
float* rcond, float* ferr, float* berr )
{
lapack_int info = 0;
lapack_int lwork = -1;
float* rwork = NULL;
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_chesvx", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
if( LAPACKE_che_nancheck( matrix_order, uplo, n, a, lda ) ) {
return -6;
}
if( LAPACKE_lsame( fact, 'f' ) ) {
if( LAPACKE_che_nancheck( matrix_order, uplo, n, af, ldaf ) ) {
return -8;
}
}
if( LAPACKE_cge_nancheck( matrix_order, n, nrhs, b, ldb ) ) {
return -11;
}
#endif
/* Allocate memory for working array(s) */
rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
/* Query optimal working array(s) size */
info = LAPACKE_chesvx_work( matrix_order, fact, uplo, n, nrhs, a, lda, af,
ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
&work_query, lwork, rwork );
if( info != 0 ) {
goto exit_level_1;
}
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_chesvx_work( matrix_order, fact, uplo, n, nrhs, a, lda, af,
ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr,
work, lwork, rwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_1:
LAPACKE_free( rwork );
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_chesvx", info );
}
return info;
}
开发者ID:BOHICAMAN,项目名称:OpenBLAS,代码行数:66,代码来源:lapacke_chesvx.c
示例16: LAPACKE_ctgsen
lapack_int LAPACKE_ctgsen( int matrix_order, lapack_int ijob,
lapack_logical wantq, lapack_logical wantz,
const lapack_logical* select, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* b, lapack_int ldb,
lapack_complex_float* alpha,
lapack_complex_float* beta, lapack_complex_float* q,
lapack_int ldq, lapack_complex_float* z,
lapack_int ldz, lapack_int* m, float* pl, float* pr,
float* dif )
{
lapack_int info = 0;
lapack_int liwork = -1;
lapack_int lwork = -1;
lapack_int* iwork = NULL;
lapack_complex_float* work = NULL;
lapack_int iwork_query;
lapack_complex_float work_query;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_ctgsen", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
if( LAPACKE_cge_nancheck( matrix_order, n, n, a, lda ) ) {
return -7;
}
if( LAPACKE_cge_nancheck( matrix_order, n, n, b, ldb ) ) {
return -9;
}
if( wantq ) {
if( LAPACKE_cge_nancheck( matrix_order, n, n, q, ldq ) ) {
return -13;
}
}
if( wantz ) {
if( LAPACKE_cge_nancheck( matrix_order, n, n, z, ldz ) ) {
return -15;
}
}
#endif
/* Query optimal working array(s) size */
info = LAPACKE_ctgsen_work( matrix_order, ijob, wantq, wantz, select, n, a,
lda, b, ldb, alpha, beta, q, ldq, z, ldz, m, pl,
pr, dif, &work_query, lwork, &iwork_query,
liwork );
if( info != 0 ) {
goto exit_level_0;
}
liwork = (lapack_int)iwork_query;
lwork = LAPACK_C2INT( work_query );
/* Allocate memory for work arrays */
if( ijob != 0 ) {
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork );
if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
}
work = (lapack_complex_float*)
LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
/* Call middle-level interface */
info = LAPACKE_ctgsen_work( matrix_order, ijob, wantq, wantz, select, n, a,
lda, b, ldb, alpha, beta, q, ldq, z, ldz, m, pl,
pr, dif, work, lwork, iwork, liwork );
/* Release memory and exit */
LAPACKE_free( work );
exit_level_1:
if( ijob != 0 ) {
LAPACKE_free( iwork );
}
exit_level_0:
if( info == LAPACK_WORK_MEMORY_ERROR ) {
LAPACKE_xerbla( "LAPACKE_ctgsen", info );
}
return info;
}
开发者ID:Bres-Tech,项目名称:libswiftnav,代码行数:81,代码来源:lapacke_ctgsen.c
示例17: LAPACKE_chegvx
lapack_int LAPACKE_chegvx( int matrix_order, lapack_int itype, char jobz,
char range, char uplo, lapack_int n,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* b, lapack_int ldb, float vl,
float vu, lapack_int il, lapack_int iu, float abstol,
lapack_int* m, float* w, lapack_complex_float* z,
lapack_int ldz, lapack_int* ifail )
{
lapack_int info = 0;
lapack_int lwork = -1;
lapack_int* iwork = NULL;
float* rwork = NULL;
lapack_complex_float* work = NULL;
lapack_complex_float work_query;
if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
LAPACKE_xerbla( "LAPACKE_chegvx", -1 );
return -1;
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
if( LAPACKE_che_nancheck( matrix_order, uplo, n, a, lda ) ) {
return -7;
}
if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
return -15;
}
if( LAPACKE_cge_nancheck( matrix_order, n, n, b, ldb ) ) {
return -9;
}
if( LAPACKE_lsame( range, 'v' ) ) {
if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
return -11;
}
}
if( LAPACKE_lsame( range, 'v' ) ) {
if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
return -12;
}
}
#endif
/* Allocate memory for working array(s) */
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,7*n) );
if( rwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_1;
}
/* Query optimal working
|
请发表评论