Beispiel #1
0
lapack_int LAPACKE_claset( int matrix_layout, char uplo, lapack_int m,
                           lapack_int n, lapack_complex_float alpha,
                           lapack_complex_float beta, lapack_complex_float* a,
                           lapack_int lda )
{

    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
        LAPACKE_xerbla( "LAPACKE_claset", -1 );
        return -1;
    }

/*****************************************************************************
*  Note: we do not check NaNs in A since the goal of this subroutine is to
*  initialized A. It is OK if A has NaNs in input.
*****************************************************************************/

#ifndef LAPACK_DISABLE_NAN_CHECK
    /* Optionally check input matrices for NaNs */
    if( LAPACKE_c_nancheck( 1, &alpha, 1 ) ) {
        return -5;
    }
    if( LAPACKE_c_nancheck( 1, &beta, 1 ) ) {
        return -6;
    }
#endif

    return LAPACKE_claset_work( matrix_layout, uplo, m, n, alpha, beta, a, lda );
}
Beispiel #2
0
lapack_int LAPACKE_claset( int matrix_order, char uplo, lapack_int m,
                           lapack_int n, lapack_complex_float alpha,
                           lapack_complex_float beta, lapack_complex_float* a,
                           lapack_int lda )
{
    if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
        LAPACKE_xerbla( "LAPACKE_claset", -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 -7;
    }
    if( LAPACKE_c_nancheck( 1, &alpha, 1 ) ) {
        return -5;
    }
    if( LAPACKE_c_nancheck( 1, &beta, 1 ) ) {
        return -6;
    }
#endif
    return LAPACKE_claset_work( matrix_order, uplo, m, n, alpha, beta, a, lda );
}