当前位置: 首页>>代码示例>>C++>>正文


C++ LAPACKE_cge_nancheck函数代码示例

本文整理汇总了C++中LAPACKE_cge_nancheck函数的典型用法代码示例。如果您正苦于以下问题:C++ LAPACKE_cge_nancheck函数的具体用法?C++ LAPACKE_cge_nancheck怎么用?C++ LAPACKE_cge_nancheck使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了LAPACKE_cge_nancheck函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: LAPACKE_cgghrd

lapack_int LAPACKE_cgghrd( int matrix_layout, char compq, char compz,
                           lapack_int n, lapack_int ilo, lapack_int ihi,
                           lapack_complex_float* a, lapack_int lda,
                           lapack_complex_float* b, lapack_int ldb,
                           lapack_complex_float* q, lapack_int ldq,
                           lapack_complex_float* z, lapack_int ldz )
{
    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
        LAPACKE_xerbla( "LAPACKE_cgghrd", -1 );
        return -1;
    }
#ifndef LAPACK_DISABLE_NAN_CHECK
    /* Optionally check input matrices for NaNs */
    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
        return -7;
    }
    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
        return -9;
    }
    if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
        if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
            return -11;
        }
    }
    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
        if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
            return -13;
        }
    }
#endif
    return LAPACKE_cgghrd_work( matrix_layout, compq, compz, n, ilo, ihi, a, lda,
                                b, ldb, q, ldq, z, ldz );
}
开发者ID:OpenCMISS-Dependencies,项目名称:lapack,代码行数:33,代码来源:lapacke_cgghrd.c

示例2: LAPACKE_ctpmqrt

lapack_int LAPACKE_ctpmqrt( int matrix_layout, char side, char trans,
                            lapack_int m, lapack_int n, lapack_int k,
                            lapack_int l, lapack_int nb,
                            const lapack_complex_float* v, lapack_int ldv,
                            const lapack_complex_float* t, lapack_int ldt,
                            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 lwork;
    lapack_int info = 0;
    lapack_complex_float* work = NULL;
    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
        LAPACKE_xerbla( "LAPACKE_ctpmqrt", -1 );
        return -1;
    }
#ifndef LAPACK_DISABLE_NAN_CHECK
    if( LAPACKE_get_nancheck() ) {
        /* Optionally check input matrices for NaNs */
        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, nb, k, t, ldt ) ) {
            return -11;
        }
        if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
            return -9;
        }
    }
#endif
    /* Allocate memory for working array(s) */
    lwork = LAPACKE_lsame( side, 'L' ) ? MAX(1,nb) * MAX(1,n) :
                       ( LAPACKE_lsame( side, 'R' ) ? MAX(1,m) * MAX(1,nb) : 0 );
    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_ctpmqrt_work( matrix_layout, side, trans, m, n, k, l, nb, v,
                                 ldv, t, ldt, a, lda, b, ldb, work );
    /* Release memory and exit */
    LAPACKE_free( work );
exit_level_0:
    if( info == LAPACK_WORK_MEMORY_ERROR ) {
        LAPACKE_xerbla( "LAPACKE_ctpmqrt", info );
    }
    return info;
}
开发者ID:Reference-LAPACK,项目名称:lapack,代码行数:60,代码来源:lapacke_ctpmqrt.c

示例3: 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

示例4: LAPACKE_ctgevc

lapack_int LAPACKE_ctgevc( int matrix_layout, char side, char howmny,
                           const lapack_logical* select, lapack_int n,
                           const lapack_complex_float* s, lapack_int lds,
                           const lapack_complex_float* p, lapack_int ldp,
                           lapack_complex_float* vl, lapack_int ldvl,
                           lapack_complex_float* vr, lapack_int ldvr,
                           lapack_int mm, lapack_int* m )
{
    lapack_int info = 0;
    float* rwork = NULL;
    lapack_complex_float* work = NULL;
    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
        LAPACKE_xerbla( "LAPACKE_ctgevc", -1 );
        return -1;
    }
#ifndef LAPACK_DISABLE_NAN_CHECK
    /* Optionally check input matrices for NaNs */
    if( LAPACKE_cge_nancheck( matrix_layout, n, n, p, ldp ) ) {
        return -8;
    }
    if( LAPACKE_cge_nancheck( matrix_layout, n, n, s, lds ) ) {
        return -6;
    }
    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
        if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
            return -10;
        }
    }
    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
        if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
            return -12;
        }
    }
#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;
    }
    work = (lapack_complex_float*)
        LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
    if( work == NULL ) {
        info = LAPACK_WORK_MEMORY_ERROR;
        goto exit_level_1;
    }
    /* Call middle-level interface */
    info = LAPACKE_ctgevc_work( matrix_layout, side, howmny, select, n, s, lds,
                                p, ldp, vl, ldvl, vr, ldvr, mm, m, work,
                                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_ctgevc", info );
    }
    return info;
}
开发者ID:4ker,项目名称:OpenBLAS,代码行数:60,代码来源:lapacke_ctgevc.c

示例5: LAPACKE_cgbrfs

lapack_int LAPACKE_cgbrfs( int matrix_layout, char trans, lapack_int n,
                           lapack_int kl, lapack_int ku, lapack_int nrhs,
                           const lapack_complex_float* ab, lapack_int ldab,
                           const lapack_complex_float* afb, lapack_int ldafb,
                           const lapack_int* ipiv,
                           const lapack_complex_float* b, lapack_int ldb,
                           lapack_complex_float* x, lapack_int ldx, float* ferr,
                           float* berr )
{
    lapack_int info = 0;
    float* rwork = NULL;
    lapack_complex_float* work = NULL;
    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
        LAPACKE_xerbla( "LAPACKE_cgbrfs", -1 );
        return -1;
    }
#ifndef LAPACK_DISABLE_NAN_CHECK
    if( LAPACKE_get_nancheck() ) {
        /* Optionally check input matrices for NaNs */
        if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
            return -7;
        }
        if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
            return -9;
        }
        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
            return -12;
        }
        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
            return -14;
        }
    }
#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;
    }
    work = (lapack_complex_float*)
        LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
    if( work == NULL ) {
        info = LAPACK_WORK_MEMORY_ERROR;
        goto exit_level_1;
    }
    /* Call middle-level interface */
    info = LAPACKE_cgbrfs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
                                afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr,
                                work, 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_cgbrfs", info );
    }
    return info;
}
开发者ID:Reference-LAPACK,项目名称:lapack,代码行数:59,代码来源:lapacke_cgbrfs.c

示例6: 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

示例7: LAPACKE_chprfs

lapack_int LAPACKE_chprfs( int matrix_order, char uplo, lapack_int n,
                           lapack_int nrhs, const lapack_complex_float* ap,
                           const lapack_complex_float* afp,
                           const lapack_int* ipiv,
                           const lapack_complex_float* b, lapack_int ldb,
                           lapack_complex_float* x, lapack_int ldx, float* ferr,
                           float* berr )
{
    lapack_int info = 0;
    float* rwork = NULL;
    lapack_complex_float* work = NULL;
    if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
        LAPACKE_xerbla( "LAPACKE_chprfs", -1 );
        return -1;
    }
#ifndef LAPACK_DISABLE_NAN_CHECK
    /* Optionally check input matrices for NaNs */
    if( LAPACKE_chp_nancheck( n, afp ) ) {
        return -6;
    }
    if( LAPACKE_chp_nancheck( n, ap ) ) {
        return -5;
    }
    if( LAPACKE_cge_nancheck( matrix_order, n, nrhs, b, ldb ) ) {
        return -8;
    }
    if( LAPACKE_cge_nancheck( matrix_order, n, nrhs, x, ldx ) ) {
        return -10;
    }
#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;
    }
    work = (lapack_complex_float*)
        LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,2*n) );
    if( work == NULL ) {
        info = LAPACK_WORK_MEMORY_ERROR;
        goto exit_level_1;
    }
    /* Call middle-level interface */
    info = LAPACKE_chprfs_work( matrix_order, uplo, n, nrhs, ap, afp, ipiv, b,
                                ldb, x, ldx, ferr, berr, work, 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_chprfs", info );
    }
    return info;
}
开发者ID:BOHICAMAN,项目名称:OpenBLAS,代码行数:55,代码来源:lapacke_chprfs.c

示例8: LAPACKE_cbdsqr

lapack_int LAPACKE_cbdsqr( int matrix_order, char uplo, lapack_int n,
                           lapack_int ncvt, lapack_int nru, lapack_int ncc,
                           float* d, float* e, lapack_complex_float* vt,
                           lapack_int ldvt, lapack_complex_float* u,
                           lapack_int ldu, lapack_complex_float* c,
                           lapack_int ldc )
{
    lapack_int info = 0;
    float* work = NULL;
    if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
        LAPACKE_xerbla( "LAPACKE_cbdsqr", -1 );
        return -1;
    }
#ifndef LAPACK_DISABLE_NAN_CHECK
    /* Optionally check input matrices for NaNs */
    if( ncc != 0 ) {
        if( LAPACKE_cge_nancheck( matrix_order, n, ncc, c, ldc ) ) {
            return -13;
        }
    }
    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
        return -7;
    }
    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
        return -8;
    }
    if( nru != 0 ) {
        if( LAPACKE_cge_nancheck( matrix_order, nru, n, u, ldu ) ) {
            return -11;
        }
    }
    if( ncvt != 0 ) {
        if( LAPACKE_cge_nancheck( matrix_order, n, ncvt, vt, ldvt ) ) {
            return -9;
        }
    }
#endif
    /* Allocate memory for working array(s) */
    work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
    if( work == NULL ) {
        info = LAPACK_WORK_MEMORY_ERROR;
        goto exit_level_0;
    }
    /* Call middle-level interface */
    info = LAPACKE_cbdsqr_work( matrix_order, uplo, n, ncvt, nru, ncc, d, e, vt,
                                ldvt, u, ldu, c, ldc, work );
    /* Release memory and exit */
    LAPACKE_free( work );
exit_level_0:
    if( info == LAPACK_WORK_MEMORY_ERROR ) {
        LAPACKE_xerbla( "LAPACKE_cbdsqr", info );
    }
    return info;
}
开发者ID:checco74,项目名称:uquantchem,代码行数:54,代码来源:lapacke_cbdsqr.c

示例9: 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

示例10: 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

示例11: LAPACKE_cggbal

lapack_int LAPACKE_cggbal( int matrix_layout, char job, lapack_int n,
                           lapack_complex_float* a, lapack_int lda,
                           lapack_complex_float* b, lapack_int ldb,
                           lapack_int* ilo, lapack_int* ihi, float* lscale,
                           float* rscale )
{
    lapack_int info = 0;
    /* Additional scalars declarations for work arrays */
    lapack_int lwork;
    float* work = NULL;
    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
        LAPACKE_xerbla( "LAPACKE_cggbal", -1 );
        return -1;
    }
#ifndef LAPACK_DISABLE_NAN_CHECK
    /* Optionally check input matrices for NaNs */
    if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
        LAPACKE_lsame( job, 'b' ) ) {
        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
            return -4;
        }
    }
    if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
        LAPACKE_lsame( job, 'b' ) ) {
        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
            return -6;
        }
    }
#endif
    /* Additional scalars initializations for work arrays */
    if( LAPACKE_lsame( job, 's' ) || LAPACKE_lsame( job, 'b' ) ) {
        lwork = MAX(1,6*n);
    } else {
        lwork = 1;
    }
    /* Allocate memory for working array(s) */
    work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
    if( work == NULL ) {
        info = LAPACK_WORK_MEMORY_ERROR;
        goto exit_level_0;
    }
    /* Call middle-level interface */
    info = LAPACKE_cggbal_work( matrix_layout, job, n, a, lda, b, ldb, ilo, ihi,
                                lscale, rscale, work );
    /* Release memory and exit */
    LAPACKE_free( work );
exit_level_0:
    if( info == LAPACK_WORK_MEMORY_ERROR ) {
        LAPACKE_xerbla( "LAPACKE_cggbal", info );
    }
    return info;
}
开发者ID:OpenCMISS-Dependencies,项目名称:lapack,代码行数:52,代码来源:lapacke_cggbal.c

示例12: LAPACKE_cggsvd

lapack_int LAPACKE_cggsvd( int matrix_order, char jobu, char jobv, char jobq,
                           lapack_int m, lapack_int n, lapack_int p,
                           lapack_int* k, lapack_int* l,
                           lapack_complex_float* a, lapack_int lda,
                           lapack_complex_float* b, lapack_int ldb,
                           float* alpha, float* beta, lapack_complex_float* u,
                           lapack_int ldu, lapack_complex_float* v,
                           lapack_int ldv, lapack_complex_float* q,
                           lapack_int ldq, lapack_int* iwork )
{
    lapack_int info = 0;
    float* rwork = NULL;
    lapack_complex_float* work = NULL;
    if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
        LAPACKE_xerbla( "LAPACKE_cggsvd", -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 -10;
    }
    if( LAPACKE_cge_nancheck( matrix_order, p, n, b, ldb ) ) {
        return -12;
    }
#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;
    }
    work = (lapack_complex_float*)
        LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,MAX3(3*n,m,p)+n) );
    if( work == NULL ) {
        info = LAPACK_WORK_MEMORY_ERROR;
        goto exit_level_1;
    }
    /* Call middle-level interface */
    info = LAPACKE_cggsvd_work( matrix_order, jobu, jobv, jobq, m, n, p, k, l,
                                a, lda, b, ldb, alpha, beta, u, ldu, v, ldv, q,
                                ldq, work, rwork, iwork );
    /* 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_cggsvd", info );
    }
    return info;
}
开发者ID:BOHICAMAN,项目名称:OpenBLAS,代码行数:52,代码来源:lapacke_cggsvd.c

示例13: 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

示例14: LAPACKE_ctprfb

lapack_int LAPACKE_ctprfb( int matrix_order, char side, char trans, char direct,
                           char storev, lapack_int m, lapack_int n,
                           lapack_int k, lapack_int l,
                           const lapack_complex_float* v, lapack_int ldv,
                           const lapack_complex_float* t, lapack_int ldt,
                           lapack_complex_float* a, lapack_int lda,
                           lapack_complex_float* b, lapack_int ldb,
                           lapack_int myldwork )
{
    lapack_int info = 0;
    float* mywork = NULL;
    if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
        LAPACKE_xerbla( "LAPACKE_ctprfb", -1 );
        return -1;
    }
#ifndef LAPACK_DISABLE_NAN_CHECK
    /* Optionally check input matrices for NaNs */
    if( LAPACKE_cge_nancheck( matrix_order, k, m, a, lda ) ) {
        return -14;
    }
    if( LAPACKE_cge_nancheck( matrix_order, m, n, b, ldb ) ) {
        return -16;
    }
    if( LAPACKE_cge_nancheck( matrix_order, ldt, k, t, ldt ) ) {
        return -12;
    }
    if( LAPACKE_cge_nancheck( matrix_order, ldv, k, v, ldv ) ) {
        return -10;
    }
#endif
    /* Allocate memory for working array(s) */
    mywork = (float*)
        LAPACKE_malloc( sizeof(float) * MAX(1,myldwork) * MAX(1,k) );
    if( mywork == NULL ) {
        info = LAPACK_WORK_MEMORY_ERROR;
        goto exit_level_0;
    }
    /* Call middle-level interface */
    info = LAPACKE_ctprfb_work( matrix_order, side, trans, direct, storev, m, n,
                                k, l, v, ldv, t, ldt, a, lda, b, ldb, mywork,
                                myldwork );
    /* Release memory and exit */
    LAPACKE_free( mywork );
exit_level_0:
    if( info == LAPACK_WORK_MEMORY_ERROR ) {
        LAPACKE_xerbla( "LAPACKE_ctprfb", info );
    }
    return info;
}
开发者ID:LuaDist,项目名称:lapack,代码行数:49,代码来源:lapacke_ctprfb.c

示例15: 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


注:本文中的LAPACKE_cge_nancheck函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。