|
libflame
12600
|
Go to the source code of this file.
| FLA_Error FLA_Accum_T_UT | ( | FLA_Direct | direct, |
| FLA_Store | storev, | ||
| FLA_Obj | A, | ||
| FLA_Obj | tau, | ||
| FLA_Obj | T | ||
| ) |
References FLA_Accum_T_UT_check(), FLA_Accum_T_UT_internal(), and FLA_Check_error_level().
{
FLA_Error r_val;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Accum_T_UT_check( direct, storev, A, tau, T );
// Invoke FLA_Accum_T_UT_internal().
r_val = FLA_Accum_T_UT_internal( direct, storev, A, tau, T );
return r_val;
}
| FLA_Error FLA_Accum_T_UT_check | ( | FLA_Direct | direct, |
| FLA_Store | storev, | ||
| FLA_Obj | A, | ||
| FLA_Obj | tau, | ||
| FLA_Obj | T | ||
| ) |
References FLA_Check_col_vector(), FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_valid_direct(), FLA_Check_valid_storev(), FLA_Check_vector_dim(), and FLA_Obj_min_dim().
Referenced by FLA_Accum_T_UT().
{
FLA_Error e_val;
e_val = FLA_Check_valid_direct( direct );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_storev( storev );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_consistent_object_datatype( A, tau );
FLA_Check_error_code( e_val );
e_val = FLA_Check_consistent_object_datatype( A, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_vector( tau );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( tau, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
// This is not valid.
// The width of T can match to either length of width of A,
// which depends on how house-holder vectors are accumulated.
// e_val = FLA_Check_object_width_equals( T, FLA_Obj_min_dim( A ) );
// FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_CAQ2_UT_internal_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | D, | ||
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | C, | ||
| FLA_Obj | E, | ||
| fla_apcaq2ut_t * | cntl | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_elemtype(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_Apply_CAQ2_UT_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( D, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( D, W );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( D, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( D, E );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects.
if ( side == FLA_LEFT )
{
if ( FLA_Obj_elemtype( D ) == FLA_MATRIX )
{
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, D, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, C, W );
FLA_Check_error_code( e_val );
}
else // if ( FLA_Obj_elemtype( D ) == FLA_SCALAR )
{
//e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, E, C, D );
//FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( C, FLA_Obj_width( E ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( D, FLA_Obj_length( E ) );
FLA_Check_error_code( e_val );
}
//e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, C, E );
//FLA_Check_error_code( e_val );
}
else
{
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_CAQ2_UT_lhfc_task | ( | FLA_Obj | D, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | C, | ||
| FLA_Obj | E, | ||
| fla_apcaq2ut_t * | cntl | ||
| ) |
References FLA_Apply_CAQ2_UT_internal().
{
return FLA_Apply_CAQ2_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
D, T, W, C, E,
fla_apcaq2ut_cntl_leaf );
}
| FLA_Error FLA_Apply_CAQ2_UT_task | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | D, | ||
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | C, | ||
| FLA_Obj | E, | ||
| fla_apcaq2ut_t * | cntl | ||
| ) |
References FLA_Apply_CAQ2_UT_internal().
Referenced by FLASH_Queue_exec_task().
{
return FLA_Apply_CAQ2_UT_internal( side, trans, direct, storev,
D, T, W, C, E,
fla_apcaq2ut_cntl_leaf );
}
| FLA_Error FLA_Apply_CAQ_UT_inc_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | A, | ||
| FLA_Obj | ATW, | ||
| FLA_Obj | R, | ||
| FLA_Obj | RTW, | ||
| FLA_Obj | W1, | ||
| FLA_Obj | B | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_valid_direct(), FLA_Check_valid_leftright_side(), FLA_Check_valid_storev(), FLA_Check_valid_trans(), and FLA_Obj_length().
Referenced by FLASH_Apply_CAQ_UT_inc().
{
FLA_Error e_val;
e_val = FLA_Check_valid_leftright_side( side );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_trans( trans );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_direct( direct );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_storev( storev );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, ATW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, RTW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, W );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, ATW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, RTW );
FLA_Check_error_code( e_val );
if ( side == FLA_LEFT )
{
e_val = FLA_Check_object_length_equals( B, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
}
else
{
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_CAQ_UT_inc_internal_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | R, | ||
| FLA_Obj | TW, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apcaqutinc_t * | cntl | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_Apply_CAQ_UT_inc_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( R, TW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( R, W );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( R, B );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects. This check works regardless
// of whether the element type is FLA_MATRIX or FLA_SCALAR because the
// element length and width are used instead of scalar length and width.
if ( side == FLA_LEFT )
{
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, R, TW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( B, FLA_Obj_length( R ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( W, FLA_Obj_width( B ) );
FLA_Check_error_code( e_val );
}
else
{
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
return FLA_SUCCESS;
}
References FLA_Apply_H2_UT_check(), FLA_Apply_H2_UT_internal(), FLA_Check_error_level(), and FLA_Obj_has_zero_dim().
Referenced by FLA_Bidiag_UT_u_step_unb_var1(), FLA_CAQR2_UT_unb_var1(), FLA_Hess_UT_step_unb_var1(), FLA_LQ_UT_unb_var1(), FLA_LQ_UT_unb_var2(), FLA_QR2_UT_unb_var1(), FLA_QR_UT_piv_unb_var1(), FLA_QR_UT_unb_var1(), and FLA_QR_UT_unb_var2().
{
FLA_Error r_val;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Apply_H2_UT_check( side, tau, u2, a1, A2 );
if ( FLA_Obj_has_zero_dim( a1 ) ) return FLA_SUCCESS;
// Invoke FLA_Apply_H2_UT_internal() to parse parameters.
r_val = FLA_Apply_H2_UT_internal( side, tau, u2, a1, A2 );
return r_val;
}
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_valid_leftright_side(), and FLA_Obj_vector_dim().
Referenced by FLA_Apply_H2_UT().
{
FLA_Error e_val;
e_val = FLA_Check_valid_leftright_side( side );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( tau );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( tau );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( tau, u2 );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( tau, a1 );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( tau, A2 );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_scalar( tau );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( u2 );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( a1 );
FLA_Check_error_code( e_val );
if ( side == FLA_LEFT )
{
e_val = FLA_Check_object_length_equals( A2, FLA_Obj_vector_dim( u2 ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( A2, FLA_Obj_vector_dim( a1 ) );
FLA_Check_error_code( e_val );
}
else // if ( side == FLA_RIGHT )
{
e_val = FLA_Check_object_width_equals( A2, FLA_Obj_vector_dim( u2 ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( A2, FLA_Obj_vector_dim( a1 ) );
FLA_Check_error_code( e_val );
}
// if columnwise
//e_val = FLA_Check_matrix_vector_dims( FLA_TRANSPOSE, A2, u2, a1t );
//FLA_Check_error_code( e_val );
// if rowwise
//e_val = FLA_Check_matrix_vector_dims( ... );
//FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_HUD_UT | ( | FLA_Side | side, |
| FLA_Obj | tau, | ||
| FLA_Obj | w12t, | ||
| FLA_Obj | u2, | ||
| FLA_Obj | v2, | ||
| FLA_Obj | r12t, | ||
| FLA_Obj | C2, | ||
| FLA_Obj | D2 | ||
| ) |
References FLA_Apply_HUD_UT_check(), FLA_Apply_HUD_UT_internal(), and FLA_Check_error_level().
Referenced by FLA_UDdate_UT_unb_var1().
{
FLA_Error r_val;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Apply_HUD_UT_check( side, tau, w12t, r12t, u1, C2, v1, D2 );
// Invoke FLA_Apply_HUD_UT_internal() to parse parameters.
r_val = FLA_Apply_HUD_UT_internal( side, tau, w12t, r12t, u1, C2, v1, D2 );
return r_val;
}
| FLA_Error FLA_Apply_HUD_UT_check | ( | FLA_Side | side, |
| FLA_Obj | tau, | ||
| FLA_Obj | w12t, | ||
| FLA_Obj | u2, | ||
| FLA_Obj | v2, | ||
| FLA_Obj | r12t, | ||
| FLA_Obj | C2, | ||
| FLA_Obj | D2 | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), and FLA_Check_valid_leftright_side().
Referenced by FLA_Apply_HUD_UT().
{
FLA_Error e_val;
e_val = FLA_Check_valid_leftright_side( side );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( tau );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( tau );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( tau, w12t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( tau, r12t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( tau, u1 );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( tau, C2 );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( tau, v1 );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( tau, D2 );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_scalar( tau );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( w12t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( r12t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( u1 );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( v1 );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, w12t, r12t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, C2, r12t, u1 );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, D2, r12t, v1 );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Apply_pivots_internal().
Referenced by FLA_Bidiag_UT_form_U_ext(), FLA_Bidiag_UT_form_V_ext(), FLA_Form_perm_matrix(), FLA_LU_piv_solve(), FLA_LU_piv_unb_var3(), FLA_LU_piv_unb_var3b(), FLA_LU_piv_unb_var4(), FLA_LU_piv_unb_var5(), FLA_QR_UT_piv_blk_var1(), FLA_QR_UT_piv_blk_var2(), FLA_QR_UT_piv_unb_var1(), FLA_QR_UT_piv_unb_var2(), FLA_Trsm_piv_task(), and FLASH_FS_incpiv_aux1().
{
FLA_Error r_val;
// Check parameters.
r_val = FLA_Apply_pivots_internal( side, trans, p, A, fla_appiv_cntl_leaf );
return r_val;
}
References FLA_Check_floating_object(), FLA_Check_if_vector(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), FLA_Check_valid_leftright_side(), and FLA_Check_valid_trans().
Referenced by FLA_Apply_pivots_unb_external().
{
FLA_Error e_val;
e_val = FLA_Check_valid_leftright_side( side );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_trans( trans );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_int_object( p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
if ( trans == FLA_NO_TRANSPOSE )
{
if ( side == FLA_RIGHT )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
else if ( trans == FLA_TRANSPOSE )
{
if ( side == FLA_LEFT )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
else if ( side == FLA_RIGHT )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_pivots_ln_task | ( | FLA_Obj | p, |
| FLA_Obj | A, | ||
| fla_appiv_t * | cntl | ||
| ) |
References FLA_Apply_pivots_internal().
{
//return FLA_Apply_pivots_unb_external( FLA_LEFT, FLA_NO_TRANSPOSE, p, A );
return FLA_Apply_pivots_internal( FLA_LEFT, FLA_NO_TRANSPOSE,
p, A,
fla_appiv_cntl_leaf );
}
References FLA_Apply_pivots_unb_external().
Referenced by FLA_Apply_pivots_ln().
{
return FLA_Apply_pivots_unb_external( FLA_LEFT, FLA_NO_TRANSPOSE, p, A );
}
References bl1_cswapv(), bl1_dswapv(), bl1_sswapv(), bl1_zswapv(), FLA_Obj_buffer_at_view(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_Apply_pivots_macro_task().
{
int i, j;
int ipiv;
int* buf_p = ( int* ) FLA_Obj_buffer_at_view( p );
FLA_Obj* blocks = FLASH_OBJ_PTR_AT( A );
int m_blocks = FLA_Obj_length( A );
int m_A = FLA_Obj_length( *blocks );
int n_A = FLA_Obj_width( *blocks );
FLA_Datatype datatype = FLA_Obj_datatype( A );
#ifdef FLA_ENABLE_WINDOWS_BUILD
int* m = ( int* ) _alloca( m_blocks * sizeof( int ) );
int* cs = ( int* ) _alloca( m_blocks * sizeof( int ) );
#else
int* m = ( int* ) malloc( m_blocks * sizeof( int ) );
int* cs = ( int* ) malloc( m_blocks * sizeof( int ) );
//int m[m_blocks];
//int cs[m_blocks];
#endif
if ( side != FLA_LEFT || trans != FLA_NO_TRANSPOSE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
switch ( datatype )
{
case FLA_FLOAT:
{
#ifdef FLA_ENABLE_WINDOWS_BUILD
float** buffer = ( float** ) _alloca( m_blocks * sizeof( float* ) );
#else
float** buffer = ( float** ) malloc( m_blocks * sizeof( float* ) );
//float* buffer[m_blocks];
#endif
for ( i = 0; i < m_blocks; i++ )
{
buffer[i] = ( float* ) FLA_Obj_buffer_at_view( blocks[i] );
m[i] = FLA_Obj_length( blocks[i] );
cs[i] = FLA_Obj_col_stride( blocks[i] );
}
for ( j = 0; j < m_A; j++ )
{
ipiv = buf_p[j] + j;
if ( ipiv != j )
{
i = 0;
while ( ipiv >= m[i] )
{
ipiv = ipiv - m[i];
i++;
}
bl1_sswapv( n_A,
buffer[0] + j, cs[0],
buffer[i] + ipiv, cs[i] );
}
}
#ifdef FLA_ENABLE_WINDOWS_BUILD
#else
free( buffer );
#endif
break;
}
case FLA_DOUBLE:
{
#ifdef FLA_ENABLE_WINDOWS_BUILD
double** buffer = ( double** ) _alloca( m_blocks * sizeof( double* ) );
#else
double** buffer = ( double** ) malloc( m_blocks * sizeof( double* ) );
//double* buffer[m_blocks];
#endif
for ( i = 0; i < m_blocks; i++ )
{
buffer[i] = ( double* ) FLA_Obj_buffer_at_view( blocks[i] );
m[i] = FLA_Obj_length( blocks[i] );
cs[i] = FLA_Obj_col_stride( blocks[i] );
}
for ( j = 0; j < m_A; j++ )
{
ipiv = buf_p[j] + j;
if ( ipiv != j )
{
i = 0;
while ( ipiv >= m[i] )
{
ipiv = ipiv - m[i];
i++;
}
bl1_dswapv( n_A,
buffer[0] + j, cs[0],
buffer[i] + ipiv, cs[i] );
}
}
#ifdef FLA_ENABLE_WINDOWS_BUILD
#else
free( buffer );
#endif
break;
}
case FLA_COMPLEX:
{
#ifdef FLA_ENABLE_WINDOWS_BUILD
scomplex** buffer = ( scomplex** ) _alloca( m_blocks * sizeof( scomplex* ) );
#else
scomplex** buffer = ( scomplex** ) malloc( m_blocks * sizeof( scomplex* ) );
//scomplex* buffer[m_blocks];
#endif
for ( i = 0; i < m_blocks; i++ )
{
buffer[i] = ( scomplex* ) FLA_Obj_buffer_at_view( blocks[i] );
m[i] = FLA_Obj_length( blocks[i] );
cs[i] = FLA_Obj_col_stride( blocks[i] );
}
for ( j = 0; j < m_A; j++ )
{
ipiv = buf_p[j] + j;
if ( ipiv != j )
{
i = 0;
while ( ipiv >= m[i] )
{
ipiv = ipiv - m[i];
i++;
}
bl1_cswapv( n_A,
buffer[0] + j, cs[0],
buffer[i] + ipiv, cs[i] );
}
}
#ifdef FLA_ENABLE_WINDOWS_BUILD
#else
free( buffer );
#endif
break;
}
case FLA_DOUBLE_COMPLEX:
{
#ifdef FLA_ENABLE_WINDOWS_BUILD
dcomplex** buffer = ( dcomplex** ) _alloca( m_blocks * sizeof( dcomplex* ) );
#else
dcomplex** buffer = ( dcomplex** ) malloc( m_blocks * sizeof( dcomplex* ) );
//dcomplex* buffer[m_blocks];
#endif
for ( i = 0; i < m_blocks; i++ )
{
buffer[i] = ( dcomplex* ) FLA_Obj_buffer_at_view( blocks[i] );
m[i] = FLA_Obj_length( blocks[i] );
cs[i] = FLA_Obj_col_stride( blocks[i] );
}
for ( j = 0; j < m_A; j++ )
{
ipiv = buf_p[j] + j;
if ( ipiv != j )
{
i = 0;
while ( ipiv >= m[i] )
{
ipiv = ipiv - m[i];
i++;
}
bl1_zswapv( n_A,
buffer[0] + j, cs[0],
buffer[i] + ipiv, cs[i] );
}
}
#ifdef FLA_ENABLE_WINDOWS_BUILD
#else
free( buffer );
#endif
break;
}
}
#ifdef FLA_ENABLE_WINDOWS_BUILD
#else
free( m );
free( cs );
#endif
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_pivots_macro_task | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Obj | p, | ||
| FLA_Obj | A, | ||
| fla_appiv_t * | cntl | ||
| ) |
References FLA_Apply_pivots_internal(), FLA_Apply_pivots_macro_external(), and FLA_Obj_length().
Referenced by FLA_Apply_pivots_internal(), and FLASH_Queue_exec_task().
{
FLA_Error r_val;
/*
FLA_Obj A_flat;
FLASH_Obj_create_flat_copy_of_hier( A, &A_flat );
r_val = FLA_Apply_pivots_unb_external( side, trans, p, A_flat );
FLASH_Copy_flat_to_hier( A_flat, 0, 0, A );
FLA_Obj_free( &A_flat );
*/
if ( FLA_Obj_length( A ) > 1 )
{
r_val = FLA_Apply_pivots_macro_external( side, trans, p, A );
}
else
{
//r_val = FLA_Apply_pivots_unb_external( side, trans, p,
// *FLASH_OBJ_PTR_AT( A ) );
r_val = FLA_Apply_pivots_internal( side, trans, p,
*FLASH_OBJ_PTR_AT( A ),
fla_appiv_cntl_leaf );
}
return r_val;
}
| FLA_Error FLA_Apply_pivots_task | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Obj | p, | ||
| FLA_Obj | A, | ||
| fla_appiv_t * | cntl | ||
| ) |
References FLA_Apply_pivots_internal().
{
//return FLA_Apply_pivots_unb_external( side, trans, p, A );
return FLA_Apply_pivots_internal( side, trans,
p, A,
fla_appiv_cntl_leaf );
}
References F77_claswp(), F77_dlaswp(), F77_slaswp(), F77_zlaswp(), FLA_Apply_pivots_check(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), and FLA_Obj_width().
Referenced by FLA_Apply_pivots_ln_unb_ext().
{
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int n_A, cs_A;
int m_p;
int inc_p;
int* buff_p;
int k1_1, k2_1;
int* pivots_lapack;
int i;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Apply_pivots_check( side, trans, p, A );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
inc_p = FLA_Obj_vector_inc( p );
m_p = FLA_Obj_vector_dim( p );
buff_p = FLA_INT_PTR( p );
// Use one-based indices for LAPACK.
k1_1 = 1;
k2_1 = m_p;
// Translate FLAME pivot indices to LAPACK-compatible indices. It is
// important to note that this conversion, unlike the one done by
// FLA_Shift_pivots_to(), is NOT in-place, but rather done separately
// in a temporary buffer.
#ifdef FLA_ENABLE_WINDOWS_BUILD
pivots_lapack = ( int * ) _alloca( m_p * sizeof( int ) );
#else
pivots_lapack = ( int * ) alloca( m_p * sizeof( int ) );
#endif
for ( i = 0; i < m_p; i++ )
{
pivots_lapack[ i ] = buff_p[ i ] + i + 1;
}
switch ( datatype ){
case FLA_FLOAT:
{
float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
F77_slaswp( &n_A,
buff_A, &cs_A,
&k1_1,
&k2_1,
pivots_lapack,
&inc_p );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
F77_dlaswp( &n_A,
buff_A, &cs_A,
&k1_1,
&k2_1,
pivots_lapack,
&inc_p );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
F77_claswp( &n_A,
buff_A, &cs_A,
&k1_1,
&k2_1,
pivots_lapack,
&inc_p );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
F77_zlaswp( &n_A,
buff_A, &cs_A,
&k1_1,
&k2_1,
pivots_lapack,
&inc_p );
break;
}
}
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_Q2_UT_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | D, | ||
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | C, | ||
| FLA_Obj | E | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_direct(), FLA_Check_valid_leftright_side(), FLA_Check_valid_storev(), and FLA_Check_valid_trans().
Referenced by FLASH_Apply_Q2_UT().
{
FLA_Error e_val;
e_val = FLA_Check_valid_leftright_side( side );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_trans( trans );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_direct( direct );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_storev( storev );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( D );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( D );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( D, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( D, W );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( D, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( D, E );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( E );
FLA_Check_error_code( e_val );
if ( side == FLA_LEFT )
{
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, D, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_TRANSPOSE, T, W );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, C, E );
FLA_Check_error_code( e_val );
}
else
{
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, C, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_TRANSPOSE, T, W );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, C, E );
FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_Q2_UT_internal_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | D, | ||
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | C, | ||
| FLA_Obj | E, | ||
| fla_apq2ut_t * | cntl | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_elemtype(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_Apply_Q2_UT_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( D, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( D, W );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( D, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( D, E );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects.
if ( side == FLA_LEFT )
{
if ( FLA_Obj_elemtype( D ) == FLA_MATRIX )
{
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, D, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, C, W );
FLA_Check_error_code( e_val );
}
else // if ( FLA_Obj_elemtype( D ) == FLA_SCALAR )
{
//e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, E, C, D );
//FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( C, FLA_Obj_width( E ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( D, FLA_Obj_length( E ) );
FLA_Check_error_code( e_val );
}
//e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, C, E );
//FLA_Check_error_code( e_val );
}
else
{
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_Q2_UT_lhfc_task | ( | FLA_Obj | D, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | C, | ||
| FLA_Obj | E, | ||
| fla_apq2ut_t * | cntl | ||
| ) |
References FLA_Apply_Q2_UT_internal().
{
return FLA_Apply_Q2_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
D, T, W, C, E,
fla_apq2ut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q2_UT_task | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | D, | ||
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | C, | ||
| FLA_Obj | E, | ||
| fla_apq2ut_t * | cntl | ||
| ) |
References FLA_Apply_Q2_UT_internal().
Referenced by FLA_Apply_CAQ2_UT_internal(), and FLASH_Queue_exec_task().
{
return FLA_Apply_Q2_UT_internal( side, trans, direct, storev,
D, T, W, C, E,
fla_apq2ut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_blk_external | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Store | storev, | ||
| FLA_Obj | A, | ||
| FLA_Obj | t, | ||
| FLA_Obj | B | ||
| ) |
References F77_cunmlq(), F77_cunmqr(), F77_dormlq(), F77_dormqr(), F77_sormlq(), F77_sormqr(), F77_zunmlq(), F77_zunmqr(), FLA_Apply_Q_check(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_side(), FLA_Param_map_flame_to_netlib_trans(), and FLA_Query_blocksize().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
// int m_A, n_A;
int m_B, n_B;
int cs_A;
int cs_B;
int k_t;
int lwork;
char blas_side;
char blas_trans;
FLA_Obj work_obj;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Apply_Q_check( side, trans, storev, A, t, B );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
// m_A = FLA_Obj_length( A );
// n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
m_B = FLA_Obj_length( B );
n_B = FLA_Obj_width( B );
cs_B = FLA_Obj_col_stride( B );
k_t = FLA_Obj_vector_dim( t );
FLA_Param_map_flame_to_netlib_side( side, &blas_side );
FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
if ( side == FLA_LEFT )
lwork = n_B * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
else
lwork = m_B * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work_obj );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
if ( storev == FLA_COLUMNWISE )
F77_sormqr( &blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
else // storev == FLA_ROWWISE
F77_sormlq( &blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
if ( storev == FLA_COLUMNWISE )
F77_dormqr( &blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
else // storev == FLA_ROWWISE
F77_dormlq( &blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
if ( storev == FLA_COLUMNWISE )
F77_cunmqr( &blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
else // storev == FLA_ROWWISE
F77_cunmlq( &blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
if ( storev == FLA_COLUMNWISE )
F77_zunmqr( &blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
else // storev == FLA_ROWWISE
F77_zunmlq( &blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
}
FLA_Obj_free( &work_obj );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Apply_Q_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Store | storev, | ||
| FLA_Obj | A, | ||
| FLA_Obj | t, | ||
| FLA_Obj | B | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_valid_complex_trans(), FLA_Check_valid_leftright_side(), FLA_Check_valid_real_trans(), FLA_Check_valid_storev(), FLA_Check_valid_trans(), FLA_Obj_is_real(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_Apply_Q_blk_external().
{
FLA_Error e_val;
e_val = FLA_Check_valid_leftright_side( side );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_trans( trans );
FLA_Check_error_code( e_val );
if ( FLA_Obj_is_real( A ) )
{
e_val = FLA_Check_valid_real_trans( trans );
FLA_Check_error_code( e_val );
}
else
{
e_val = FLA_Check_valid_complex_trans( trans );
FLA_Check_error_code( e_val );
}
e_val = FLA_Check_valid_storev( storev );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, t );
FLA_Check_error_code( e_val );
if ( side == FLA_LEFT )
{
if ( storev == FLA_COLUMNWISE )
{
e_val = FLA_Check_object_length_equals( B, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
}
else // if ( storev == FLA_ROWWISE )
{
e_val = FLA_Check_object_length_equals( B, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
}
}
else
{
if ( storev == FLA_COLUMNWISE )
{
e_val = FLA_Check_object_width_equals( B, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
}
else // if ( storev == FLA_ROWWISE )
{
e_val = FLA_Check_object_width_equals( B, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
}
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_Q_UT | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | A, | ||
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B | ||
| ) |
References FLA_Apply_Q_UT_check(), FLA_Apply_Q_UT_internal(), and FLA_Check_error_level().
Referenced by FLA_Hess_UT_blk_var5(), FLA_LQ_UT_solve(), FLA_QR_UT_form_Q(), FLA_QR_UT_form_Q_blk_var1(), and FLA_QR_UT_solve().
{
FLA_Error r_val;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Apply_Q_UT_check( side, trans, direct, storev, A, T, W, B );
// Invoke FLA_Apply_Q_UT_internal() with the standard control tree.
r_val = FLA_Apply_Q_UT_internal( side, trans, direct, storev, A, T, W, B, fla_apqut_cntl_leaf );
return r_val;
}
| FLA_Error FLA_Apply_Q_UT_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | A, | ||
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_valid_direct(), FLA_Check_valid_leftright_side(), FLA_Check_valid_storev(), FLA_Check_valid_trans(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_Apply_Q_UT(), and FLASH_Apply_Q_UT().
{
FLA_Error e_val;
e_val = FLA_Check_valid_leftright_side( side );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_trans( trans );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_direct( direct );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_storev( storev );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, W );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
if ( side == FLA_LEFT )
{
//e_val = FLA_Check_object_width_equals( T, FLA_Obj_width( A ) );
//FLA_Check_error_code( e_val );
//e_val = FLA_Check_object_width_equals( T, FLA_Obj_min_dim( A ) );
//FLA_Check_error_code( e_val );
if ( storev == FLA_COLUMNWISE )
{
e_val = FLA_Check_object_length_equals( B, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
}
else // if ( storev == FLA_ROWWISE )
{
e_val = FLA_Check_object_length_equals( B, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
}
}
else // if ( side == FLA_RIGHT )
{
//e_val = FLA_Check_object_width_equals( T, FLA_Obj_min_dim( A ) );
//FLA_Check_error_code( e_val );
if ( storev == FLA_COLUMNWISE )
{
e_val = FLA_Check_object_width_equals( B, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
}
else // if ( storev == FLA_ROWWISE )
{
e_val = FLA_Check_object_width_equals( B, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
}
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_Q_UT_inc_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | A, | ||
| FLA_Obj | TW, | ||
| FLA_Obj | W1, | ||
| FLA_Obj | B | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_valid_direct(), FLA_Check_valid_leftright_side(), FLA_Check_valid_storev(), FLA_Check_valid_trans(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLASH_Apply_Q_UT_inc().
{
FLA_Error e_val;
e_val = FLA_Check_valid_leftright_side( side );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_trans( trans );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_direct( direct );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_storev( storev );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, TW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, W1 );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
//e_val = FLA_Check_square( A );
//FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, TW );
FLA_Check_error_code( e_val );
if ( side == FLA_LEFT )
{
e_val = FLA_Check_object_length_equals( B, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
}
else
{
e_val = FLA_Check_object_width_equals( B, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_Q_UT_inc_internal_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | A, | ||
| FLA_Obj | TW, | ||
| FLA_Obj | W1, | ||
| FLA_Obj | B, | ||
| fla_apqutinc_t * | cntl | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_Apply_Q_UT_inc_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( A, TW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( A, W1 );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( A, B );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects. This check works regardless
// of whether the element type is FLA_MATRIX or FLA_SCALAR because the
// element length and width are used instead of scalar length and width.
if ( side == FLA_LEFT )
{
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, TW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( B, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( W1, FLA_Obj_width( B ) );
FLA_Check_error_code( e_val );
}
else
{
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, TW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( B, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( W1, FLA_Obj_length( B ) );
FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_Q_UT_internal_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | A, | ||
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_Apply_Q_UT_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( A, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( A, W );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( A, B );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects. This check works regardless
// of whether the element type is FLA_MATRIX or FLA_SCALAR because the
// element length and width are used instead of scalar length and width.
if ( side == FLA_LEFT )
{
if ( storev == FLA_COLUMNWISE )
{
e_val = FLA_Check_object_length_equals( A, FLA_Obj_length( B ) );
FLA_Check_error_code( e_val );
}
else // if ( storev == FLA_ROWWISE )
{
e_val = FLA_Check_object_width_equals( A, FLA_Obj_length( B ) );
FLA_Check_error_code( e_val );
}
}
else // if ( side == FLA_RIGHT )
{
if ( storev == FLA_COLUMNWISE )
{
e_val = FLA_Check_object_length_equals( A, FLA_Obj_width( B ) );
FLA_Check_error_code( e_val );
}
else // if ( storev == FLA_ROWWISE )
{
e_val = FLA_Check_object_width_equals( A, FLA_Obj_width( B ) );
FLA_Check_error_code( e_val );
}
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_Q_UT_lhbc_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_BACKWARD, FLA_COLUMNWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_lhbr_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_BACKWARD, FLA_ROWWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_lhfc_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_lhfr_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_ROWWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_lnbc_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_NO_TRANSPOSE, FLA_BACKWARD, FLA_COLUMNWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_lnbr_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_NO_TRANSPOSE, FLA_BACKWARD, FLA_ROWWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_lnfc_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_NO_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_lnfr_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_NO_TRANSPOSE, FLA_FORWARD, FLA_ROWWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_rhbc_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_CONJ_TRANSPOSE, FLA_BACKWARD, FLA_COLUMNWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_rhbr_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_CONJ_TRANSPOSE, FLA_BACKWARD, FLA_ROWWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_rhfc_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_rhfr_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_ROWWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_rnbc_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_NO_TRANSPOSE, FLA_BACKWARD, FLA_COLUMNWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_rnbr_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_NO_TRANSPOSE, FLA_BACKWARD, FLA_ROWWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_rnfc_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_NO_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_rnfr_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
{
return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_NO_TRANSPOSE, FLA_FORWARD, FLA_ROWWISE,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_Q_UT_task | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | A, | ||
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | B, | ||
| fla_apqut_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_internal().
Referenced by FLASH_Queue_exec_task().
{
return FLA_Apply_Q_UT_internal( side, trans, direct, storev,
A, T, W, B,
fla_apqut_cntl_leaf );
}
| FLA_Error FLA_Apply_QUD_UT_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | R, | ||
| FLA_Obj | U, | ||
| FLA_Obj | C, | ||
| FLA_Obj | V, | ||
| FLA_Obj | D | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), FLA_Check_valid_direct(), FLA_Check_valid_leftright_side(), FLA_Check_valid_storev(), FLA_Check_valid_trans(), and FLA_Obj_width().
Referenced by FLA_Apply_QUD_UT().
{
FLA_Error e_val;
e_val = FLA_Check_valid_leftright_side( side );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_trans( trans );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_direct( direct );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_storev( storev );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, W );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, U );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, V );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, D );
FLA_Check_error_code( e_val );
if ( side == FLA_LEFT )
{
e_val = FLA_Check_object_width_equals( T, FLA_Obj_width( U ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( W, FLA_Obj_width( R ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, U, R, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, V, R, D );
FLA_Check_error_code( e_val );
}
else
{
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_QUD_UT_inc_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | R, | ||
| FLA_Obj | U, | ||
| FLA_Obj | C, | ||
| FLA_Obj | V, | ||
| FLA_Obj | D | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_valid_direct(), FLA_Check_valid_leftright_side(), FLA_Check_valid_storev(), FLA_Check_valid_trans(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLASH_Apply_QUD_UT_inc().
{
FLA_Error e_val;
e_val = FLA_Check_valid_leftright_side( side );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_trans( trans );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_direct( direct );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_storev( storev );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, W );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, U );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, V );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, D );
FLA_Check_error_code( e_val );
if ( side == FLA_LEFT )
{
e_val = FLA_Check_object_width_equals( T, FLA_Obj_width( U ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( T, max( FLA_Obj_length( U ),
FLA_Obj_length( V ) ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_TRANSPOSE, W, R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, U, R, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, V, R, D );
FLA_Check_error_code( e_val );
}
else
{
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_QUD_UT_inc_internal_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | R, | ||
| FLA_Obj | U, | ||
| FLA_Obj | C, | ||
| FLA_Obj | V, | ||
| FLA_Obj | D, | ||
| fla_apqudutinc_t * | cntl | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_matrix_matrix_dims(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_Apply_QUD_UT_inc_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( R, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( R, W );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( R, U );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( R, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( R, V );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( R, D );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects.
if ( side == FLA_LEFT )
{
e_val = FLA_Check_object_width_equals( T, FLA_Obj_width( U ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( T, max( FLA_Obj_length( U ),
FLA_Obj_length( V ) ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, W, R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, U, R, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, V, R, D );
FLA_Check_error_code( e_val );
}
else
{
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_QUD_UT_internal_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | R, | ||
| FLA_Obj | U, | ||
| FLA_Obj | C, | ||
| FLA_Obj | V, | ||
| FLA_Obj | D, | ||
| fla_apqudut_t * | cntl | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_matrix_matrix_dims(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_elemtype(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_Apply_QUD_UT_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( R, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( R, W );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( R, U );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( R, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( R, V );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( R, D );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects.
if ( side == FLA_LEFT )
{
if ( FLA_Obj_elemtype( R ) == FLA_MATRIX )
{
e_val = FLA_Check_object_width_equals( T, FLA_Obj_width( U ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( T, max( FLA_Obj_length( U ),
FLA_Obj_length( V ) ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, W, R );
FLA_Check_error_code( e_val );
}
else // FLA_Obj_elemtype( R ) == FLA_SCALAR
{
}
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, U, R, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, V, R, D );
FLA_Check_error_code( e_val );
}
else
{
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Apply_QUD_UT_lhfc_task | ( | FLA_Obj | T, |
| FLA_Obj | W, | ||
| FLA_Obj | R, | ||
| FLA_Obj | U, | ||
| FLA_Obj | C, | ||
| FLA_Obj | V, | ||
| FLA_Obj | D, | ||
| fla_apqudut_t * | cntl | ||
| ) |
References FLA_Apply_QUD_UT_internal().
{
return FLA_Apply_QUD_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
T, W, R, U, C, V, D,
fla_apqudut_cntl_leaf );
}
| FLA_Error FLA_Apply_QUD_UT_task | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Direct | direct, | ||
| FLA_Store | storev, | ||
| FLA_Obj | T, | ||
| FLA_Obj | W, | ||
| FLA_Obj | R, | ||
| FLA_Obj | U, | ||
| FLA_Obj | C, | ||
| FLA_Obj | V, | ||
| FLA_Obj | D, | ||
| fla_apqudut_t * | cntl | ||
| ) |
References FLA_Apply_QUD_UT_internal().
Referenced by FLASH_Queue_exec_task().
{
return FLA_Apply_QUD_UT_internal( side, trans, direct, storev,
T, W, R, U, C, V, D,
fla_apqudut_cntl_leaf );
}
| FLA_Error FLA_Bidiag_apply_U_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Obj | A, | ||
| FLA_Obj | t, | ||
| FLA_Obj | B | ||
| ) |
| FLA_Error FLA_Bidiag_apply_U_external | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Obj | A, | ||
| FLA_Obj | t, | ||
| FLA_Obj | B | ||
| ) |
References F77_cunmbr(), F77_dormbr(), F77_sormbr(), F77_zunmbr(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_is_real(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_side(), and FLA_Param_map_flame_to_netlib_trans().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
// int m_A, n_A;
int m_B, n_B;
int cs_A;
int cs_B;
int k_t;
int lwork;
FLA_Obj work;
char blas_side;
char blas_vect = 'Q';
char blas_trans;
int i;
//if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
// FLA_Apply_Q_check( side, trans, storev, A, t, B );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
// m_A = FLA_Obj_length( A );
// n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
m_B = FLA_Obj_length( B );
n_B = FLA_Obj_width( B );
cs_B = FLA_Obj_col_stride( B );
if ( blas_vect == 'Q' ) k_t = FLA_Obj_vector_dim( t );
else k_t = FLA_Obj_vector_dim( t ) + 1;
if ( FLA_Obj_is_real( A ) && trans == FLA_CONJ_TRANSPOSE )
trans = FLA_TRANSPOSE;
FLA_Param_map_flame_to_netlib_side( side, &blas_side );
FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
// Make a workspace query the first time through. This will provide us with
// and ideal workspace size based on an internal block size.
lwork = -1;
FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
for ( i = 0; i < 2; ++i )
{
if ( i == 1 )
{
// Grab the queried ideal workspace size from the work array, free the
// work object, and then re-allocate the workspace with the ideal size.
if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
lwork = ( int ) *FLA_FLOAT_PTR( work );
else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
lwork = ( int ) *FLA_DOUBLE_PTR( work );
FLA_Obj_free( &work );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
}
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
float *buff_work = ( float * ) FLA_FLOAT_PTR( work );
F77_sormbr( &blas_vect,
&blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
double *buff_work = ( double * ) FLA_DOUBLE_PTR( work );
F77_dormbr( &blas_vect,
&blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
F77_cunmbr( &blas_vect,
&blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work );
F77_zunmbr( &blas_vect,
&blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
}
}
FLA_Obj_free( &work );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Bidiag_apply_V_check | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Obj | A, | ||
| FLA_Obj | t, | ||
| FLA_Obj | B | ||
| ) |
| FLA_Error FLA_Bidiag_apply_V_external | ( | FLA_Side | side, |
| FLA_Trans | trans, | ||
| FLA_Obj | A, | ||
| FLA_Obj | t, | ||
| FLA_Obj | B | ||
| ) |
References F77_cunmbr(), F77_dormbr(), F77_sormbr(), F77_zunmbr(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_is_real(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_side(), and FLA_Param_map_flame_to_netlib_trans().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
// int m_A, n_A;
int m_B, n_B;
int cs_A;
int cs_B;
int k_t;
int lwork;
FLA_Obj work;
char blas_side;
char blas_vect = 'P';
char blas_trans;
int i;
//if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
// FLA_Apply_Q_check( side, trans, storev, A, t, B );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
// m_A = FLA_Obj_length( A );
// n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
m_B = FLA_Obj_length( B );
n_B = FLA_Obj_width( B );
cs_B = FLA_Obj_col_stride( B );
if ( blas_vect == 'Q' ) k_t = FLA_Obj_vector_dim( t );
else k_t = FLA_Obj_vector_dim( t ) + 1;
if ( FLA_Obj_is_real( A ) && trans == FLA_CONJ_TRANSPOSE )
trans = FLA_TRANSPOSE;
FLA_Param_map_flame_to_netlib_side( side, &blas_side );
FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
// Make a workspace query the first time through. This will provide us with
// and ideal workspace size based on an internal block size.
lwork = -1;
FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
for ( i = 0; i < 2; ++i )
{
if ( i == 1 )
{
// Grab the queried ideal workspace size from the work array, free the
// work object, and then re-allocate the workspace with the ideal size.
if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
lwork = ( int ) *FLA_FLOAT_PTR( work );
else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
lwork = ( int ) *FLA_DOUBLE_PTR( work );
FLA_Obj_free( &work );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
}
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
float *buff_work = ( float * ) FLA_FLOAT_PTR( work );
F77_sormbr( &blas_vect,
&blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
double *buff_work = ( double * ) FLA_DOUBLE_PTR( work );
F77_dormbr( &blas_vect,
&blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
F77_cunmbr( &blas_vect,
&blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work );
F77_zunmbr( &blas_vect,
&blas_side,
&blas_trans,
&m_B,
&n_B,
&k_t,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
}
}
FLA_Obj_free( &work );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Bidiag_blk_external | ( | FLA_Obj | A, |
| FLA_Obj | tu, | ||
| FLA_Obj | tv | ||
| ) |
References F77_cgebrd(), F77_dgebrd(), F77_sgebrd(), F77_zgebrd(), FLA_Bidiag_check(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_max_dim(), FLA_Obj_min_dim(), FLA_Obj_width(), and FLA_Query_blocksize().
Referenced by FLA_Bidiag_blk_ext().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int m_A, n_A, cs_A;
int min_m_n, max_m_n;
int lwork;
FLA_Obj d, e, work_obj;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Bidiag_check( A, tu, tv );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
min_m_n = FLA_Obj_min_dim( A );
max_m_n = FLA_Obj_max_dim( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), min_m_n, 1, 0, 0, &d );
FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), min_m_n - 1, 1, 0, 0, &e );
lwork = (m_A + n_A) * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work_obj );
switch( datatype ){
case FLA_FLOAT:
{
float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
float* buff_tu = ( float * ) FLA_FLOAT_PTR( tu );
float* buff_tv = ( float * ) FLA_FLOAT_PTR( tv );
float* buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
F77_sgebrd( &m_A,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_tu,
buff_tv,
buff_work,
&lwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
double* buff_tu = ( double * ) FLA_DOUBLE_PTR( tu );
double* buff_tv = ( double * ) FLA_DOUBLE_PTR( tv );
double* buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
F77_dgebrd( &m_A,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_tu,
buff_tv,
buff_work,
&lwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
scomplex* buff_tu = ( scomplex * ) FLA_COMPLEX_PTR( tu );
scomplex* buff_tv = ( scomplex * ) FLA_COMPLEX_PTR( tv );
scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
F77_cgebrd( &m_A,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_tu,
buff_tv,
buff_work,
&lwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
dcomplex* buff_tu = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( tu );
dcomplex* buff_tv = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( tv );
dcomplex* buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
F77_zgebrd( &m_A,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_tu,
buff_tv,
buff_work,
&lwork,
&info );
break;
}
}
FLA_Obj_free( &d );
FLA_Obj_free( &e );
FLA_Obj_free( &work_obj );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Bidiag_check | ( | FLA_Obj | A, |
| FLA_Obj | tu, | ||
| FLA_Obj | tv | ||
| ) |
References FLA_Check_col_storage(), FLA_Check_col_vector(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim(), and FLA_Obj_min_dim().
Referenced by FLA_Bidiag_blk_external(), and FLA_Bidiag_unb_external().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, tu );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, tv );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_vector( tu );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_storage( tu );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_vector( tv );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_storage( tv );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( tu, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( tv, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Bidiag_form_U_check | ( | FLA_Obj | A, |
| FLA_Obj | t | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim_min(), and FLA_Obj_length().
Referenced by FLA_Bidiag_form_U_external().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, t );
FLA_Check_error_code( e_val );
//e_val = FLA_Check_square( A );
//FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim_min( t, FLA_Obj_length( A ) - 1 );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References F77_cungbr(), F77_dorgbr(), F77_sorgbr(), F77_zungbr(), FLA_Bidiag_form_U_check(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_min_dim(), FLA_Obj_vector_dim(), and FLA_Obj_width().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int m_A, n_A, k_A;
int cs_A;
int min_m_n;
int lwork;
FLA_Obj work;
char blas_vect = 'Q';
int i;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Bidiag_form_U_check( A, t );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
min_m_n = FLA_Obj_min_dim( A );
if ( blas_vect == 'Q' ) k_A = FLA_Obj_vector_dim( t );
else k_A = FLA_Obj_vector_dim( t ) + 1;
// Make a workspace query the first time through. This will provide us with
// and ideal workspace size based on an internal block size.
lwork = -1;
FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
for ( i = 0; i < 2; ++i )
{
if ( i == 1 )
{
// Grab the queried ideal workspace size from the work array, free the
// work object, and then re-allocate the workspace with the ideal size.
if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
lwork = ( int ) *FLA_FLOAT_PTR( work );
else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
lwork = ( int ) *FLA_DOUBLE_PTR( work );
FLA_Obj_free( &work );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
}
switch( datatype ){
case FLA_FLOAT:
{
float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
float* buff_t = ( float * ) FLA_FLOAT_PTR( t );
float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
F77_sorgbr( &blas_vect,
&m_A,
&n_A,
&k_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double* buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double* buff_work = ( double * ) FLA_DOUBLE_PTR( work );
F77_dorgbr( &blas_vect,
&m_A,
&n_A,
&k_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex* buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
F77_cungbr( &blas_vect,
&m_A,
&n_A,
&k_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work );
F77_zungbr( &blas_vect,
&m_A,
&n_A,
&k_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
}
}
FLA_Obj_free( &work );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Bidiag_form_V_check | ( | FLA_Obj | A, |
| FLA_Obj | t | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim_min(), and FLA_Obj_length().
Referenced by FLA_Bidiag_form_V_external().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, t );
FLA_Check_error_code( e_val );
//e_val = FLA_Check_square( A );
//FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim_min( t, FLA_Obj_length( A ) - 1 );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References F77_cungbr(), F77_dorgbr(), F77_sorgbr(), F77_zungbr(), FLA_Bidiag_form_V_check(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_min_dim(), FLA_Obj_vector_dim(), and FLA_Obj_width().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int m_A, n_A, k_A;
int cs_A;
int min_m_n;
int lwork;
FLA_Obj work;
char blas_vect = 'P';
int i;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Bidiag_form_V_check( A, t );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
min_m_n = FLA_Obj_min_dim( A );
if ( blas_vect == 'Q' ) k_A = FLA_Obj_vector_dim( t );
else k_A = FLA_Obj_vector_dim( t ) + 1;
// Make a workspace query the first time through. This will provide us with
// and ideal workspace size based on an internal block size.
lwork = -1;
FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
for ( i = 0; i < 2; ++i )
{
if ( i == 1 )
{
// Grab the queried ideal workspace size from the work array, free the
// work object, and then re-allocate the workspace with the ideal size.
if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
lwork = ( int ) *FLA_FLOAT_PTR( work );
else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
lwork = ( int ) *FLA_DOUBLE_PTR( work );
FLA_Obj_free( &work );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
}
switch( datatype ){
case FLA_FLOAT:
{
float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
float* buff_t = ( float * ) FLA_FLOAT_PTR( t );
float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
F77_sorgbr( &blas_vect,
&m_A,
&n_A,
&k_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double* buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double* buff_work = ( double * ) FLA_DOUBLE_PTR( work );
F77_dorgbr( &blas_vect,
&m_A,
&n_A,
&k_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex* buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
F77_cungbr( &blas_vect,
&m_A,
&n_A,
&k_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work );
F77_zungbr( &blas_vect,
&m_A,
&n_A,
&k_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
}
}
FLA_Obj_free( &work );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Bidiag_unb_external | ( | FLA_Obj | A, |
| FLA_Obj | tu, | ||
| FLA_Obj | tv | ||
| ) |
References F77_cgebd2(), F77_dgebd2(), F77_sgebd2(), F77_zgebd2(), FLA_Bidiag_check(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_max_dim(), FLA_Obj_min_dim(), and FLA_Obj_width().
Referenced by FLA_Bidiag_unb_ext().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int m_A, n_A, cs_A;
int min_m_n, max_m_n;
int lwork;
FLA_Obj d, e, work_obj;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Bidiag_check( A, tu, tv );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
min_m_n = FLA_Obj_min_dim( A );
max_m_n = FLA_Obj_max_dim( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), min_m_n, 1, 0, 0, &d );
FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), min_m_n - 1, 1, 0, 0, &e );
lwork = max_m_n;
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work_obj );
switch( datatype ){
case FLA_FLOAT:
{
float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
float* buff_tu = ( float * ) FLA_FLOAT_PTR( tu );
float* buff_tv = ( float * ) FLA_FLOAT_PTR( tv );
float* buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
F77_sgebd2( &m_A,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_tu,
buff_tv,
buff_work,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
double* buff_tu = ( double * ) FLA_DOUBLE_PTR( tu );
double* buff_tv = ( double * ) FLA_DOUBLE_PTR( tv );
double* buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
F77_dgebd2( &m_A,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_tu,
buff_tv,
buff_work,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
scomplex* buff_tu = ( scomplex * ) FLA_COMPLEX_PTR( tu );
scomplex* buff_tv = ( scomplex * ) FLA_COMPLEX_PTR( tv );
scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
F77_cgebd2( &m_A,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_tu,
buff_tv,
buff_work,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
dcomplex* buff_tu = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( tu );
dcomplex* buff_tv = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( tv );
dcomplex* buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
F77_zgebd2( &m_A,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_tu,
buff_tv,
buff_work,
&info );
break;
}
}
FLA_Obj_free( &d );
FLA_Obj_free( &e );
FLA_Obj_free( &work_obj );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Bidiag_UT_check | ( | FLA_Obj | A, |
| FLA_Obj | TU, | ||
| FLA_Obj | TV | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_min_dim().
Referenced by FLA_Bidiag_UT().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, TU );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, TV );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( TU, FLA_Obj_length( TV ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( TU, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( TV, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim(), and FLA_Obj_min_dim().
Referenced by FLA_Bidiag_UT_extract_diagonals().
{
FLA_Error e_val;
dim_t min_m_n;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
min_m_n = FLA_Obj_min_dim( A );
e_val = FLA_Check_nonconstant_object( d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( d, min_m_n );
FLA_Check_error_code( e_val );
if ( min_m_n > 1 )
{
e_val = FLA_Check_nonconstant_object( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( e, min_m_n - 1 );
FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
References FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), FLA_Check_vector_dim(), and FLA_Obj_min_dim().
Referenced by FLA_Bidiag_UT_extract_real_diagonals().
{
FLA_Error e_val;
dim_t min_m_n;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
min_m_n = FLA_Obj_min_dim( A );
e_val = FLA_Check_nonconstant_object( d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_real_object( d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( A, d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( d, min_m_n );
FLA_Check_error_code( e_val );
if ( min_m_n != 1 )
{
e_val = FLA_Check_nonconstant_object( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_real_object( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( A, e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( e, min_m_n - 1 );
FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Bidiag_UT_form_U_check | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | U | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_Bidiag_UT_form_U().
{
FLA_Error e_val;
dim_t m_A, n_A;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, U );
FLA_Check_error_code( e_val );
// U is not necessary to be square.
// e_val = FLA_Check_square( U );
// FLA_Check_error_code( e_val );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
// Form U has no problem in overwriting on A which contains house holder vectors
// on the lower triangular of the diagonal or subdiagonal.
if ( m_A >= n_A )
{
e_val = FLA_Check_object_width_equals( T, n_A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( U, m_A );
FLA_Check_error_code( e_val );
}
else
{
e_val = FLA_Check_object_width_equals( T, m_A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( U, m_A );
FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Bidiag_UT_form_V_check | ( | FLA_Obj | A, |
| FLA_Obj | S, | ||
| FLA_Obj | V | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_Bidiag_UT_form_V().
{
FLA_Error e_val;
dim_t m_A, n_A;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, V );
FLA_Check_error_code( e_val );
// U is not necessary to be square.
// e_val = FLA_Check_square( V );
// FLA_Check_error_code( e_val );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
// Form V (not V^H) has a problem that dimensions are mismatched
// when it overwrites on A that contains house holder vectors on
// the uppper triangular of the diagonal or subdiagonal.
if ( m_A >= n_A )
{
e_val = FLA_Check_object_width_equals( T, n_A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( V, n_A );
FLA_Check_error_code( e_val );
}
else
{
e_val = FLA_Check_object_width_equals( T, m_A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( V, n_A );
FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Bidiag_UT_internal_check | ( | FLA_Obj | A, |
| FLA_Obj | TU, | ||
| FLA_Obj | TV, | ||
| fla_bidiagut_t * | cntl | ||
| ) |
References FLA_Check_identical_object_elemtype(), and FLA_Check_null_pointer().
Referenced by FLA_Bidiag_UT_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( A, TU );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( A, TV );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Bidiag_UT_realify_check | ( | FLA_Obj | A, |
| FLA_Obj | d, | ||
| FLA_Obj | e | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim(), and FLA_Obj_min_dim().
Referenced by FLA_Bidiag_UT_realify().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( d, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( e, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Bidiag_UT_realify_diagonals_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | a, | ||
| FLA_Obj | b, | ||
| FLA_Obj | d, | ||
| FLA_Obj | e | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_valid_uplo(), FLA_Check_vector_dim(), and FLA_Obj_vector_dim().
Referenced by FLA_Bidiag_UT_realify_diagonals().
{
FLA_Error e_val;
dim_t m_a;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( a );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( a );
FLA_Check_error_code( e_val );
m_a = FLA_Obj_vector_dim( a );
if ( m_a > 1 )
{
e_val = FLA_Check_floating_object( b );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( b );
FLA_Check_error_code( e_val );
}
e_val = FLA_Check_identical_object_datatype( a, d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( a, e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( d, m_a );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( e, m_a );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_if_vector(), FLA_Check_object_width_equals(), FLA_Obj_vector_dim(), and FLA_Obj_width().
Referenced by FLA_Bidiag_UT_recover_tau().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( TU );
FLA_Check_error_code( e_val );
e_val = FLA_Check_consistent_object_datatype( TU, TV );
FLA_Check_error_code( e_val );
e_val = FLA_Check_consistent_object_datatype( TU, tu );
FLA_Check_error_code( e_val );
e_val = FLA_Check_consistent_object_datatype( TU, tv );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( tu );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( tv );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( TU, FLA_Obj_width( TV ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( TU, FLA_Obj_vector_dim( tu ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( TV, FLA_Obj_vector_dim( tv ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Bidiag_UT_scale_diagonals_check | ( | FLA_Obj | alpha, |
| FLA_Obj | A | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_nonconstant_object(), and FLA_Check_real_object().
Referenced by FLA_Bidiag_UT_scale_diagonals().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_real_object( alpha );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_scalar( alpha );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( A, alpha );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Bsvd_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | d, | ||
| FLA_Obj | e, | ||
| FLA_Obj | G, | ||
| FLA_Obj | H, | ||
| FLA_Svd_type | jobu, | ||
| FLA_Obj | U, | ||
| FLA_Svd_type | jobv, | ||
| FLA_Obj | V | ||
| ) |
References FLA_Check_complex_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_real_object(), FLA_Check_valid_svd_type(), FLA_Check_valid_uplo(), FLA_Check_vector_dim(), FLA_Obj_has_zero_dim(), and FLA_Obj_vector_dim().
Referenced by FLA_Bsvd(), and FLA_Bsvd_ext_check().
{
FLA_Error e_val = FLA_SUCCESS;
dim_t m_d, m_e;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_real_object( d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( d );
FLA_Check_error_code( e_val );
m_d = FLA_Obj_vector_dim( d );
m_e = ( m_d - 1 );
if ( m_e > 0 )
{
e_val = FLA_Check_real_object( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( d, e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( e, m_e );
FLA_Check_error_code( e_val );
}
if ( m_e > 0 )
{
e_val = FLA_Check_complex_object( G );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( d, G );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( G, m_e );
FLA_Check_error_code( e_val );
}
if ( m_e > 0 )
{
e_val = FLA_Check_complex_object( H );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( d, H );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( H, m_e );
FLA_Check_error_code( e_val );
}
FLA_Check_valid_svd_type( jobu );
FLA_Check_error_code( e_val );
FLA_Check_valid_svd_type( jobv );
FLA_Check_error_code( e_val );
if ( jobu != FLA_SVD_VECTORS_NONE && FLA_Obj_has_zero_dim( U ) == FALSE )
{
FLA_Check_identical_object_precision( d, U );
FLA_Check_error_code( e_val );
}
if ( jobv != FLA_SVD_VECTORS_NONE && FLA_Obj_has_zero_dim( V ) == FALSE )
{
FLA_Check_identical_object_precision( d, V );
FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Bsvd_compute_scaling_check | ( | FLA_Obj | d, |
| FLA_Obj | e, | ||
| FLA_Obj | sigma | ||
| ) |
| FLA_Error FLA_Bsvd_ext_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | d, | ||
| FLA_Obj | e, | ||
| FLA_Obj | G, | ||
| FLA_Obj | H, | ||
| FLA_Svd_type | jobu, | ||
| FLA_Obj | U, | ||
| FLA_Svd_type | jobv, | ||
| FLA_Obj | V, | ||
| FLA_Bool | apply_Uh2C, | ||
| FLA_Obj | C | ||
| ) |
References FLA_Bsvd_check(), FLA_Check_identical_object_datatype(), FLA_Check_object_length_equals(), and FLA_Obj_length().
Referenced by FLA_Bsvd_ext().
{
FLA_Error e_val = FLA_SUCCESS;
FLA_Bsvd_check( uplo, d, e, G, H, jobu, U, jobv, V );
if ( apply_Uh2C != FALSE )
{
FLA_Check_identical_object_datatype( U, C );
FLA_Check_error_code( e_val );
FLA_Check_object_length_equals( C, FLA_Obj_length( U ) );
FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
References F77_cbdsqr(), F77_dbdsqr(), F77_sbdsqr(), F77_zbdsqr(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), and FLA_Param_map_flame_to_netlib_uplo().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
FLA_Datatype dt_real;
int m_U, cs_U;
int n_V, cs_V;
int n_C, cs_C;
int min_m_n;
int inc_d, inc_e;
int lrwork;
FLA_Obj rwork;
char blas_uplo;
//if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
// FLA_Hevd_check( jobz, uplo, A, e );
if ( FLA_Obj_has_zero_dim( d ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( U );
dt_real = FLA_Obj_datatype_proj_to_real( U );
m_U = FLA_Obj_length( U );
cs_U = FLA_Obj_col_stride( U );
n_V = FLA_Obj_length( V );
cs_V = FLA_Obj_col_stride( V );
n_C = 0;
cs_C = 1;
min_m_n = FLA_Obj_vector_dim( d );
inc_d = FLA_Obj_vector_inc( d );
inc_e = FLA_Obj_vector_inc( e );
lrwork = max( 1, 4 * min_m_n - 4 );
FLA_Obj_create( dt_real, lrwork, 1, 0, 0, &rwork );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
switch( datatype ) {
case FLA_FLOAT:
{
float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
float* buff_U = ( float * ) FLA_FLOAT_PTR( U );
float* buff_V = ( float * ) FLA_FLOAT_PTR( V );
float* buff_C = ( float * ) NULL;
float* buff_rwork = ( float * ) FLA_FLOAT_PTR( rwork );
F77_sbdsqr( &blas_uplo,
&min_m_n,
&n_V,
&m_U,
&n_C,
buff_d,
buff_e,
buff_V, &cs_V,
buff_U, &cs_U,
buff_C, &cs_C,
buff_rwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
double* buff_U = ( double * ) FLA_DOUBLE_PTR( U );
double* buff_V = ( double * ) FLA_DOUBLE_PTR( V );
double* buff_C = ( double * ) NULL;
double* buff_rwork = ( double * ) FLA_DOUBLE_PTR( rwork );
F77_dbdsqr( &blas_uplo,
&min_m_n,
&n_V,
&m_U,
&n_C,
buff_d,
buff_e,
buff_V, &cs_V,
buff_U, &cs_U,
buff_C, &cs_C,
buff_rwork,
&info );
break;
}
case FLA_COMPLEX:
{
float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
scomplex* buff_U = ( scomplex * ) FLA_COMPLEX_PTR( U );
scomplex* buff_V = ( scomplex * ) FLA_COMPLEX_PTR( V );
scomplex* buff_C = ( scomplex * ) NULL;
float* buff_rwork = ( float * ) FLA_FLOAT_PTR( rwork );
F77_cbdsqr( &blas_uplo,
&min_m_n,
&n_V,
&m_U,
&n_C,
buff_d,
buff_e,
buff_V, &cs_V,
buff_U, &cs_U,
buff_C, &cs_C,
buff_rwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
dcomplex* buff_U = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( U );
dcomplex* buff_V = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( V );
dcomplex* buff_C = ( dcomplex * ) NULL;
double* buff_rwork = ( double * ) FLA_DOUBLE_PTR( rwork );
F77_zbdsqr( &blas_uplo,
&min_m_n,
&n_V,
&m_U,
&n_C,
buff_d,
buff_e,
buff_V, &cs_V,
buff_U, &cs_U,
buff_C, &cs_C,
buff_rwork,
&info );
break;
}
}
FLA_Obj_free( &rwork );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
References F77_dbdsdc(), F77_sbdsdc(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), and FLA_Param_map_flame_to_netlib_uplo().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
FLA_Datatype dt_real;
int m_U, cs_U;
int n_V, cs_V;
int n_C, cs_C;
int min_m_n;
int inc_d, inc_e;
int lwork, liwork;
FLA_Obj work, iwork;
char blas_uplo;
char blas_compq = 'I';
//if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
// FLA_Bsvd_check( uplo, d, e, U, V );
if ( FLA_Obj_has_zero_dim( d ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( U );
dt_real = FLA_Obj_datatype_proj_to_real( U );
m_U = FLA_Obj_length( U );
cs_U = FLA_Obj_col_stride( U );
n_V = FLA_Obj_length( V );
cs_V = FLA_Obj_col_stride( V );
n_C = 0;
cs_C = 1;
min_m_n = FLA_Obj_vector_dim( d );
inc_d = FLA_Obj_vector_inc( d );
inc_e = FLA_Obj_vector_inc( e );
lwork = max( 1, 3*min_m_n*min_m_n + 4*min_m_n );
liwork = 8*min_m_n;
FLA_Obj_create( dt_real, lwork, 1, 0, 0, &work );
FLA_Obj_create( FLA_INT, liwork, 1, 0, 0, &iwork );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
switch( datatype ) {
case FLA_FLOAT:
{
float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
float* buff_U = ( float * ) FLA_FLOAT_PTR( U );
float* buff_V = ( float * ) FLA_FLOAT_PTR( V );
float* buff_Q = ( float * ) NULL;
float* buff_IQ = ( float * ) NULL;
float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
int* buff_iwork = ( int * ) FLA_INT_PTR( iwork );
F77_sbdsdc( &blas_uplo,
&blas_compq,
&min_m_n,
buff_d,
buff_e,
buff_U, &cs_U,
buff_V, &cs_V,
buff_Q,
buff_IQ,
buff_work,
buff_iwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
double* buff_U = ( double * ) FLA_DOUBLE_PTR( U );
double* buff_V = ( double * ) FLA_DOUBLE_PTR( V );
double* buff_Q = ( double * ) NULL;
double* buff_IQ = ( double * ) NULL;
double* buff_work = ( double * ) FLA_DOUBLE_PTR( work );
int* buff_iwork = ( int * ) FLA_INT_PTR( iwork );
F77_dbdsdc( &blas_uplo,
&blas_compq,
&min_m_n,
buff_d,
buff_e,
buff_U, &cs_U,
buff_V, &cs_V,
buff_Q,
buff_IQ,
buff_work,
buff_iwork,
&info );
break;
}
}
FLA_Obj_free( &work );
FLA_Obj_free( &iwork );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_CAQR2_UT_check | ( | FLA_Obj | B, |
| FLA_Obj | D, | ||
| FLA_Obj | T | ||
| ) |
| FLA_Error FLA_CAQR2_UT_internal_check | ( | FLA_Obj | B, |
| FLA_Obj | D, | ||
| FLA_Obj | T, | ||
| fla_caqr2ut_t * | cntl | ||
| ) |
References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_width_equals(), and FLA_Obj_width().
Referenced by FLA_CAQR2_UT_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( B, D );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( B, T );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects. This check works regardless
// of whether the element type is FLA_MATRIX or FLA_SCALAR because the
// element length and width are used instead of scalar length and width.
e_val = FLA_Check_object_width_equals( B, FLA_Obj_width( B ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( D, FLA_Obj_width( D ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_CAQR2_UT_task | ( | FLA_Obj | B, |
| FLA_Obj | D, | ||
| FLA_Obj | T, | ||
| fla_caqr2ut_t * | cntl | ||
| ) |
References FLA_CAQR2_UT_internal().
Referenced by FLASH_Queue_exec_task().
{
return FLA_CAQR2_UT_internal( B, D, T,
fla_caqr2ut_cntl_leaf );
}
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_min(), and FLA_Obj_width().
Referenced by FLASH_CAQR_UT_inc_noopt().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, ATW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, RTW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, ATW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, RTW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_min( A, FLA_Obj_width( A ) * p );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_CAQR_UT_inc_solve_check | ( | dim_t | p, |
| FLA_Obj | A, | ||
| FLA_Obj | ATW, | ||
| FLA_Obj | R, | ||
| FLA_Obj | RTW, | ||
| FLA_Obj | B, | ||
| FLA_Obj | X | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_length_min(), and FLA_Obj_width().
Referenced by FLASH_CAQR_UT_inc_solve().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, ATW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, RTW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, X );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, ATW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, RTW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_min( A, FLA_Obj_width( A ) * p );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Check_error_level(), FLA_Chol_check(), and FLA_Chol_internal().
{
FLA_Error r_val;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Chol_check( uplo, A );
// Invoke FLA_Chol_internal() with the appropriate control tree.
r_val = FLA_Chol_internal( uplo, A, fla_chol_cntl2 );
//r_val = FLA_Chol_internal( uplo, A, fla_chol_cntl );
return r_val;
}
| FLA_Error FLA_Chol_blk_external | ( | FLA_Uplo | uplo, |
| FLA_Obj | A | ||
| ) |
References F77_cpotrf(), F77_dpotrf(), F77_spotrf(), F77_zpotrf(), FLA_Check_error_level(), FLA_Chol_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), and FLA_Param_map_flame_to_netlib_uplo().
Referenced by FLA_Chol_l_blk_ext(), FLA_Chol_u_blk_ext(), and FLA_SPDinv_blk_external().
{
FLA_Error r_val = FLA_SUCCESS;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
int info;
FLA_Datatype datatype;
int m_A, cs_A;
char blas_uplo;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Chol_check( uplo, A );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
F77_spotrf( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
F77_dpotrf( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
F77_cpotrf( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
F77_zpotrf( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
}
// Convert to zero-based indexing, if an index was reported.
if ( info > 0 ) r_val = info - 1;
else r_val = FLA_SUCCESS;
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return r_val;
}
| FLA_Error FLA_Chol_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | A | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().
Referenced by FLA_Chol(), FLA_Chol_blk_external(), FLA_Chol_unb_external(), and FLASH_Chol().
{
FLA_Error e_val;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Chol_internal_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| fla_chol_t * | cntl | ||
| ) |
References FLA_Check_null_pointer().
Referenced by FLA_Chol_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Chol_blk_external().
Referenced by FLA_Chol_l().
{
return FLA_Chol_blk_external( FLA_LOWER_TRIANGULAR, A );
}
| FLA_Error FLA_Chol_l_task | ( | FLA_Obj | A, |
| fla_chol_t * | cntl | ||
| ) |
References FLA_Chol_internal().
{
//return FLA_Chol_unb_external( FLA_LOWER_TRIANGULAR, A );
return FLA_Chol_internal( FLA_LOWER_TRIANGULAR, A,
fla_chol_cntl_leaf );
}
References FLA_Chol_unb_external().
Referenced by FLA_Chol_l().
{
return FLA_Chol_unb_external( FLA_LOWER_TRIANGULAR, A );
}
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().
Referenced by FLA_Chol_solve(), and FLASH_Chol_solve().
{
FLA_Error e_val;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, X );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Chol_task | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| fla_chol_t * | cntl | ||
| ) |
References FLA_Chol_internal().
Referenced by FLASH_Queue_exec_task().
{
return FLA_Chol_internal( uplo, A,
fla_chol_cntl_leaf );
}
References FLA_Chol_blk_external().
Referenced by FLA_Chol_u().
{
return FLA_Chol_blk_external( FLA_UPPER_TRIANGULAR, A );
}
| FLA_Error FLA_Chol_u_task | ( | FLA_Obj | A, |
| fla_chol_t * | cntl | ||
| ) |
References FLA_Chol_internal().
{
//return FLA_Chol_unb_external( FLA_UPPER_TRIANGULAR, A );
return FLA_Chol_internal( FLA_UPPER_TRIANGULAR, A,
fla_chol_cntl_leaf );
}
References FLA_Chol_unb_external().
Referenced by FLA_Chol_u().
{
return FLA_Chol_unb_external( FLA_UPPER_TRIANGULAR, A );
}
| FLA_Error FLA_Chol_unb_external | ( | FLA_Uplo | uplo, |
| FLA_Obj | A | ||
| ) |
References F77_cpotf2(), F77_dpotf2(), F77_spotf2(), F77_zpotf2(), FLA_Check_error_level(), FLA_Chol_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), and FLA_Param_map_flame_to_netlib_uplo().
Referenced by FLA_Chol_l_unb_ext(), and FLA_Chol_u_unb_ext().
{
FLA_Error r_val = FLA_SUCCESS;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
int info;
FLA_Datatype datatype;
int m_A, cs_A;
char blas_uplo;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Chol_check( uplo, A );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
F77_spotf2( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
F77_dpotf2( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
F77_cpotf2( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
F77_zpotf2( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
}
// Convert to zero-based indexing, if an index was reported.
if ( info > 0 ) r_val = info - 1;
else r_val = FLA_SUCCESS;
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return r_val;
}
References FLA_Check_error_level(), FLA_Eig_gest_check(), FLA_Eig_gest_internal(), FLA_Obj_create_conf_to(), and FLA_Obj_free().
{
FLA_Obj Y;
FLA_Error r_val;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Eig_gest_check( inv, uplo, A, B );
FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, A, &Y );
// Invoke FLA_Eig_gest_internal() with the appropriate control tree.
if ( inv == FLA_INVERSE )
r_val = FLA_Eig_gest_internal( inv, uplo, A, Y, B, fla_eig_gest_ix_cntl );
else
r_val = FLA_Eig_gest_internal( inv, uplo, A, Y, B, fla_eig_gest_nx_cntl );
FLA_Obj_free( &Y );
return r_val;
}
References F77_chegst(), F77_dsygst(), F77_ssygst(), F77_zhegst(), FLA_Check_error_level(), FLA_Eig_gest_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), and FLA_Param_map_flame_to_netlib_uplo().
Referenced by FLA_Eig_gest_il_blk_ext(), FLA_Eig_gest_iu_blk_ext(), FLA_Eig_gest_nl_blk_ext(), and FLA_Eig_gest_nu_blk_ext().
{
FLA_Error r_val = FLA_SUCCESS;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
int itype;
int info;
FLA_Datatype datatype;
int m_A, cs_A;
int cs_B;
char blas_uplo;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Eig_gest_check( inv, uplo, A, B );
// if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
if ( inv == FLA_INVERSE )
itype = 1;
else
itype = 2;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
cs_A = FLA_Obj_col_stride( A );
cs_B = FLA_Obj_col_stride( B );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
F77_ssygst( &itype,
&blas_uplo,
&m_A,
buff_A, &cs_A,
buff_B, &cs_B,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
F77_dsygst( &itype,
&blas_uplo,
&m_A,
buff_A, &cs_A,
buff_B, &cs_B,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
F77_chegst( &itype,
&blas_uplo,
&m_A,
buff_A, &cs_A,
buff_B, &cs_B,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
F77_zhegst( &itype,
&blas_uplo,
&m_A,
buff_A, &cs_A,
buff_B, &cs_B,
&info );
break;
}
}
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return r_val;
}
References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_inverse(), and FLA_Check_valid_uplo().
Referenced by FLA_Eig_gest(), FLA_Eig_gest_blk_external(), FLA_Eig_gest_unb_external(), and FLASH_Eig_gest().
{
FLA_Error e_val;
e_val = FLA_Check_valid_inverse( inv );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( B );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Eig_gest_il_blk_ext | ( | FLA_Obj | A, |
| FLA_Obj | B | ||
| ) |
References FLA_Eig_gest_blk_external().
Referenced by FLA_Eig_gest_il().
{
return FLA_Eig_gest_blk_external( FLA_INVERSE, FLA_LOWER_TRIANGULAR, A, B );
}
| FLA_Error FLA_Eig_gest_il_task | ( | FLA_Obj | A, |
| FLA_Obj | Y, | ||
| FLA_Obj | B, | ||
| fla_eig_gest_t * | cntl | ||
| ) |
References FLA_Eig_gest_internal().
{
//return FLA_Eig_gest_unb_external( FLA_INVERSE, FLA_LOWER_TRIANGULAR, A, B );
return FLA_Eig_gest_internal( FLA_INVERSE, FLA_LOWER_TRIANGULAR, A, Y, B,
fla_eig_gest_ix_cntl_leaf );
}
| FLA_Error FLA_Eig_gest_il_unb_ext | ( | FLA_Obj | A, |
| FLA_Obj | B | ||
| ) |
References FLA_Eig_gest_unb_external().
Referenced by FLA_Eig_gest_il().
{
return FLA_Eig_gest_unb_external( FLA_INVERSE, FLA_LOWER_TRIANGULAR, A, B );
}
| FLA_Error FLA_Eig_gest_internal_check | ( | FLA_Inv | inv, |
| FLA_Uplo | uplo, | ||
| FLA_Obj | A, | ||
| FLA_Obj | Y, | ||
| FLA_Obj | B, | ||
| fla_eig_gest_t * | cntl | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_Eig_gest_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( A, Y );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( A, B );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects. This check works regardless
// of whether the element type is FLA_MATRIX or FLA_SCALAR because the
// element length and width are used instead of scalar length and width.
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, B );
FLA_Check_error_code( e_val );
if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 ||
FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 )
{
e_val = FLA_Check_object_width_equals( Y, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
}
else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT4 ||
FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT5 )
{
e_val = FLA_Check_object_length_equals( Y, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
}
else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT3 )
{
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, Y, A );
FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Eig_gest_iu_blk_ext | ( | FLA_Obj | A, |
| FLA_Obj | B | ||
| ) |
References FLA_Eig_gest_blk_external().
Referenced by FLA_Eig_gest_iu().
{
return FLA_Eig_gest_blk_external( FLA_INVERSE, FLA_UPPER_TRIANGULAR, A, B );
}
| FLA_Error FLA_Eig_gest_iu_task | ( | FLA_Obj | A, |
| FLA_Obj | Y, | ||
| FLA_Obj | B, | ||
| fla_eig_gest_t * | cntl | ||
| ) |
References FLA_Eig_gest_internal().
{
//return FLA_Eig_gest_unb_external( FLA_INVERSE, FLA_UPPER_TRIANGULAR, A, B );
return FLA_Eig_gest_internal( FLA_INVERSE, FLA_UPPER_TRIANGULAR, A, Y, B,
fla_eig_gest_ix_cntl_leaf );
}
| FLA_Error FLA_Eig_gest_iu_unb_ext | ( | FLA_Obj | A, |
| FLA_Obj | B | ||
| ) |
References FLA_Eig_gest_unb_external().
Referenced by FLA_Eig_gest_iu().
{
return FLA_Eig_gest_unb_external( FLA_INVERSE, FLA_UPPER_TRIANGULAR, A, B );
}
| FLA_Error FLA_Eig_gest_nl_blk_ext | ( | FLA_Obj | A, |
| FLA_Obj | B | ||
| ) |
References FLA_Eig_gest_blk_external().
Referenced by FLA_Eig_gest_nl().
{
return FLA_Eig_gest_blk_external( FLA_NO_INVERSE, FLA_LOWER_TRIANGULAR, A, B );
}
| FLA_Error FLA_Eig_gest_nl_task | ( | FLA_Obj | A, |
| FLA_Obj | Y, | ||
| FLA_Obj | B, | ||
| fla_eig_gest_t * | cntl | ||
| ) |
References FLA_Eig_gest_internal().
{
//return FLA_Eig_gest_unb_external( FLA_NO_INVERSE, FLA_LOWER_TRIANGULAR, A, B );
return FLA_Eig_gest_internal( FLA_NO_INVERSE, FLA_LOWER_TRIANGULAR, A, Y, B,
fla_eig_gest_nx_cntl_leaf );
}
| FLA_Error FLA_Eig_gest_nl_unb_ext | ( | FLA_Obj | A, |
| FLA_Obj | B | ||
| ) |
References FLA_Eig_gest_unb_external().
Referenced by FLA_Eig_gest_nl().
{
return FLA_Eig_gest_unb_external( FLA_NO_INVERSE, FLA_LOWER_TRIANGULAR, A, B );
}
| FLA_Error FLA_Eig_gest_nu_blk_ext | ( | FLA_Obj | A, |
| FLA_Obj | B | ||
| ) |
References FLA_Eig_gest_blk_external().
Referenced by FLA_Eig_gest_nu().
{
return FLA_Eig_gest_blk_external( FLA_NO_INVERSE, FLA_UPPER_TRIANGULAR, A, B );
}
| FLA_Error FLA_Eig_gest_nu_task | ( | FLA_Obj | A, |
| FLA_Obj | Y, | ||
| FLA_Obj | B, | ||
| fla_eig_gest_t * | cntl | ||
| ) |
References FLA_Eig_gest_internal().
{
//return FLA_Eig_gest_unb_external( FLA_NO_INVERSE, FLA_UPPER_TRIANGULAR, A, B );
return FLA_Eig_gest_internal( FLA_NO_INVERSE, FLA_UPPER_TRIANGULAR, A, Y, B,
fla_eig_gest_nx_cntl_leaf );
}
| FLA_Error FLA_Eig_gest_nu_unb_ext | ( | FLA_Obj | A, |
| FLA_Obj | B | ||
| ) |
References FLA_Eig_gest_unb_external().
Referenced by FLA_Eig_gest_nu().
{
return FLA_Eig_gest_unb_external( FLA_NO_INVERSE, FLA_UPPER_TRIANGULAR, A, B );
}
| FLA_Error FLA_Eig_gest_task | ( | FLA_Inv | inv, |
| FLA_Uplo | uplo, | ||
| FLA_Obj | A, | ||
| FLA_Obj | Y, | ||
| FLA_Obj | B, | ||
| fla_eig_gest_t * | cntl | ||
| ) |
References FLA_Eig_gest_internal(), fla_eig_gest_ix_cntl_leaf, and fla_eig_gest_nx_cntl_leaf.
Referenced by FLASH_Queue_exec_task().
{
fla_eig_gest_t* cntl_leaf;
if ( inv == FLA_INVERSE )
cntl_leaf = fla_eig_gest_ix_cntl_leaf;
else
cntl_leaf = fla_eig_gest_nx_cntl_leaf;
return FLA_Eig_gest_internal( inv, uplo, A, Y, B,
cntl_leaf );
}
References F77_chegs2(), F77_dsygs2(), F77_ssygs2(), F77_zhegs2(), FLA_Check_error_level(), FLA_Eig_gest_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), and FLA_Param_map_flame_to_netlib_uplo().
Referenced by FLA_Eig_gest_il_unb_ext(), FLA_Eig_gest_iu_unb_ext(), FLA_Eig_gest_nl_unb_ext(), and FLA_Eig_gest_nu_unb_ext().
{
FLA_Error r_val = FLA_SUCCESS;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
int itype;
int info;
FLA_Datatype datatype;
int m_A, cs_A;
int cs_B;
char blas_uplo;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Eig_gest_check( inv, uplo, A, B );
// if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
if ( inv == FLA_INVERSE )
itype = 1;
else
itype = 2;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
cs_A = FLA_Obj_col_stride( A );
cs_B = FLA_Obj_col_stride( B );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
F77_ssygs2( &itype,
&blas_uplo,
&m_A,
buff_A, &cs_A,
buff_B, &cs_B,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
F77_dsygs2( &itype,
&blas_uplo,
&m_A,
buff_A, &cs_A,
buff_B, &cs_B,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
F77_chegs2( &itype,
&blas_uplo,
&m_A,
buff_A, &cs_A,
buff_B, &cs_B,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
F77_zhegs2( &itype,
&blas_uplo,
&m_A,
buff_A, &cs_A,
buff_B, &cs_B,
&info );
break;
}
}
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return r_val;
}
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_square(), and FLA_Obj_length().
Referenced by FLASH_FS_incpiv().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, L );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_int_object( p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, L );
FLA_Check_error_code( e_val );
//e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, B );
//FLA_Check_error_code( e_val );
// Until we update FS_incpiv to support multiple right-hand sides, we force B
// to have only one column (ie: we force B to be a vector).
e_val = FLA_Check_object_length_equals( B, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( B, 1 );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Hess_blk_external | ( | FLA_Obj | A, |
| FLA_Obj | t, | ||
| int | ilo, | ||
| int | ihi | ||
| ) |
References F77_cgehrd(), F77_dgehrd(), F77_sgehrd(), F77_zgehrd(), FLA_Check_error_level(), FLA_Hess_check(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_width(), and FLA_Query_blocksize().
Referenced by FLA_Hess_blk_ext().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int n_A, cs_A;
int lwork;
FLA_Obj work_obj;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Hess_check( A, t, ilo, ihi );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
lwork = n_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work_obj );
// Shift ilo and ihi from zero-based indexing to one-based indexing.
ilo += 1;
ihi += 1;
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
F77_sgehrd( &n_A,
&ilo,
&ihi,
buff_A, &cs_A,
buff_t,
buff_work,
&lwork,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
F77_dgehrd( &n_A,
&ilo,
&ihi,
buff_A, &cs_A,
buff_t,
buff_work,
&lwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
F77_cgehrd( &n_A,
&ilo,
&ihi,
buff_A, &cs_A,
buff_t,
buff_work,
&lwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
F77_zgehrd( &n_A,
&ilo,
&ihi,
buff_A, &cs_A,
buff_t,
buff_work,
&lwork,
&info );
break;
}
}
FLA_Obj_free( &work_obj );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Hess_check | ( | FLA_Obj | A, |
| FLA_Obj | t, | ||
| int | ilo, | ||
| int | ihi | ||
| ) |
References FLA_Check_col_storage(), FLA_Check_floating_object(), FLA_Check_hess_indices(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim_min(), and FLA_Obj_length().
Referenced by FLA_Hess_blk_external(), and FLA_Hess_unb_external().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim_min( t, FLA_Obj_length( A ) - 1 );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_storage( t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_hess_indices( A, ilo, ihi );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Hess_unb_external | ( | FLA_Obj | A, |
| FLA_Obj | t, | ||
| int | ilo, | ||
| int | ihi | ||
| ) |
References F77_cgehd2(), F77_dgehd2(), F77_sgehd2(), F77_zgehd2(), FLA_Check_error_level(), FLA_Hess_check(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), and FLA_Obj_width().
Referenced by FLA_Hess_unb_ext().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int n_A, cs_A;
FLA_Obj work_obj;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Hess_check( A, t, ilo, ihi );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Obj_create( datatype, n_A, 1, 0, 0, &work_obj );
// Shift ilo and ihi from zero-based indexing to one-based indexing.
ilo += 1;
ihi += 1;
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
F77_sgehd2( &n_A,
&ilo,
&ihi,
buff_A, &cs_A,
buff_t,
buff_work,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
F77_dgehd2( &n_A,
&ilo,
&ihi,
buff_A, &cs_A,
buff_t,
buff_work,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
F77_cgehd2( &n_A,
&ilo,
&ihi,
buff_A, &cs_A,
buff_t,
buff_work,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
F77_zgehd2( &n_A,
&ilo,
&ihi,
buff_A, &cs_A,
buff_t,
buff_work,
&info );
break;
}
}
FLA_Obj_free( &work_obj );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Hess_UT | ( | FLA_Obj | A, |
| FLA_Obj | T | ||
| ) |
{
FLA_Error r_val;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Hess_UT_check( A, T );
// Invoke FLA_Hess_UT_internal() with the standard control tree.
r_val = FLA_Hess_UT_internal( A, T, fla_hessut_cntl_leaf );
return r_val;
}
| FLA_Error FLA_Hess_UT_check | ( | FLA_Obj | A, |
| FLA_Obj | T | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), FLA_Check_square(), and FLA_Obj_width().
Referenced by FLA_Hess_UT().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( T, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Hess_UT_internal_check | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| fla_hessut_t * | cntl | ||
| ) |
References FLA_Check_identical_object_elemtype(), and FLA_Check_null_pointer().
Referenced by FLA_Hess_UT_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( A, T );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Hess_UT_recover_tau_check | ( | FLA_Obj | T, |
| FLA_Obj | tau | ||
| ) |
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_if_vector(), FLA_Check_object_width_equals(), and FLA_Obj_vector_dim().
Referenced by FLA_Hess_UT_recover_tau().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_consistent_object_datatype( T, tau );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( tau );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( T, FLA_Obj_vector_dim( tau ) + 1 );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Hevd_check | ( | FLA_Evd_type | jobz, |
| FLA_Uplo | uplo, | ||
| FLA_Obj | A, | ||
| FLA_Obj | l | ||
| ) |
References FLA_Check_col_storage(), FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), FLA_Check_square(), FLA_Check_valid_evd_type(), FLA_Check_valid_uplo(), FLA_Check_vector_dim(), and FLA_Obj_length().
Referenced by FLA_Hevd(), and FLA_Hevd_external().
{
FLA_Error e_val;
e_val = FLA_Check_valid_evd_type( jobz );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_real_object( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( A, e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( e, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_storage( e );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Hevd_compute_scaling_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| FLA_Obj | sigma | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), and FLA_Check_valid_uplo().
Referenced by FLA_Hevd_compute_scaling().
{
FLA_Error e_val;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_real_object( sigma );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( sigma );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( A, sigma );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_scalar( sigma );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Hevd_external | ( | FLA_Evd_type | jobz, |
| FLA_Uplo | uplo, | ||
| FLA_Obj | A, | ||
| FLA_Obj | l | ||
| ) |
References F77_cheev(), F77_dsyev(), F77_ssyev(), F77_zheev(), FLA_Check_error_level(), FLA_Hevd_check(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_evd_type(), and FLA_Param_map_flame_to_netlib_uplo().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
FLA_Datatype dt_real;
int n_A, cs_A;
int lwork, lrwork;
FLA_Obj work, rwork;
char blas_jobz;
char blas_uplo;
int i;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Hevd_check( jobz, uplo, A, e );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
dt_real = FLA_Obj_datatype_proj_to_real( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
// Allocate the rwork array up front since its size is not dependent on
// internal block sizes.
lrwork = max( 1, 3 * n_A - 2 );
FLA_Obj_create( dt_real, lrwork, 1, 0, 0, &rwork );
FLA_Param_map_flame_to_netlib_evd_type( jobz, &blas_jobz );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
// Make a workspace query the first time through. This will provide us with
// and ideal workspace size based on an internal block size.
lwork = -1;
FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
for ( i = 0; i < 2; ++i )
{
if ( i == 1 )
{
// Grab the queried ideal workspace size from the work array, free the
// work object, and then re-allocate the workspace with the ideal size.
if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
lwork = ( int ) *FLA_FLOAT_PTR( work );
else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
lwork = ( int ) *FLA_DOUBLE_PTR( work );
FLA_Obj_free( &work );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
}
switch( datatype ) {
case FLA_FLOAT:
{
float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
float* buff_rwork = ( float * ) FLA_FLOAT_PTR( rwork );
F77_ssyev( &blas_jobz,
&blas_uplo,
&n_A,
buff_A, &cs_A,
buff_e,
buff_work, &lwork,
buff_rwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
double* buff_work = ( double * ) FLA_DOUBLE_PTR( work );
double* buff_rwork = ( double * ) FLA_DOUBLE_PTR( rwork );
F77_dsyev( &blas_jobz,
&blas_uplo,
&n_A,
buff_A, &cs_A,
buff_e,
buff_work, &lwork,
buff_rwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
float* buff_rwork = ( float * ) FLA_FLOAT_PTR( rwork );
F77_cheev( &blas_jobz,
&blas_uplo,
&n_A,
buff_A, &cs_A,
buff_e,
buff_work, &lwork,
buff_rwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
double* buff_e = ( double* ) FLA_DOUBLE_PTR( e );
dcomplex* buff_work = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( work );
double* buff_rwork = ( double* ) FLA_DOUBLE_PTR( rwork );
F77_zheev( &blas_jobz,
&blas_uplo,
&n_A,
buff_A, &cs_A,
buff_e,
buff_work, &lwork,
buff_rwork,
&info );
break;
}
}
}
FLA_Obj_free( &work );
FLA_Obj_free( &rwork );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Hevdd_check | ( | FLA_Evd_type | jobz, |
| FLA_Uplo | uplo, | ||
| FLA_Obj | A, | ||
| FLA_Obj | l | ||
| ) |
References FLA_Check_col_storage(), FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), FLA_Check_square(), FLA_Check_valid_evd_type(), FLA_Check_valid_uplo(), FLA_Check_vector_dim(), and FLA_Obj_length().
Referenced by FLA_Hevdd_external().
{
FLA_Error e_val;
e_val = FLA_Check_valid_evd_type( jobz );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_real_object( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( A, e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( e, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_storage( e );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Hevdd_external | ( | FLA_Evd_type | jobz, |
| FLA_Uplo | uplo, | ||
| FLA_Obj | A, | ||
| FLA_Obj | l | ||
| ) |
References F77_cheevd(), F77_dsyevd(), F77_ssyevd(), F77_zheevd(), FLA_Check_error_level(), FLA_Hevdd_check(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_is_complex(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_evd_type(), and FLA_Param_map_flame_to_netlib_uplo().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
FLA_Datatype dt_real;
int n_A, cs_A;
int lwork, lrwork, liwork;
FLA_Obj work, rwork, iwork;
char blas_jobz;
char blas_uplo;
int i;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Hevdd_check( jobz, uplo, A, e );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
dt_real = FLA_Obj_datatype_proj_to_real( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Param_map_flame_to_netlib_evd_type( jobz, &blas_jobz );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
// Make a workspace query the first time through. This will provide us with
// and ideal workspace size.
lwork = -1;
lrwork = -1;
liwork = -1;
FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
FLA_Obj_create( datatype, 1, 1, 0, 0, &rwork );
FLA_Obj_create( FLA_INT, 1, 1, 0, 0, &iwork );
for ( i = 0; i < 2; ++i )
{
if ( i == 1 )
{
// Grab the queried ideal workspace size from the work arrays, free the
// work object, and then re-allocate the workspace with the ideal size.
if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
{
lwork = ( int ) *FLA_FLOAT_PTR( work );
lrwork = ( int ) *FLA_FLOAT_PTR( rwork );
liwork = ( int ) *FLA_INT_PTR( iwork );
}
else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
{
lwork = ( int ) *FLA_DOUBLE_PTR( work );
lrwork = ( int ) *FLA_DOUBLE_PTR( rwork );
liwork = ( int ) *FLA_INT_PTR( iwork );
}
//printf( "ideal workspace for n = %d\n", n_A );
//printf( " lwork = %d\n", lwork );
//printf( " lrwork = %d\n", lrwork );
//printf( " liwork = %d\n", liwork );
lwork = 2*lwork;
FLA_Obj_free( &work );
FLA_Obj_free( &iwork );
FLA_Obj_free( &rwork );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
FLA_Obj_create( datatype, liwork, 1, 0, 0, &iwork );
if ( FLA_Obj_is_complex( A ) )
FLA_Obj_create( datatype, lrwork, 1, 0, 0, &rwork );
}
switch( datatype ) {
case FLA_FLOAT:
{
float* buff_A = ( float* ) FLA_FLOAT_PTR( A );
float* buff_e = ( float* ) FLA_FLOAT_PTR( e );
float* buff_work = ( float* ) FLA_FLOAT_PTR( work );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_ssyevd( &blas_jobz,
&blas_uplo,
&n_A,
buff_A, &cs_A,
buff_e,
buff_work, &lwork,
buff_iwork, &liwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double* ) FLA_DOUBLE_PTR( A );
double* buff_e = ( double* ) FLA_DOUBLE_PTR( e );
double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_dsyevd( &blas_jobz,
&blas_uplo,
&n_A,
buff_A, &cs_A,
buff_e,
buff_work, &lwork,
buff_iwork, &liwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex* ) FLA_COMPLEX_PTR( A );
float* buff_e = ( float* ) FLA_FLOAT_PTR( e );
scomplex* buff_work = ( scomplex* ) FLA_COMPLEX_PTR( work );
float* buff_rwork = ( float* ) FLA_FLOAT_PTR( rwork );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_cheevd( &blas_jobz,
&blas_uplo,
&n_A,
buff_A, &cs_A,
buff_e,
buff_work, &lwork,
buff_rwork, &lrwork,
buff_iwork, &liwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
double* buff_e = ( double* ) FLA_DOUBLE_PTR( e );
dcomplex* buff_work = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( work );
double* buff_rwork = ( double* ) FLA_DOUBLE_PTR( rwork );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_zheevd( &blas_jobz,
&blas_uplo,
&n_A,
buff_A, &cs_A,
buff_e,
buff_work, &lwork,
buff_rwork, &lrwork,
buff_iwork, &liwork,
&info );
break;
}
}
}
FLA_Obj_free( &work );
FLA_Obj_free( &iwork );
if ( FLA_Obj_is_complex( A ) )
FLA_Obj_free( &rwork );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Hevdr_check | ( | FLA_Evd_type | jobz, |
| FLA_Uplo | uplo, | ||
| FLA_Obj | A, | ||
| FLA_Obj | l, | ||
| FLA_Obj | Z | ||
| ) |
References FLA_Check_col_storage(), FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), FLA_Check_square(), FLA_Check_valid_evd_type(), FLA_Check_valid_uplo(), FLA_Check_vector_dim(), and FLA_Obj_length().
Referenced by FLA_Hevdr_external().
{
FLA_Error e_val;
e_val = FLA_Check_valid_evd_type( jobz );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, Z );
FLA_Check_error_code( e_val );
e_val = FLA_Check_real_object( l );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( A, l );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, Z );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( l, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_storage( l );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Hevdr_external | ( | FLA_Evd_type | jobz, |
| FLA_Uplo | uplo, | ||
| FLA_Obj | A, | ||
| FLA_Obj | l, | ||
| FLA_Obj | Z | ||
| ) |
References F77_cheevr(), F77_dsyevr(), F77_ssyevr(), F77_zheevr(), FLA_Check_error_level(), FLA_Hevdr_check(), FLA_Mach_params(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_is_complex(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_evd_type(), and FLA_Param_map_flame_to_netlib_uplo().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
FLA_Datatype dt_real;
int n_A, cs_A;
int cs_Z;
int lwork, lrwork, liwork, lisuppz;
FLA_Obj work, rwork, iwork, isuppz, abstol;
char blas_jobz;
char blas_uplo;
int i;
char blas_range = 'A';
int il, iu;
int eigs_found;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Hevdr_check( jobz, uplo, A, l, Z );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
dt_real = FLA_Obj_datatype_proj_to_real( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
cs_Z = FLA_Obj_col_stride( Z );
FLA_Param_map_flame_to_netlib_evd_type( jobz, &blas_jobz );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
lisuppz = 2 * n_A;
FLA_Obj_create( FLA_INT, lisuppz, 1, 0, 0, &isuppz );
FLA_Obj_create( dt_real, 1, 1, 0, 0, &abstol );
// Query the safe minimum to use as the abstol parameter.
FLA_Mach_params( FLA_MACH_SFMIN, abstol );
// Make a workspace query the first time through. This will provide us with
// and ideal workspace size.
lwork = -1;
lrwork = -1;
liwork = -1;
FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
FLA_Obj_create( dt_real, 1, 1, 0, 0, &rwork );
FLA_Obj_create( FLA_INT, 1, 1, 0, 0, &iwork );
for ( i = 0; i < 2; ++i )
{
if ( i == 1 )
{
// Grab the queried ideal workspace size from the work arrays, free the
// work object, and then re-allocate the workspace with the ideal size.
if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
{
lwork = ( int ) *FLA_FLOAT_PTR( work );
lrwork = ( int ) *FLA_FLOAT_PTR( rwork );
liwork = ( int ) *FLA_INT_PTR( iwork );
}
else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
{
lwork = ( int ) *FLA_DOUBLE_PTR( work );
lrwork = ( int ) *FLA_DOUBLE_PTR( rwork );
liwork = ( int ) *FLA_INT_PTR( iwork );
}
FLA_Obj_free( &work );
FLA_Obj_free( &iwork );
FLA_Obj_free( &rwork );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
FLA_Obj_create( FLA_INT, liwork, 1, 0, 0, &iwork );
if ( FLA_Obj_is_complex( A ) )
FLA_Obj_create( dt_real, lrwork, 1, 0, 0, &rwork );
}
switch( datatype ) {
case FLA_FLOAT:
{
float* buff_A = ( float* ) FLA_FLOAT_PTR( A );
float* buff_l = ( float* ) FLA_FLOAT_PTR( l );
float* buff_Z = ( float* ) FLA_FLOAT_PTR( Z );
float* buff_work = ( float* ) FLA_FLOAT_PTR( work );
float* buff_abstol = ( float* ) FLA_FLOAT_PTR( abstol );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
float vl, vu;
F77_ssyevr( &blas_jobz,
&blas_range,
&blas_uplo,
&n_A,
buff_A, &cs_A,
&vl, &vu,
&il, &iu,
buff_abstol,
&eigs_found,
buff_l,
buff_Z, &cs_Z,
buff_isuppz,
buff_work, &lwork,
buff_iwork, &liwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double* ) FLA_DOUBLE_PTR( A );
double* buff_l = ( double* ) FLA_DOUBLE_PTR( l );
double* buff_Z = ( double* ) FLA_DOUBLE_PTR( Z );
double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
double* buff_abstol = ( double* ) FLA_DOUBLE_PTR( abstol );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
double vl, vu;
F77_dsyevr( &blas_jobz,
&blas_range,
&blas_uplo,
&n_A,
buff_A, &cs_A,
&vl, &vu,
&il, &iu,
buff_abstol,
&eigs_found,
buff_l,
buff_Z, &cs_Z,
buff_isuppz,
buff_work, &lwork,
buff_iwork, &liwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex* ) FLA_COMPLEX_PTR( A );
float* buff_l = ( float* ) FLA_FLOAT_PTR( l );
scomplex* buff_Z = ( scomplex* ) FLA_COMPLEX_PTR( Z );
scomplex* buff_work = ( scomplex* ) FLA_COMPLEX_PTR( work );
float* buff_rwork = ( float* ) FLA_FLOAT_PTR( rwork );
float* buff_abstol = ( float* ) FLA_FLOAT_PTR( abstol );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
float vl, vu;
F77_cheevr( &blas_jobz,
&blas_range,
&blas_uplo,
&n_A,
buff_A, &cs_A,
&vl, &vu,
&il, &iu,
buff_abstol,
&eigs_found,
buff_l,
buff_Z, &cs_Z,
buff_isuppz,
buff_work, &lwork,
buff_rwork, &lrwork,
buff_iwork, &liwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
double* buff_l = ( double* ) FLA_DOUBLE_PTR( l );
dcomplex* buff_Z = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( Z );
dcomplex* buff_work = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( work );
double* buff_rwork = ( double* ) FLA_DOUBLE_PTR( rwork );
double* buff_abstol = ( double* ) FLA_DOUBLE_PTR( abstol );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
double vl, vu;
F77_zheevr( &blas_jobz,
&blas_range,
&blas_uplo,
&n_A,
buff_A, &cs_A,
&vl, &vu,
&il, &iu,
buff_abstol,
&eigs_found,
buff_l,
buff_Z, &cs_Z,
buff_isuppz,
buff_work, &lwork,
buff_rwork, &lrwork,
buff_iwork, &liwork,
&info );
break;
}
}
}
FLA_Obj_free( &work );
FLA_Obj_free( &iwork );
FLA_Obj_free( &isuppz );
FLA_Obj_free( &abstol );
if ( FLA_Obj_is_complex( A ) )
FLA_Obj_free( &rwork );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_LQ_blk_external | ( | FLA_Obj | A, |
| FLA_Obj | t | ||
| ) |
References F77_cgelqf(), F77_dgelqf(), F77_sgelqf(), F77_zgelqf(), FLA_Check_error_level(), FLA_LQ_check(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), and FLA_Query_blocksize().
Referenced by FLA_LQ_blk_ext().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int m_A, n_A, cs_A;
int lwork;
FLA_Obj work_obj;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_LQ_check( A, t );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
lwork = m_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work_obj );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
F77_sgelqf( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
F77_dgelqf( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
F77_cgelqf( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
F77_zgelqf( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
}
FLA_Obj_free( &work_obj );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_LQ_check | ( | FLA_Obj | A, |
| FLA_Obj | t | ||
| ) |
References FLA_Check_col_storage(), FLA_Check_col_vector(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim(), and FLA_Obj_min_dim().
Referenced by FLA_LQ_blk_external(), and FLA_LQ_unb_external().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_vector( t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_storage( t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( t, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_LQ_unb_external | ( | FLA_Obj | A, |
| FLA_Obj | t | ||
| ) |
References F77_cgelq2(), F77_dgelq2(), F77_sgelq2(), F77_zgelq2(), FLA_Check_error_level(), FLA_LQ_check(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_LQ_unb_ext().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int m_A, n_A, cs_A;
FLA_Obj work_obj;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_LQ_check( A, t );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Obj_create( datatype, m_A, 1, 0, 0, &work_obj );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
F77_sgelq2( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
F77_dgelq2( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
F77_cgelq2( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
F77_zgelq2( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work,
&info );
break;
}
}
FLA_Obj_free( &work_obj );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
{
FLA_Error r_val;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_LQ_UT_check( A, T );
// Invoke FLA_LQ_UT_internal() with the standard control tree.
//r_val = FLA_LQ_UT_blk_var1( A, T, fla_lqut_cntl_leaf );
r_val = FLA_LQ_UT_internal( A, T, fla_lqut_cntl_leaf );
return r_val;
}
| FLA_Error FLA_LQ_UT_check | ( | FLA_Obj | A, |
| FLA_Obj | T | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), and FLA_Obj_length().
Referenced by FLA_LQ_UT(), and FLASH_LQ_UT().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( T, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_LQ_UT_form_Q_check | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | Q | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), and FLA_Obj_width().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, Q );
FLA_Check_error_code( e_val );
// - the width of T represents the number of applied house-holder vectors.
// - the length of A may represent the same number of those vectors.
// - however, if A and Q share the same buffer (in-place operation),
// then the length of A should match to the length of the maximum length
// of the applied house-holder vectors.
//if ( FLA_Obj_is_overlapped( A, Q ) == FALSE )
//{
// e_val = FLA_Check_object_width_equals( T, FLA_Obj_length( A ) );
// FLA_Check_error_code( e_val );
//}
e_val = FLA_Check_object_width_equals( Q, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
// Q matrix should not be restricted to be a square matrix
// e_val = FLA_Check_square( Q );
// FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_LQ_UT_internal_check | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| fla_lqut_t * | cntl | ||
| ) |
References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_width_min(), and FLA_Obj_min_dim().
Referenced by FLA_LQ_UT_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( A, T );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects. This check works regardless
// of whether the element type is FLA_MATRIX or FLA_SCALAR because the
// element length and width are used instead of scalar length and width.
e_val = FLA_Check_object_width_min( T, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_LQ_UT_macro_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| fla_lqut_t * | cntl | ||
| ) |
References FLA_LQ_UT_internal(), FLA_LQ_UT_task(), FLA_Obj_free(), FLA_Obj_width(), FLASH_Copy_flat_to_hier(), and FLASH_Obj_create_flat_copy_of_hier().
Referenced by FLA_LQ_UT_internal(), and FLASH_Queue_exec_task().
{
FLA_Error r_val;
FLA_Obj A_flat;
FLA_Obj T_flat;
if ( FLA_Obj_width( A ) > 1 )
{
FLASH_Obj_create_flat_copy_of_hier( A, &A_flat );
FLASH_Obj_create_flat_copy_of_hier( T, &T_flat );
r_val = FLA_LQ_UT_internal( A_flat, T_flat,
fla_lqut_cntl_leaf );
FLASH_Copy_flat_to_hier( A_flat, 0, 0, A );
FLASH_Copy_flat_to_hier( T_flat, 0, 0, T );
FLA_Obj_free( &A_flat );
FLA_Obj_free( &T_flat );
}
else
{
r_val = FLA_LQ_UT_task( *FLASH_OBJ_PTR_AT( A ),
*FLASH_OBJ_PTR_AT( T ),
cntl );
}
return r_val;
}
| FLA_Error FLA_LQ_UT_recover_tau_check | ( | FLA_Obj | T, |
| FLA_Obj | tau | ||
| ) |
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), and FLA_Check_if_vector().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_consistent_object_datatype( T, tau );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( tau );
FLA_Check_error_code( e_val );
// This is not valid anymore as T is created with a conforming width to A.
//e_val = FLA_Check_object_width_equals( T, FLA_Obj_vector_dim( tau ) );
//FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), and FLA_Obj_min_dim().
Referenced by FLA_LQ_UT_solve(), and FLASH_LQ_UT_solve().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, X );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( T, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_LQ_UT_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| fla_lqut_t * | cntl | ||
| ) |
References FLA_LQ_UT_internal().
Referenced by FLA_LQ_UT_macro_task().
{
return FLA_LQ_UT_internal( A, T,
fla_lqut_cntl_leaf );
}
| FLA_Error FLA_LU_incpiv_check | ( | FLA_Obj | A, |
| FLA_Obj | p, | ||
| FLA_Obj | L | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_square(), and FLA_Obj_length().
Referenced by FLASH_LU_incpiv().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, L );
FLA_Check_error_code( e_val );
e_val = FLA_Check_int_object( p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( L, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_int_object(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), and FLA_Check_square().
Referenced by FLASH_LU_incpiv_solve().
{
FLA_Error e_val;
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, L );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, X );
FLA_Check_error_code( e_val );
e_val = FLA_Check_int_object( p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_LU_nopiv | ( | FLA_Obj | A | ) |
References FLA_Check_error_level(), FLA_LU_find_zero_on_diagonal(), FLA_LU_nopiv_check(), and FLA_LU_nopiv_internal().
{
FLA_Error r_val;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_LU_nopiv_check( A );
// Invoke FLA_LU_nopiv_internal() with large control tree.
r_val = FLA_LU_nopiv_internal( A, fla_lu_nopiv_cntl2 );
// Check for singularity.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
r_val = FLA_LU_find_zero_on_diagonal( A );
return r_val;
}
References FLA_Check_floating_object(), and FLA_Check_nonconstant_object().
Referenced by FLA_LU_nopiv(), and FLASH_LU_nopiv().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_LU_nopiv_internal_check | ( | FLA_Obj | A, |
| fla_lu_t * | cntl | ||
| ) |
References FLA_Check_null_pointer().
Referenced by FLA_LU_nopiv_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_LU_nopiv_solve_check | ( | FLA_Obj | A, |
| FLA_Obj | B, | ||
| FLA_Obj | X | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), and FLA_Check_square().
Referenced by FLA_LU_nopiv_solve(), and FLASH_LU_nopiv_solve().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, X );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_LU_nopiv_task | ( | FLA_Obj | A, |
| fla_lu_t * | cntl | ||
| ) |
References FLA_LU_nopiv_internal().
Referenced by FLASH_Queue_exec_task().
{
return FLA_LU_nopiv_internal( A,
fla_lu_nopiv_cntl_leaf );
}
| FLA_Error FLA_LU_piv | ( | FLA_Obj | A, |
| FLA_Obj | p | ||
| ) |
References FLA_Check_error_level(), FLA_LU_piv_check(), and FLA_LU_piv_internal().
{
FLA_Error r_val = FLA_SUCCESS;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_LU_piv_check( A, p );
// Invoke FLA_LU_piv_internal() with large control tree.
r_val = FLA_LU_piv_internal( A, p, fla_lu_piv_cntl2 );
// This is invalid as FLA_LU_piv_internal returns a null pivot index.
// Check for singularity.
//if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
// r_val = FLA_LU_find_zero_on_diagonal( A );
return r_val;
}
| FLA_Error FLA_LU_piv_blk_ext | ( | FLA_Obj | A, |
| FLA_Obj | p | ||
| ) |
References FLA_LU_piv_blk_external().
Referenced by FLA_LU_piv_internal().
{
return FLA_LU_piv_blk_external( A, p );
}
| FLA_Error FLA_LU_piv_blk_external | ( | FLA_Obj | A, |
| FLA_Obj | p | ||
| ) |
References F77_cgetrf(), F77_dgetrf(), F77_sgetrf(), F77_zgetrf(), FLA_Check_error_level(), FLA_LU_piv_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), and FLA_Shift_pivots_to().
Referenced by FLA_LU_piv_blk_ext().
{
FLA_Error r_val = FLA_SUCCESS;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
int info;
FLA_Datatype datatype;
int m_A, n_A, cs_A;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_LU_piv_check( A, p );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
int *buff_p = ( int * ) FLA_INT_PTR( p );
F77_sgetrf( &m_A,
&n_A,
buff_A, &cs_A,
buff_p,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
int *buff_p = ( int * ) FLA_INT_PTR( p );
F77_dgetrf( &m_A,
&n_A,
buff_A, &cs_A,
buff_p,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
int *buff_p = ( int * ) FLA_INT_PTR( p );
F77_cgetrf( &m_A,
&n_A,
buff_A, &cs_A,
buff_p,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
int *buff_p = ( int * ) FLA_INT_PTR( p );
F77_zgetrf( &m_A,
&n_A,
buff_A, &cs_A,
buff_p,
&info );
break;
}
}
FLA_Shift_pivots_to( FLA_NATIVE_PIVOTS, p );
// Convert to zero-based indexing, if an index was reported.
if ( info > 0 ) r_val = info - 1;
else r_val = FLA_SUCCESS;
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return r_val;
}
| FLA_Error FLA_LU_piv_check | ( | FLA_Obj | A, |
| FLA_Obj | p | ||
| ) |
References FLA_Check_col_vector(), FLA_Check_floating_object(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim_min(), and FLA_Obj_min_dim().
Referenced by FLA_LU_piv(), FLA_LU_piv_blk_external(), FLA_LU_piv_unb_external(), and FLASH_LU_piv().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_int_object( p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_vector( p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim_min( p, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Copy_external(), and FLA_LU_piv_task().
Referenced by FLASH_LU_incpiv_var2(), and FLASH_Queue_exec_task().
{
FLA_Error r_val;
r_val = FLA_LU_piv_task( A, p, cntl );
FLA_Copy_external( A, U );
return r_val;
}
| FLA_Error FLA_LU_piv_macro_task | ( | FLA_Obj | A, |
| FLA_Obj | p, | ||
| fla_lu_t * | cntl | ||
| ) |
References FLA_LU_piv_task(), FLA_Obj_free(), FLA_Obj_length(), FLASH_Copy_flat_to_hier(), and FLASH_Obj_create_flat_copy_of_hier().
Referenced by FLA_LU_piv_internal(), and FLASH_Queue_exec_task().
{
FLA_Error r_val;
FLA_Obj A_flat;
if ( FLA_Obj_length( A ) > 1 )
{
FLASH_Obj_create_flat_copy_of_hier( A, &A_flat );
r_val = FLA_LU_piv_task( A_flat, p, cntl );
FLASH_Copy_flat_to_hier( A_flat, 0, 0, A );
FLA_Obj_free( &A_flat );
}
else
{
r_val = FLA_LU_piv_task( *FLASH_OBJ_PTR_AT( A ), p, cntl );
}
return r_val;
}
References FLA_Check_col_vector(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_int_object(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_vector_dim_min(), and FLA_Obj_min_dim().
Referenced by FLA_LU_piv_solve(), and FLASH_LU_piv_solve().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, X );
FLA_Check_error_code( e_val );
e_val = FLA_Check_int_object( p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_vector( p );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim_min( p, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_LU_piv_task | ( | FLA_Obj | A, |
| FLA_Obj | p, | ||
| fla_lu_t * | cntl | ||
| ) |
References FLA_LU_piv_internal().
Referenced by FLA_LU_piv_copy_task(), FLA_LU_piv_macro_task(), FLASH_LU_incpiv_var1(), and FLASH_Queue_exec_task().
{
return FLA_LU_piv_internal( A, p,
fla_lu_piv_cntl_leaf );
}
| FLA_Error FLA_LU_piv_unb_ext | ( | FLA_Obj | A, |
| FLA_Obj | p | ||
| ) |
References FLA_LU_piv_unb_external().
Referenced by FLA_LU_piv_internal().
{
return FLA_LU_piv_unb_external( A, p );
}
| FLA_Error FLA_LU_piv_unb_external | ( | FLA_Obj | A, |
| FLA_Obj | p | ||
| ) |
References F77_cgetf2(), F77_dgetf2(), F77_sgetf2(), F77_zgetf2(), FLA_Check_error_level(), FLA_LU_piv_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), and FLA_Shift_pivots_to().
Referenced by FLA_LU_piv_unb_ext().
{
FLA_Error r_val = FLA_SUCCESS;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
int info;
FLA_Datatype datatype;
int m_A, n_A, cs_A;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_LU_piv_check( A, p );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
int *buff_p = ( int * ) FLA_INT_PTR( p );
F77_sgetf2( &m_A,
&n_A,
buff_A, &cs_A,
buff_p,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
int *buff_p = ( int * ) FLA_INT_PTR( p );
F77_dgetf2( &m_A,
&n_A,
buff_A, &cs_A,
buff_p,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
int *buff_p = ( int * ) FLA_INT_PTR( p );
F77_cgetf2( &m_A,
&n_A,
buff_A, &cs_A,
buff_p,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
int *buff_p = ( int * ) FLA_INT_PTR( p );
F77_zgetf2( &m_A,
&n_A,
buff_A, &cs_A,
buff_p,
&info );
break;
}
}
FLA_Shift_pivots_to( FLA_NATIVE_PIVOTS, p );
// Convert to zero-based indexing, if an index was reported.
if ( info > 0 ) r_val = info - 1;
else r_val = FLA_SUCCESS;
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return r_val;
}
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_blas_trans(), and FLA_Check_valid_isgn_value().
Referenced by FLA_Lyap(), and FLASH_Lyap().
{
FLA_Error e_val;
e_val = FLA_Check_valid_blas_trans( trans );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_scalar( isgn );
FLA_Check_error_code( e_val );
e_val = FLA_Check_int_object( isgn );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_isgn_value( isgn );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_scalar( scale );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( C, scale );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Lyap_h_task | ( | FLA_Obj | isgn, |
| FLA_Obj | A, | ||
| FLA_Obj | C, | ||
| FLA_Obj | scale, | ||
| fla_lyap_t * | cntl | ||
| ) |
References FLA_Lyap_internal().
{
return FLA_Lyap_internal( FLA_CONJ_TRANSPOSE, isgn, A, C, scale,
fla_lyap_cntl_leaf );
}
| FLA_Error FLA_Lyap_internal_check | ( | FLA_Trans | trans, |
| FLA_Obj | isgn, | ||
| FLA_Obj | A, | ||
| FLA_Obj | C, | ||
| FLA_Obj | scale, | ||
| fla_lyap_t * | cntl | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), and FLA_Check_square().
Referenced by FLA_Lyap_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( A, C );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects. This check works regardless
// of whether the element type is FLA_MATRIX or FLA_SCALAR because the
// element length and width are used instead of scalar length and width.
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( C );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Lyap_n_task | ( | FLA_Obj | isgn, |
| FLA_Obj | A, | ||
| FLA_Obj | C, | ||
| FLA_Obj | scale, | ||
| fla_lyap_t * | cntl | ||
| ) |
References FLA_Lyap_internal().
{
return FLA_Lyap_internal( FLA_NO_TRANSPOSE, isgn, A, C, scale,
fla_lyap_cntl_leaf );
}
| FLA_Error FLA_Lyap_task | ( | FLA_Trans | trans, |
| FLA_Obj | isgn, | ||
| FLA_Obj | A, | ||
| FLA_Obj | C, | ||
| FLA_Obj | scale, | ||
| fla_lyap_t * | cntl | ||
| ) |
References FLA_Lyap_internal().
Referenced by FLASH_Queue_exec_task().
{
return FLA_Lyap_internal( trans, isgn, A, C, scale,
fla_lyap_cntl_leaf );
}
| FLA_Error FLA_QR2_UT_check | ( | FLA_Obj | B, |
| FLA_Obj | D, | ||
| FLA_Obj | T | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), and FLA_Check_square().
Referenced by FLASH_QR2_UT().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( B, D );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( B, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, B, D );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, T, B, T );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_QR2_UT_internal_check | ( | FLA_Obj | B, |
| FLA_Obj | D, | ||
| FLA_Obj | T, | ||
| fla_qr2ut_t * | cntl | ||
| ) |
References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_width_equals(), and FLA_Obj_width().
Referenced by FLA_QR2_UT_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( B, D );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( B, T );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects. This check works regardless
// of whether the element type is FLA_MATRIX or FLA_SCALAR because the
// element length and width are used instead of scalar length and width.
//e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, B, D );
//FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( B, FLA_Obj_width( B ) );
FLA_Check_error_code( e_val );
//e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, T, B, T );
//FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( D, FLA_Obj_width( D ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_QR2_UT_task | ( | FLA_Obj | B, |
| FLA_Obj | D, | ||
| FLA_Obj | T, | ||
| fla_qr2ut_t * | cntl | ||
| ) |
References FLA_QR2_UT_internal().
Referenced by FLA_CAQR2_UT_internal(), and FLASH_Queue_exec_task().
{
return FLA_QR2_UT_internal( B, D, T,
fla_qr2ut_cntl_leaf );
}
| FLA_Error FLA_QR_blk_external | ( | FLA_Obj | A, |
| FLA_Obj | t | ||
| ) |
References F77_cgeqrf(), F77_dgeqrf(), F77_sgeqrf(), F77_zgeqrf(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_QR_check(), and FLA_Query_blocksize().
Referenced by FLA_QR_blk_ext().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int m_A, n_A, cs_A;
int lwork;
FLA_Obj work_obj;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_QR_check( A, t );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
lwork = n_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work_obj );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
F77_sgeqrf( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
F77_dgeqrf( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
F77_cgeqrf( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
F77_zgeqrf( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
}
FLA_Obj_free( &work_obj );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_QR_check | ( | FLA_Obj | A, |
| FLA_Obj | t | ||
| ) |
References FLA_Check_col_storage(), FLA_Check_col_vector(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim(), and FLA_Obj_min_dim().
Referenced by FLA_QR_blk_external(), and FLA_QR_unb_external().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_vector( t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_storage( t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( t, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_QR_form_Q_check | ( | FLA_Obj | A, |
| FLA_Obj | t | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), and FLA_Check_nonconstant_object().
Referenced by FLA_QR_form_Q_external().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( t );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_QR_form_Q_external | ( | FLA_Obj | A, |
| FLA_Obj | t | ||
| ) |
References F77_cungqr(), F77_dorgqr(), F77_sorgqr(), F77_zungqr(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_width(), and FLA_QR_form_Q_check().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int m_A, n_A, k_A;
int cs_A;
int lwork;
FLA_Obj work;
int i;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_QR_form_Q_check( A, t );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
k_A = FLA_Obj_vector_dim( t );
// Make a workspace query the first time through. This will provide us with
// and ideal workspace size based on an internal block size.
lwork = -1;
FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
for ( i = 0; i < 2; ++i )
{
if ( i == 1 )
{
// Grab the queried ideal workspace size from the work array, free the
// work object, and then re-allocate the workspace with the ideal size.
if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
lwork = ( int ) *FLA_FLOAT_PTR( work );
else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
lwork = ( int ) *FLA_DOUBLE_PTR( work );
FLA_Obj_free( &work );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
}
switch( datatype ){
case FLA_FLOAT:
{
float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
float* buff_t = ( float * ) FLA_FLOAT_PTR( t );
float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
F77_sorgqr( &m_A,
&n_A,
&k_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double* buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double* buff_work = ( double * ) FLA_DOUBLE_PTR( work );
F77_dorgqr( &m_A,
&n_A,
&k_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex* buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
F77_cungqr( &m_A,
&n_A,
&k_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work );
F77_zungqr( &m_A,
&n_A,
&k_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
}
}
FLA_Obj_free( &work );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_QR_unb_external | ( | FLA_Obj | A, |
| FLA_Obj | t | ||
| ) |
References F77_cgeqr2(), F77_dgeqr2(), F77_sgeqr2(), F77_zgeqr2(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), and FLA_QR_check().
Referenced by FLA_QR_unb_ext().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int m_A, n_A, cs_A;
FLA_Obj work_obj;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_QR_check( A, t );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Obj_create( datatype, n_A, 1, 0, 0, &work_obj );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
F77_sgeqr2( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
F77_dgeqr2( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
F77_cgeqr2( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
F77_zgeqr2( &m_A,
&n_A,
buff_A, &cs_A,
buff_t,
buff_work,
&info );
break;
}
}
FLA_Obj_free( &work_obj );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
Referenced by FLA_Random_unitary_matrix(), FLA_Svd_ext_u_unb_var1(), FLA_Svd_uv_unb_var1(), and FLA_Svd_uv_unb_var2().
{
FLA_Error r_val;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_QR_UT_check( A, T );
// Invoke FLA_QR_UT_internal() with the standard control tree.
//r_val = FLA_QR_UT_internal( A, T, fla_qrut_cntl2 );
r_val = FLA_QR_UT_internal( A, T, fla_qrut_cntl_leaf );
return r_val;
}
| FLA_Error FLA_QR_UT_check | ( | FLA_Obj | A, |
| FLA_Obj | T | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), and FLA_Obj_width().
Referenced by FLA_QR_UT(), and FLASH_QR_UT().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( T, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_QR_UT_copy_internal_check | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | U, | ||
| fla_qrut_t * | cntl | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_width_equals(), and FLA_Obj_width().
Referenced by FLA_QR_UT_copy_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( A, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( A, U );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects. This check works regardless
// of whether the element type is FLA_MATRIX or FLA_SCALAR because the
// element length and width are used instead of scalar length and width.
e_val = FLA_Check_object_width_equals( T, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, U );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_QR_UT_copy_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | U, | ||
| fla_qrut_t * | cntl | ||
| ) |
References FLA_Copyr_external(), FLA_Obj_min_dim(), FLA_Part_2x1(), and FLA_QR_UT_internal().
Referenced by FLA_QR_UT_copy_internal(), and FLASH_Queue_exec_task().
{
FLA_Error r_val;
FLA_Obj AT,
AB;
// Perform a QR factorization as we normally would.
r_val = FLA_QR_UT_internal( A, T,
fla_qrut_cntl_leaf );
// Partition away the bottom part of the matrix, if there is any, so that
// the dimensions match that of U. This step is only necessary so that
// the copyr operation below works normally for the last iteration of
// incremental QR. The whole point of making a copy of the lower triangle
// of A is to allow stage 2 to proceed without a dependency leading into
// stage 3. But the last iteration does not perform stage 2, and thus U
// is never read and so the copyr does not need to happen.
FLA_Part_2x1( A, &AT,
&AB, FLA_Obj_min_dim( A ), FLA_TOP );
// Copy the Householder vectors into U.
FLA_Copyr_external( FLA_LOWER_TRIANGULAR, AT, U );
return r_val;
}
| FLA_Error FLA_QR_UT_form_Q_check | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| FLA_Obj | Q | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), and FLA_Obj_length().
Referenced by FLA_QR_UT_form_Q().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, Q );
FLA_Check_error_code( e_val );
// The width of T is the loop guard, not A. This should not be checked.
//e_val = FLA_Check_object_width_equals( T, FLA_Obj_width( A ) );
//FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( Q, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
// Q matrix should not be restricted to be a square matrix
// e_val = FLA_Check_square( Q );
// FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_QR_UT_inc_check | ( | FLA_Obj | A, |
| FLA_Obj | TW | ||
| ) |
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), and FLA_Check_nonconstant_object().
Referenced by FLASH_QR_UT_inc_noopt(), and FLASH_QR_UT_inc_opt1().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, TW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, TW );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_length_min(), and FLA_Obj_width().
Referenced by FLASH_QR_UT_inc_solve().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, TW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, X );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, TW );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_min( A, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_QR_UT_internal_check | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| fla_qrut_t * | cntl | ||
| ) |
References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_width_min(), and FLA_Obj_min_dim().
Referenced by FLA_QR_UT_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( A, T );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects. This check works regardless
// of whether the element type is FLA_MATRIX or FLA_SCALAR because the
// element length and width are used instead of scalar length and width.
e_val = FLA_Check_object_width_min( T, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_QR_UT_macro_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| fla_qrut_t * | cntl | ||
| ) |
References FLA_Obj_free(), FLA_Obj_length(), FLA_QR_UT_internal(), FLA_QR_UT_task(), FLASH_Copy_flat_to_hier(), and FLASH_Obj_create_flat_copy_of_hier().
Referenced by FLA_QR_UT_internal(), and FLASH_Queue_exec_task().
{
FLA_Error r_val;
FLA_Obj A_flat;
if ( FLA_Obj_length( A ) > 1 )
{
FLASH_Obj_create_flat_copy_of_hier( A, &A_flat );
r_val = FLA_QR_UT_internal( A_flat, T, fla_qrut_cntl_leaf );
FLASH_Copy_flat_to_hier( A_flat, 0, 0, A );
FLA_Obj_free( &A_flat );
}
else
{
r_val = FLA_QR_UT_task( *FLASH_OBJ_PTR_AT( A ), T, cntl );
}
return r_val;
}
{
FLA_Error r_val;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_QR_UT_piv_check( A, T, w, p );
FLA_Set( FLA_ZERO, w );
FLA_QR_UT_piv_colnorm( FLA_ONE, A, w );
r_val = FLA_QR_UT_piv_internal( A, T, w, p, fla_qrut_piv_cntl_leaf );
return r_val;
}
| FLA_Error FLA_QR_UT_recover_tau_check | ( | FLA_Obj | T, |
| FLA_Obj | tau | ||
| ) |
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), and FLA_Check_if_vector().
Referenced by FLA_QR_UT_recover_tau().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_consistent_object_datatype( T, tau );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( tau );
FLA_Check_error_code( e_val );
// This is not valid anymore as T is created with a conforming width to A.
//e_val = FLA_Check_object_width_equals( T, FLA_Obj_vector_dim( tau ) );
//FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_length_min(), FLA_Check_object_width_equals(), FLA_Obj_min_dim(), and FLA_Obj_width().
Referenced by FLA_QR_UT_solve(), and FLASH_QR_UT_solve().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, X );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( T, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_min( A, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_QR_UT_task | ( | FLA_Obj | A, |
| FLA_Obj | T, | ||
| fla_qrut_t * | cntl | ||
| ) |
References FLA_QR_UT_internal().
Referenced by FLA_QR_UT_macro_task(), and FLASH_Queue_exec_task().
{
return FLA_QR_UT_internal( A, T,
fla_qrut_cntl_leaf );
}
| FLA_Error FLA_SA_FS_task | ( | FLA_Obj | L, |
| FLA_Obj | D, | ||
| FLA_Obj | p, | ||
| FLA_Obj | C, | ||
| FLA_Obj | E, | ||
| dim_t | nb_alg, | ||
| fla_gemm_t * | cntl | ||
| ) |
References FLA_SA_FS_blk().
Referenced by FLASH_Queue_exec_task(), and FLASH_SA_FS().
{
FLA_Error info;
info = FLA_SA_FS_blk( L,
D, p, C,
E, nb_alg );
return info;
}
| FLA_Error FLA_SA_LU_task | ( | FLA_Obj | U, |
| FLA_Obj | D, | ||
| FLA_Obj | p, | ||
| FLA_Obj | L, | ||
| dim_t | nb_alg, | ||
| fla_lu_t * | cntl | ||
| ) |
References FLA_SA_LU_blk().
Referenced by FLASH_Queue_exec_task(), and FLASH_SA_LU().
{
FLA_Error info;
info = FLA_SA_LU_blk( U,
D, p, L, nb_alg );
return info;
}
| FLA_Error FLA_SPDinv | ( | FLA_Uplo | uplo, |
| FLA_Obj | A | ||
| ) |
References FLA_Check_error_level(), FLA_SPDinv_check(), and FLA_SPDinv_internal().
{
FLA_Error r_val = FLA_SUCCESS;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_SPDinv_check( uplo, A );
// Invoke FLA_SPDinv_internal() with an appropriate control tree.
r_val = FLA_SPDinv_internal( uplo, A, fla_spdinv_cntl );
return r_val;
}
| FLA_Error FLA_SPDinv_blk_external | ( | FLA_Uplo | uplo, |
| FLA_Obj | A | ||
| ) |
References FLA_Check_error_level(), FLA_Chol_blk_external(), FLA_SPDinv_check(), FLA_Trinv_blk_external(), and FLA_Ttmm_blk_external().
Referenced by FLA_SPDinv_blk_ext().
{
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Error e_val;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_SPDinv_check( uplo, A );
e_val = FLA_Chol_blk_external( uplo, A );
if ( e_val != FLA_SUCCESS )
return e_val;
e_val = FLA_Trinv_blk_external( uplo, FLA_NONUNIT_DIAG, A );
if ( e_val != FLA_SUCCESS )
return e_val;
FLA_Ttmm_blk_external( uplo, A );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return FLA_SUCCESS;
}
| FLA_Error FLA_SPDinv_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | A | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().
Referenced by FLA_SPDinv(), FLA_SPDinv_blk_external(), and FLASH_SPDinv().
{
FLA_Error e_val;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_SPDinv_internal_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| fla_spdinv_t * | cntl | ||
| ) |
References FLA_Check_null_pointer().
Referenced by FLA_SPDinv_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Svd_check | ( | FLA_Svd_type | jobu, |
| FLA_Svd_type | jobv, | ||
| FLA_Obj | A, | ||
| FLA_Obj | s, | ||
| FLA_Obj | U, | ||
| FLA_Obj | V | ||
| ) |
References FLA_Check_col_storage(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_real_object(), FLA_Check_valid_svd_type(), FLA_Check_vector_dim(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_min_dim(), and FLA_Obj_width().
Referenced by FLA_Svd(), and FLA_Svd_external().
{
FLA_Error e_val;
e_val = FLA_Check_valid_svd_type( jobu );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_svd_type( jobv );
FLA_Check_error_code( e_val );
// FLA_Svd does not allow FLA_SVD_VECTORS_MIN_OVERWRITE
// for both jobu and jobv as V cannot be overwritten on A.
// Use FLA_Svd_ext to allow OVERWRITE options.
if ( jobu == FLA_SVD_VECTORS_MIN_OVERWRITE ||
jobv == FLA_SVD_VECTORS_MIN_OVERWRITE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
// Do not check the jobu and jobv OVERWRITE combination.
//e_val = FLA_Check_valid_svd_type_combination( jobu, jobv );
//FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_real_object( s );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( A, s );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( s, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_storage( s );
FLA_Check_error_code( e_val );
// When jobu is FLA_SVD_VECTORS_NONE, U may be given without a base object allocated.
if ( jobu != FLA_SVD_VECTORS_NONE && FLA_Obj_has_zero_dim( U ) == FALSE )
{
e_val = FLA_Check_identical_object_datatype( A, U );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( U, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
// No need to be square.
//e_val = FLA_Check_square( U );
//FLA_Check_error_code( e_val );
}
// When jobv is FLA_SVD_VECTORS_NONE, V may be given without a base object allocated.
if ( jobv != FLA_SVD_VECTORS_NONE && FLA_Obj_has_zero_dim( V ) == FALSE )
{
e_val = FLA_Check_identical_object_datatype( A, V );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( V, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
// No need to be square.
//e_val = FLA_Check_square( V );
//FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Svd_compute_scaling_check | ( | FLA_Obj | A, |
| FLA_Obj | sigma | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_nonconstant_object(), and FLA_Check_real_object().
Referenced by FLA_Svd_compute_scaling().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_real_object( sigma );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( sigma );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( A, sigma );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_scalar( sigma );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Svd_ext_check | ( | FLA_Svd_type | jobu, |
| FLA_Trans | transu, | ||
| FLA_Svd_type | jobv, | ||
| FLA_Trans | transv, | ||
| FLA_Obj | A, | ||
| FLA_Obj | s, | ||
| FLA_Obj | U, | ||
| FLA_Obj | V | ||
| ) |
References FLA_Check_col_storage(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_real_object(), FLA_Check_valid_svd_type(), FLA_Check_valid_svd_type_and_trans_combination(), FLA_Check_valid_svd_type_combination(), FLA_Check_valid_trans(), FLA_Check_vector_dim(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_min_dim(), and FLA_Obj_width().
Referenced by FLA_Svd_ext().
{
FLA_Error e_val;
e_val = FLA_Check_valid_svd_type( jobu );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_svd_type( jobv );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_svd_type_combination( jobu, jobv );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_trans( transu );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_trans( transv );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_svd_type_and_trans_combination( jobu, transu, jobv, transv );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_real_object( s );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( A, s );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( s, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_storage( s );
FLA_Check_error_code( e_val );
if ( jobu != FLA_SVD_VECTORS_NONE && FLA_Obj_has_zero_dim( U ) == FALSE )
{
e_val = FLA_Check_identical_object_datatype( A, U );
FLA_Check_error_code( e_val );
if ( transu == FLA_NO_TRANSPOSE || transu == FLA_CONJ_NO_TRANSPOSE )
{
e_val = FLA_Check_object_length_equals( U, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
}
else
{
e_val = FLA_Check_object_width_equals( U, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
}
}
if ( jobv != FLA_SVD_VECTORS_NONE && FLA_Obj_has_zero_dim( V ) == FALSE )
{
e_val = FLA_Check_identical_object_datatype( A, V );
FLA_Check_error_code( e_val );
if ( transv == FLA_NO_TRANSPOSE || transv == FLA_CONJ_NO_TRANSPOSE )
{
e_val = FLA_Check_object_length_equals( V, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
}
else
{
e_val = FLA_Check_object_width_equals( V, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
}
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Svd_external | ( | FLA_Svd_type | jobu, |
| FLA_Svd_type | jobv, | ||
| FLA_Obj | A, | ||
| FLA_Obj | s, | ||
| FLA_Obj | U, | ||
| FLA_Obj | V | ||
| ) |
References F77_cgesvd(), F77_dgesvd(), F77_sgesvd(), F77_zgesvd(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_is_complex(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_svd_type(), and FLA_Svd_check().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
FLA_Datatype dt_real;
int m_A, n_A, cs_A;
int cs_U;
int cs_V;
int min_m_n;
int lwork, lrwork;
FLA_Obj work, rwork;
char blas_jobu;
char blas_jobv;
int i;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Svd_check( jobu, jobv, A, s, U, V );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
dt_real = FLA_Obj_datatype_proj_to_real( A );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
cs_U = FLA_Obj_col_stride( U );
cs_V = FLA_Obj_col_stride( V );
min_m_n = min( m_A, n_A );
// Allocate the rwork array up front since its size is not dependent on
// internal block sizes.
lrwork = 5 * min_m_n;
if ( FLA_Obj_is_complex( A ) )
FLA_Obj_create( dt_real, lrwork, 1, 0, 0, &rwork );
FLA_Param_map_flame_to_netlib_svd_type( jobu, &blas_jobu );
FLA_Param_map_flame_to_netlib_svd_type( jobv, &blas_jobv );
// Make a workspace query the first time through. This will provide us with
// and ideal workspace size based on an internal block size.
lwork = -1;
FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
for ( i = 0; i < 2; ++i )
{
if ( i == 1 )
{
// Grab the queried ideal workspace size from the work array, free the
// work object, and then re-allocate the workspace with the ideal size.
if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
lwork = ( int ) *FLA_FLOAT_PTR( work );
else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
lwork = ( int ) *FLA_DOUBLE_PTR( work );
FLA_Obj_free( &work );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
}
switch( datatype ) {
case FLA_FLOAT:
{
float* buff_A = ( float* ) FLA_FLOAT_PTR( A );
float* buff_s = ( float* ) FLA_FLOAT_PTR( s );
float* buff_U = ( float* ) FLA_FLOAT_PTR( U );
float* buff_V = ( float* ) FLA_FLOAT_PTR( V );
float* buff_work = ( float* ) FLA_FLOAT_PTR( work );
F77_sgesvd( &blas_jobu,
&blas_jobv,
&m_A,
&n_A,
buff_A, &cs_A,
buff_s,
buff_U, &cs_U,
buff_V, &cs_V,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double* ) FLA_DOUBLE_PTR( A );
double* buff_s = ( double* ) FLA_DOUBLE_PTR( s );
double* buff_U = ( double* ) FLA_DOUBLE_PTR( U );
double* buff_V = ( double* ) FLA_DOUBLE_PTR( V );
double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
F77_dgesvd( &blas_jobu,
&blas_jobv,
&m_A,
&n_A,
buff_A, &cs_A,
buff_s,
buff_U, &cs_U,
buff_V, &cs_V,
buff_work, &lwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex* ) FLA_COMPLEX_PTR( A );
float* buff_s = ( float* ) FLA_FLOAT_PTR( s );
scomplex* buff_U = ( scomplex* ) FLA_COMPLEX_PTR( U );
scomplex* buff_V = ( scomplex* ) FLA_COMPLEX_PTR( V );
scomplex* buff_work = ( scomplex* ) FLA_COMPLEX_PTR( work );
float* buff_rwork = ( float* ) FLA_FLOAT_PTR( rwork );
F77_cgesvd( &blas_jobu,
&blas_jobv,
&m_A,
&n_A,
buff_A, &cs_A,
buff_s,
buff_U, &cs_U,
buff_V, &cs_V,
buff_work, &lwork,
buff_rwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
double* buff_s = ( double* ) FLA_DOUBLE_PTR( s );
dcomplex* buff_U = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( U );
dcomplex* buff_V = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( V );
dcomplex* buff_work = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( work );
double* buff_rwork = ( double* ) FLA_DOUBLE_PTR( rwork );
F77_zgesvd( &blas_jobu,
&blas_jobv,
&m_A,
&n_A,
buff_A, &cs_A,
buff_s,
buff_U, &cs_U,
buff_V, &cs_V,
buff_work, &lwork,
buff_rwork,
&info );
break;
}
}
}
FLA_Obj_free( &work );
if ( FLA_Obj_is_complex( A ) )
FLA_Obj_free( &rwork );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Svdd_check | ( | FLA_Svd_type | jobz, |
| FLA_Obj | A, | ||
| FLA_Obj | s, | ||
| FLA_Obj | U, | ||
| FLA_Obj | V | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_real_object(), FLA_Check_square(), FLA_Check_valid_svd_type(), FLA_Check_vector_dim(), FLA_Obj_length(), FLA_Obj_min_dim(), and FLA_Obj_width().
Referenced by FLA_Svdd_external().
{
FLA_Error e_val;
e_val = FLA_Check_valid_svd_type( jobz );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_real_object( s );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( A, s );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, U );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, V );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( s, FLA_Obj_min_dim( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( U, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( U );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( V, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( V );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Svdd_external | ( | FLA_Svd_type | jobz, |
| FLA_Obj | A, | ||
| FLA_Obj | s, | ||
| FLA_Obj | U, | ||
| FLA_Obj | V | ||
| ) |
References F77_cgesdd(), F77_dgesdd(), F77_sgesdd(), F77_zgesdd(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_is_complex(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_svd_type(), and FLA_Svdd_check().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
FLA_Datatype dt_real;
FLA_Datatype dt_int;
int m_A, n_A, cs_A;
int cs_U;
int cs_V;
int min_m_n;
int lwork, lrwork, liwork;
FLA_Obj work, rwork, iwork;
char blas_jobz;
int i;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Svdd_check( jobz, A, s, U, V );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
dt_real = FLA_Obj_datatype_proj_to_real( A );
dt_int = FLA_INT;
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
cs_U = FLA_Obj_col_stride( U );
cs_V = FLA_Obj_col_stride( V );
min_m_n = min( m_A, n_A );
// Allocate the rwork and iwork arrays up front.
if ( jobz == FLA_SVD_VECTORS_NONE ) lrwork = 5 * min_m_n;
else lrwork = 5 * min_m_n * min_m_n +
7 * min_m_n;
liwork = 8 * min_m_n;
FLA_Obj_create( dt_int, liwork, 1, 0, 0, &iwork );
if ( FLA_Obj_is_complex( A ) )
FLA_Obj_create( dt_real, lrwork, 1, 0, 0, &rwork );
FLA_Param_map_flame_to_netlib_svd_type( jobz, &blas_jobz );
// Make a workspace query the first time through. This will provide us with
// and ideal workspace size based on an internal block size.
lwork = -1;
FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
for ( i = 0; i < 2; ++i )
{
if ( i == 1 )
{
// Grab the queried ideal workspace size from the work array, free the
// work object, and then re-allocate the workspace with the ideal size.
if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
lwork = ( int ) *FLA_FLOAT_PTR( work );
else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
lwork = ( int ) *FLA_DOUBLE_PTR( work );
FLA_Obj_free( &work );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
}
switch( datatype ) {
case FLA_FLOAT:
{
float* buff_A = ( float* ) FLA_FLOAT_PTR( A );
float* buff_s = ( float* ) FLA_FLOAT_PTR( s );
float* buff_U = ( float* ) FLA_FLOAT_PTR( U );
float* buff_V = ( float* ) FLA_FLOAT_PTR( V );
float* buff_work = ( float* ) FLA_FLOAT_PTR( work );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_sgesdd( &blas_jobz,
&m_A,
&n_A,
buff_A, &cs_A,
buff_s,
buff_U, &cs_U,
buff_V, &cs_V,
buff_work, &lwork,
buff_iwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double* ) FLA_DOUBLE_PTR( A );
double* buff_s = ( double* ) FLA_DOUBLE_PTR( s );
double* buff_U = ( double* ) FLA_DOUBLE_PTR( U );
double* buff_V = ( double* ) FLA_DOUBLE_PTR( V );
double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_dgesdd( &blas_jobz,
&m_A,
&n_A,
buff_A, &cs_A,
buff_s,
buff_U, &cs_U,
buff_V, &cs_V,
buff_work, &lwork,
buff_iwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex* ) FLA_COMPLEX_PTR( A );
float* buff_s = ( float* ) FLA_FLOAT_PTR( s );
scomplex* buff_U = ( scomplex* ) FLA_COMPLEX_PTR( U );
scomplex* buff_V = ( scomplex* ) FLA_COMPLEX_PTR( V );
scomplex* buff_work = ( scomplex* ) FLA_COMPLEX_PTR( work );
float* buff_rwork = ( float* ) FLA_FLOAT_PTR( rwork );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_cgesdd( &blas_jobz,
&m_A,
&n_A,
buff_A, &cs_A,
buff_s,
buff_U, &cs_U,
buff_V, &cs_V,
buff_work, &lwork,
buff_rwork,
buff_iwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
double* buff_s = ( double* ) FLA_DOUBLE_PTR( s );
dcomplex* buff_U = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( U );
dcomplex* buff_V = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( V );
dcomplex* buff_work = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( work );
double* buff_rwork = ( double* ) FLA_DOUBLE_PTR( rwork );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_zgesdd( &blas_jobz,
&m_A,
&n_A,
buff_A, &cs_A,
buff_s,
buff_U, &cs_U,
buff_V, &cs_V,
buff_work, &lwork,
buff_rwork,
buff_iwork,
&info );
break;
}
}
}
FLA_Obj_free( &work );
FLA_Obj_free( &iwork );
if ( FLA_Obj_is_complex( A ) )
FLA_Obj_free( &rwork );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Sylv | ( | FLA_Trans | transa, |
| FLA_Trans | transb, | ||
| FLA_Obj | isgn, | ||
| FLA_Obj | A, | ||
| FLA_Obj | B, | ||
| FLA_Obj | C, | ||
| FLA_Obj | scale | ||
| ) |
References FLA_Check_error_level(), FLA_Sylv_check(), and FLA_Sylv_internal().
{
FLA_Error r_val;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Sylv_check( transa, transb, isgn, A, B, C, scale );
// Invoke FLA_Sylv_internal() with the appropriate control tree.
r_val = FLA_Sylv_internal( transa, transb, isgn, A, B, C, scale, fla_sylv_cntl );
return r_val;
}
| FLA_Error FLA_Sylv_blk_external | ( | FLA_Trans | transa, |
| FLA_Trans | transb, | ||
| FLA_Obj | isgn, | ||
| FLA_Obj | A, | ||
| FLA_Obj | B, | ||
| FLA_Obj | C, | ||
| FLA_Obj | scale | ||
| ) |
References FLA_Sylv_unb_external().
Referenced by FLA_Sylv_hh_blk_ext(), FLA_Sylv_hn_blk_ext(), FLA_Sylv_nh_blk_ext(), and FLA_Sylv_nn_blk_ext().
{
FLA_Error e_val = FLA_FAILURE;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
e_val = FLA_Sylv_unb_external( transa, transb, isgn, A, B, C, scale );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return e_val;
}
| FLA_Error FLA_Sylv_check | ( | FLA_Trans | transa, |
| FLA_Trans | transb, | ||
| FLA_Obj | isgn, | ||
| FLA_Obj | A, | ||
| FLA_Obj | B, | ||
| FLA_Obj | C, | ||
| FLA_Obj | scale | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_sylv_matrix_dims(), FLA_Check_valid_blas_trans(), and FLA_Check_valid_isgn_value().
Referenced by FLA_Sylv(), FLA_Sylv_unb_external(), and FLASH_Sylv().
{
FLA_Error e_val;
e_val = FLA_Check_valid_blas_trans( transa );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_blas_trans( transb );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_scalar( isgn );
FLA_Check_error_code( e_val );
e_val = FLA_Check_int_object( isgn );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_isgn_value( isgn );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_sylv_matrix_dims( A, B, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_scalar( scale );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( C, scale );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Sylv_blk_external().
Referenced by FLA_Sylv_hh().
{
return FLA_Sylv_blk_external( FLA_CONJ_TRANSPOSE, FLA_CONJ_TRANSPOSE, isgn, A, B, C, scale );
}
| FLA_Error FLA_Sylv_hh_task | ( | FLA_Obj | isgn, |
| FLA_Obj | A, | ||
| FLA_Obj | B, | ||
| FLA_Obj | C, | ||
| FLA_Obj | scale, | ||
| fla_sylv_t * | cntl | ||
| ) |
References FLA_Sylv_internal().
{
//return FLA_Sylv_unb_external( FLA_CONJ_TRANSPOSE, FLA_CONJ_TRANSPOSE, isgn, A, B, C, scale );
return FLA_Sylv_internal( FLA_CONJ_TRANSPOSE, FLA_CONJ_TRANSPOSE,
isgn, A, B, C, scale,
fla_sylv_cntl_leaf );
}
References FLA_Sylv_unb_external().
Referenced by FLA_Sylv_hh().
{
return FLA_Sylv_unb_external( FLA_CONJ_TRANSPOSE, FLA_CONJ_TRANSPOSE, isgn, A, B, C, scale );
}
References FLA_Sylv_blk_external().
Referenced by FLA_Sylv_hn().
{
return FLA_Sylv_blk_external( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE, isgn, A, B, C, scale );
}
| FLA_Error FLA_Sylv_hn_task | ( | FLA_Obj | isgn, |
| FLA_Obj | A, | ||
| FLA_Obj | B, | ||
| FLA_Obj | C, | ||
| FLA_Obj | scale, | ||
| fla_sylv_t * | cntl | ||
| ) |
References FLA_Sylv_internal().
{
//return FLA_Sylv_unb_external( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE, isgn, A, B, C, scale );
return FLA_Sylv_internal( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE,
isgn, A, B, C, scale,
fla_sylv_cntl_leaf );
}
References FLA_Sylv_unb_external().
Referenced by FLA_Sylv_hn().
{
return FLA_Sylv_unb_external( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE, isgn, A, B, C, scale );
}
| FLA_Error FLA_Sylv_internal_check | ( | FLA_Trans | transa, |
| FLA_Trans | transb, | ||
| FLA_Obj | isgn, | ||
| FLA_Obj | A, | ||
| FLA_Obj | B, | ||
| FLA_Obj | C, | ||
| FLA_Obj | scale, | ||
| fla_sylv_t * | cntl | ||
| ) |
References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), and FLA_Check_sylv_matrix_dims().
Referenced by FLA_Sylv_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( A, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( A, C );
FLA_Check_error_code( e_val );
// Verify conformality between all the objects. This check works regardless
// of whether the element type is FLA_MATRIX or FLA_SCALAR because the
// element length and width are used instead of scalar length and width.
e_val = FLA_Check_sylv_matrix_dims( A, B, C );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Sylv_blk_external().
Referenced by FLA_Sylv_nh().
{
return FLA_Sylv_blk_external( FLA_NO_TRANSPOSE, FLA_CONJ_TRANSPOSE, isgn, A, B, C, scale );
}
| FLA_Error FLA_Sylv_nh_task | ( | FLA_Obj | isgn, |
| FLA_Obj | A, | ||
| FLA_Obj | B, | ||
| FLA_Obj | C, | ||
| FLA_Obj | scale, | ||
| fla_sylv_t * | cntl | ||
| ) |
References FLA_Sylv_internal().
{
//return FLA_Sylv_unb_external( FLA_NO_TRANSPOSE, FLA_CONJ_TRANSPOSE, isgn, A, B, C, scale );
return FLA_Sylv_internal( FLA_NO_TRANSPOSE, FLA_CONJ_TRANSPOSE,
isgn, A, B, C, scale,
fla_sylv_cntl_leaf );
}
References FLA_Sylv_unb_external().
Referenced by FLA_Sylv_nh().
{
return FLA_Sylv_unb_external( FLA_NO_TRANSPOSE, FLA_CONJ_TRANSPOSE, isgn, A, B, C, scale );
}
References FLA_Sylv_blk_external().
Referenced by FLA_Sylv_nn().
{
return FLA_Sylv_blk_external( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, isgn, A, B, C, scale );
}
| FLA_Error FLA_Sylv_nn_task | ( | FLA_Obj | isgn, |
| FLA_Obj | A, | ||
| FLA_Obj | B, | ||
| FLA_Obj | C, | ||
| FLA_Obj | scale, | ||
| fla_sylv_t * | cntl | ||
| ) |
References FLA_Sylv_internal().
{
//return FLA_Sylv_unb_external( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, isgn, A, B, C, scale );
return FLA_Sylv_internal( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE,
isgn, A, B, C, scale,
fla_sylv_cntl_leaf );
}
References FLA_Sylv_unb_external().
Referenced by FLA_Sylv_nn().
{
return FLA_Sylv_unb_external( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, isgn, A, B, C, scale );
}
| FLA_Error FLA_Sylv_task | ( | FLA_Trans | transa, |
| FLA_Trans | transb, | ||
| FLA_Obj | isgn, | ||
| FLA_Obj | A, | ||
| FLA_Obj | B, | ||
| FLA_Obj | C, | ||
| FLA_Obj | scale, | ||
| fla_sylv_t * | cntl | ||
| ) |
References FLA_Sylv_internal().
Referenced by FLASH_Queue_exec_task().
{
return FLA_Sylv_internal( transa, transb,
isgn, A, B, C, scale,
fla_sylv_cntl_leaf );
}
| FLA_Error FLA_Sylv_unb_external | ( | FLA_Trans | transa, |
| FLA_Trans | transb, | ||
| FLA_Obj | isgn, | ||
| FLA_Obj | A, | ||
| FLA_Obj | B, | ||
| FLA_Obj | C, | ||
| FLA_Obj | scale | ||
| ) |
References F77_ctrsyl(), F77_dtrsyl(), F77_strsyl(), F77_ztrsyl(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_ONE, FLA_Param_map_flame_to_netlib_trans(), FLA_Set(), and FLA_Sylv_check().
Referenced by FLA_Sylv_blk_external(), FLA_Sylv_hh_unb_ext(), FLA_Sylv_hn_unb_ext(), FLA_Sylv_nh_unb_ext(), and FLA_Sylv_nn_unb_ext().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int cs_A;
int cs_B;
int m_C, n_C, cs_C;
char blas_transa;
char blas_transb;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Sylv_check( transa, transb, isgn, A, B, C, scale );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
if ( FLA_Obj_has_zero_dim( B ) ) return FLA_SUCCESS;
if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_C = FLA_Obj_length( C );
n_C = FLA_Obj_width( C );
cs_C = FLA_Obj_col_stride( C );
cs_A = FLA_Obj_col_stride( A );
cs_B = FLA_Obj_col_stride( B );
FLA_Param_map_flame_to_netlib_trans( transa, &blas_transa );
FLA_Param_map_flame_to_netlib_trans( transb, &blas_transb );
switch( datatype ){
case FLA_FLOAT:
{
int *buff_isgn = ( int * ) FLA_INT_PTR( isgn );
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
float *buff_C = ( float * ) FLA_FLOAT_PTR( C );
float *buff_scale = ( float * ) FLA_FLOAT_PTR( scale );
F77_strsyl( &blas_transa,
&blas_transb,
buff_isgn,
&m_C,
&n_C,
buff_A, &cs_A,
buff_B, &cs_B,
buff_C, &cs_C,
buff_scale,
&info );
break;
}
case FLA_DOUBLE:
{
int *buff_isgn = ( int * ) FLA_INT_PTR( isgn );
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
double *buff_C = ( double * ) FLA_DOUBLE_PTR( C );
double *buff_scale = ( double * ) FLA_DOUBLE_PTR( scale );
F77_dtrsyl( &blas_transa,
&blas_transb,
buff_isgn,
&m_C,
&n_C,
buff_A, &cs_A,
buff_B, &cs_B,
buff_C, &cs_C,
buff_scale,
&info );
break;
}
case FLA_COMPLEX:
{
int *buff_isgn = ( int * ) FLA_INT_PTR( isgn );
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
scomplex *buff_C = ( scomplex * ) FLA_COMPLEX_PTR( C );
float *buff_scale = ( float * ) FLA_COMPLEX_PTR( scale );
F77_ctrsyl( &blas_transa,
&blas_transb,
buff_isgn,
&m_C,
&n_C,
buff_A, &cs_A,
buff_B, &cs_B,
buff_C, &cs_C,
buff_scale,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
int *buff_isgn = ( int * ) FLA_INT_PTR( isgn );
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
dcomplex *buff_C = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( C );
double *buff_scale = ( double * ) FLA_DOUBLE_COMPLEX_PTR( scale );
F77_ztrsyl( &blas_transa,
&blas_transb,
buff_isgn,
&m_C,
&n_C,
buff_A, &cs_A,
buff_B, &cs_B,
buff_C, &cs_C,
buff_scale,
&info );
break;
}
}
// We don't provide a comprehensive strategy for handing scaling to avoid
// overflow, so we just force the scale argument to 1.0.
FLA_Set( FLA_ONE, scale );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Tevd_compute_scaling_check | ( | FLA_Obj | d, |
| FLA_Obj | e, | ||
| FLA_Obj | sigma | ||
| ) |
| FLA_Error FLA_Tevd_external | ( | FLA_Evd_type | jobz, |
| FLA_Obj | d, | ||
| FLA_Obj | e, | ||
| FLA_Obj | A | ||
| ) |
References F77_csteqr(), F77_dsteqr(), F77_ssteqr(), F77_zsteqr(), FLA_Copy(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), and FLA_Param_map_flame_to_netlib_evd_type().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
FLA_Datatype dt_real;
int n_A, cs_A;
int inc_d, inc_e;
int lwork;
FLA_Obj work, d_use, e_use;
char blas_jobz;
//if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
// FLA_Hevd_check( jobz, uplo, A, e );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
dt_real = FLA_Obj_datatype_proj_to_real( A );
n_A = FLA_Obj_vector_dim( d );
cs_A = FLA_Obj_col_stride( A );
if ( FLA_Obj_vector_inc( d ) != 1 )
{
FLA_Obj_create( dt_real, n_A, 1, 0, 0, &d_use );
FLA_Copy( d, d_use );
}
else { d_use = d; }
if ( FLA_Obj_vector_inc( e ) != 1 )
{
FLA_Obj_create( dt_real, n_A-1, 1, 0, 0, &e_use );
FLA_Copy( e, e_use );
}
else { e_use = e; }
inc_d = FLA_Obj_vector_inc( d_use );
inc_e = FLA_Obj_vector_inc( e_use );
// Allocate thw work array up front.
lwork = max( 1.0, 2.0 * n_A - 2 );
FLA_Obj_create( dt_real, lwork, 1, 0, 0, &work );
FLA_Param_map_flame_to_netlib_evd_type( jobz, &blas_jobz );
switch( datatype ) {
case FLA_FLOAT:
{
float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
float* buff_d = ( float * ) FLA_FLOAT_PTR( d_use );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e_use );
float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
F77_ssteqr( &blas_jobz,
&n_A,
buff_d,
buff_e,
buff_A, &cs_A,
buff_work,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double* buff_d = ( double * ) FLA_DOUBLE_PTR( d_use );
double* buff_e = ( double * ) FLA_DOUBLE_PTR( e_use );
double* buff_work = ( double * ) FLA_DOUBLE_PTR( work );
F77_dsteqr( &blas_jobz,
&n_A,
buff_d,
buff_e,
buff_A, &cs_A,
buff_work,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
float* buff_d = ( float * ) FLA_FLOAT_PTR( d_use );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e_use );
float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
F77_csteqr( &blas_jobz,
&n_A,
buff_d,
buff_e,
buff_A, &cs_A,
buff_work,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
double* buff_d = ( double* ) FLA_DOUBLE_PTR( d_use );
double* buff_e = ( double* ) FLA_DOUBLE_PTR( e_use );
double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
F77_zsteqr( &blas_jobz,
&n_A,
buff_d,
buff_e,
buff_A, &cs_A,
buff_work,
&info );
break;
}
}
if ( FLA_Obj_vector_inc( d ) != 1 )
{
FLA_Copy( d_use, d );
FLA_Obj_free( &d_use );
}
if ( FLA_Obj_vector_inc( e ) != 1 )
{
FLA_Copy( e_use, e );
FLA_Obj_free( &e_use );
}
FLA_Obj_free( &work );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Tevdd_external | ( | FLA_Evd_type | jobz, |
| FLA_Obj | d, | ||
| FLA_Obj | e, | ||
| FLA_Obj | A | ||
| ) |
References F77_cstedc(), F77_dstedc(), F77_sstedc(), F77_zstedc(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_is_complex(), FLA_Obj_width(), and FLA_Param_map_flame_to_netlib_evd_type().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
FLA_Datatype dt_real;
int n_A, cs_A;
int lwork, lrwork, liwork;
FLA_Obj work, rwork, iwork;
char blas_jobz;
int i;
//if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
// FLA_Tevdd_check( jobz, d, e, A );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
dt_real = FLA_Obj_datatype_proj_to_real( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Param_map_flame_to_netlib_evd_type( jobz, &blas_jobz );
// Make a workspace query the first time through. This will provide us with
// and ideal workspace size.
lwork = -1;
lrwork = -1;
liwork = -1;
FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
FLA_Obj_create( datatype, 1, 1, 0, 0, &rwork );
FLA_Obj_create( FLA_INT, 1, 1, 0, 0, &iwork );
for ( i = 0; i < 2; ++i )
{
if ( i == 1 )
{
// Grab the queried ideal workspace size from the work arrays, free the
// work object, and then re-allocate the workspace with the ideal size.
if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
{
lwork = ( int ) *FLA_FLOAT_PTR( work );
lrwork = ( int ) *FLA_FLOAT_PTR( rwork );
liwork = ( int ) *FLA_INT_PTR( iwork );
}
else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
{
lwork = ( int ) *FLA_DOUBLE_PTR( work );
lrwork = ( int ) *FLA_DOUBLE_PTR( rwork );
liwork = ( int ) *FLA_INT_PTR( iwork );
}
//printf( "ideal workspace for n = %d\n", n_A );
//printf( " lwork = %d\n", lwork );
//printf( " lrwork = %d\n", lrwork );
//printf( " liwork = %d\n", liwork );
FLA_Obj_free( &work );
FLA_Obj_free( &iwork );
FLA_Obj_free( &rwork );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
FLA_Obj_create( datatype, liwork, 1, 0, 0, &iwork );
if ( FLA_Obj_is_complex( A ) )
FLA_Obj_create( datatype, lrwork, 1, 0, 0, &rwork );
}
switch( datatype ) {
case FLA_FLOAT:
{
float* buff_d = ( float* ) FLA_FLOAT_PTR( d );
float* buff_e = ( float* ) FLA_FLOAT_PTR( e );
float* buff_A = ( float* ) FLA_FLOAT_PTR( A );
float* buff_work = ( float* ) FLA_FLOAT_PTR( work );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_sstedc( &blas_jobz,
&n_A,
buff_d,
buff_e,
buff_A, &cs_A,
buff_work, &lwork,
buff_iwork, &liwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_d = ( double* ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double* ) FLA_DOUBLE_PTR( e );
double* buff_A = ( double* ) FLA_DOUBLE_PTR( A );
double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_dstedc( &blas_jobz,
&n_A,
buff_d,
buff_e,
buff_A, &cs_A,
buff_work, &lwork,
buff_iwork, &liwork,
&info );
break;
}
case FLA_COMPLEX:
{
float* buff_d = ( float* ) FLA_FLOAT_PTR( d );
float* buff_e = ( float* ) FLA_FLOAT_PTR( e );
scomplex* buff_A = ( scomplex* ) FLA_COMPLEX_PTR( A );
scomplex* buff_work = ( scomplex* ) FLA_COMPLEX_PTR( work );
float* buff_rwork = ( float* ) FLA_FLOAT_PTR( rwork );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_cstedc( &blas_jobz,
&n_A,
buff_d,
buff_e,
buff_A, &cs_A,
buff_work, &lwork,
buff_rwork, &lrwork,
buff_iwork, &liwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
double* buff_d = ( double* ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double* ) FLA_DOUBLE_PTR( e );
dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex* buff_work = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( work );
double* buff_rwork = ( double* ) FLA_DOUBLE_PTR( rwork );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_zstedc( &blas_jobz,
&n_A,
buff_d,
buff_e,
buff_A, &cs_A,
buff_work, &lwork,
buff_rwork, &lrwork,
buff_iwork, &liwork,
&info );
break;
}
}
}
FLA_Obj_free( &work );
FLA_Obj_free( &iwork );
if ( FLA_Obj_is_complex( A ) )
FLA_Obj_free( &rwork );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Tevdr_external | ( | FLA_Evd_type | jobz, |
| FLA_Obj | d, | ||
| FLA_Obj | e, | ||
| FLA_Obj | l, | ||
| FLA_Obj | A | ||
| ) |
References F77_cstemr(), F77_dstemr(), F77_sstemr(), F77_zstemr(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_width(), and FLA_Param_map_flame_to_netlib_evd_type().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
FLA_Datatype dt_real;
int n_A, cs_A;
int lisuppz, lwork, liwork;
FLA_Obj isuppz, work, iwork;
char blas_jobz;
char blas_range;
int i;
int vl, vu;
int il, iu;
int nzc;
int try_rac;
int n_eig_found;
//if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
// FLA_Tevdd_check( jobz, d, e, A );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
dt_real = FLA_Obj_datatype_proj_to_real( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Param_map_flame_to_netlib_evd_type( jobz, &blas_jobz );
// Hard-code some parameters.
blas_range = 'A';
nzc = n_A;
try_rac = TRUE;
// Allocate space for the isuppz array.
lisuppz = 2 * n_A;
FLA_Obj_create( FLA_INT, lisuppz, 1, 0, 0, &isuppz );
// Make a workspace query the first time through. This will provide us with
// and ideal workspace size.
lwork = -1;
liwork = -1;
FLA_Obj_create( dt_real, 1, 1, 0, 0, &work );
FLA_Obj_create( FLA_INT, 1, 1, 0, 0, &iwork );
for ( i = 0; i < 2; ++i )
{
if ( i == 1 )
{
// Grab the queried ideal workspace size from the work arrays, free the
// work object, and then re-allocate the workspace with the ideal size.
if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
{
lwork = ( int ) *FLA_FLOAT_PTR( work );
liwork = ( int ) *FLA_INT_PTR( iwork );
}
else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
{
lwork = ( int ) *FLA_DOUBLE_PTR( work );
liwork = ( int ) *FLA_INT_PTR( iwork );
}
//printf( "ideal workspace for n = %d\n", n_A );
//printf( " lwork = %d\n", lwork );
//printf( " liwork = %d\n", liwork );
FLA_Obj_free( &work );
FLA_Obj_free( &iwork );
FLA_Obj_create( dt_real, lwork, 1, 0, 0, &work );
FLA_Obj_create( FLA_INT, liwork, 1, 0, 0, &iwork );
}
switch( datatype ) {
case FLA_FLOAT:
{
float* buff_d = ( float* ) FLA_FLOAT_PTR( d );
float* buff_e = ( float* ) FLA_FLOAT_PTR( e );
float* buff_l = ( float* ) FLA_FLOAT_PTR( l );
float* buff_A = ( float* ) FLA_FLOAT_PTR( A );
int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
float* buff_work = ( float* ) FLA_FLOAT_PTR( work );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_sstemr( &blas_jobz,
&blas_range,
&n_A,
buff_d,
buff_e,
&vl, &vu,
&il, &iu,
&n_eig_found,
buff_l,
buff_A, &cs_A,
&nzc,
buff_isuppz,
&try_rac,
buff_work, &lwork,
buff_iwork, &liwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_d = ( double* ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double* ) FLA_DOUBLE_PTR( e );
double* buff_l = ( double* ) FLA_DOUBLE_PTR( l );
double* buff_A = ( double* ) FLA_DOUBLE_PTR( A );
int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_dstemr( &blas_jobz,
&blas_range,
&n_A,
buff_d,
buff_e,
&vl, &vu,
&il, &iu,
&n_eig_found,
buff_l,
buff_A, &cs_A,
&nzc,
buff_isuppz,
&try_rac,
buff_work, &lwork,
buff_iwork, &liwork,
&info );
break;
}
case FLA_COMPLEX:
{
float* buff_d = ( float* ) FLA_FLOAT_PTR( d );
float* buff_e = ( float* ) FLA_FLOAT_PTR( e );
float* buff_l = ( float* ) FLA_FLOAT_PTR( l );
scomplex* buff_A = ( scomplex* ) FLA_COMPLEX_PTR( A );
int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
float* buff_work = ( float* ) FLA_FLOAT_PTR( work );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_cstemr( &blas_jobz,
&blas_range,
&n_A,
buff_d,
buff_e,
&vl, &vu,
&il, &iu,
&n_eig_found,
buff_l,
buff_A, &cs_A,
&nzc,
buff_isuppz,
&try_rac,
buff_work, &lwork,
buff_iwork, &liwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
double* buff_d = ( double* ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double* ) FLA_DOUBLE_PTR( e );
double* buff_l = ( double* ) FLA_DOUBLE_PTR( l );
dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
F77_zstemr( &blas_jobz,
&blas_range,
&n_A,
buff_d,
buff_e,
&vl, &vu,
&il, &iu,
&n_eig_found,
buff_l,
buff_A, &cs_A,
&nzc,
buff_isuppz,
&try_rac,
buff_work, &lwork,
buff_iwork, &liwork,
&info );
break;
}
}
}
FLA_Obj_free( &isuppz );
FLA_Obj_free( &work );
FLA_Obj_free( &iwork );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Tridiag_apply_Q_check | ( | FLA_Side | side, |
| FLA_Uplo | uplo, | ||
| FLA_Trans | trans, | ||
| FLA_Obj | A, | ||
| FLA_Obj | t, | ||
| FLA_Obj | B | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_valid_complex_trans(), FLA_Check_valid_leftright_side(), FLA_Check_valid_real_trans(), FLA_Check_valid_trans(), FLA_Check_valid_uplo(), FLA_Check_vector_dim_min(), FLA_Obj_is_real(), FLA_Obj_length(), and FLA_Obj_width().
{
FLA_Error e_val;
e_val = FLA_Check_valid_leftright_side( side );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_trans( trans );
FLA_Check_error_code( e_val );
if ( FLA_Obj_is_real( A ) )
{
e_val = FLA_Check_valid_real_trans( trans );
FLA_Check_error_code( e_val );
}
else
{
e_val = FLA_Check_valid_complex_trans( trans );
FLA_Check_error_code( e_val );
}
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, B );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, t );
FLA_Check_error_code( e_val );
if ( side == FLA_LEFT )
{
e_val = FLA_Check_object_length_equals( B, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim_min( t, FLA_Obj_length( A ) - 1 );
FLA_Check_error_code( e_val );
}
else
{
e_val = FLA_Check_object_width_equals( B, FLA_Obj_length( A ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim_min( t, FLA_Obj_width( A ) - 1 );
FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Tridiag_apply_Q_external | ( | FLA_Side | side, |
| FLA_Uplo | uplo, | ||
| FLA_Trans | trans, | ||
| FLA_Obj | A, | ||
| FLA_Obj | t, | ||
| FLA_Obj | B | ||
| ) |
References F77_cunmtr(), F77_dormtr(), F77_sormtr(), F77_zunmtr(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_side(), FLA_Param_map_flame_to_netlib_trans(), and FLA_Param_map_flame_to_netlib_uplo().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
// int m_A, n_A;
int m_B, n_B;
int cs_A;
int cs_B;
int k_t;
int lwork;
char blas_side;
char blas_uplo;
char blas_trans;
FLA_Obj work;
int i;
//if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
// FLA_Apply_Q_check( side, trans, storev, A, t, B );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
// m_A = FLA_Obj_length( A );
// n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
m_B = FLA_Obj_length( B );
n_B = FLA_Obj_width( B );
cs_B = FLA_Obj_col_stride( B );
k_t = FLA_Obj_vector_dim( t );
FLA_Param_map_flame_to_netlib_side( side, &blas_side );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
// Make a workspace query the first time through. This will provide us with
// and ideal workspace size based on an internal block size.
lwork = -1;
FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
for ( i = 0; i < 2; ++i )
{
if ( i == 1 )
{
// Grab the queried ideal workspace size from the work array, free the
// work object, and then re-allocate the workspace with the ideal size.
if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
lwork = ( int ) *FLA_FLOAT_PTR( work );
else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
lwork = ( int ) *FLA_DOUBLE_PTR( work );
FLA_Obj_free( &work );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
}
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
float *buff_work = ( float * ) FLA_FLOAT_PTR( work );
F77_sormtr( &blas_side,
&blas_uplo,
&blas_trans,
&m_B,
&n_B,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
double *buff_work = ( double * ) FLA_DOUBLE_PTR( work );
F77_dormtr( &blas_side,
&blas_uplo,
&blas_trans,
&m_B,
&n_B,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
F77_cunmtr( &blas_side,
&blas_uplo,
&blas_trans,
&m_B,
&n_B,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work );
F77_zunmtr( &blas_side,
&blas_uplo,
&blas_trans,
&m_B,
&n_B,
buff_A, &cs_A,
buff_t,
buff_B, &cs_B,
buff_work, &lwork,
&info );
break;
}
}
}
FLA_Obj_free( &work );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Tridiag_blk_external | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| FLA_Obj | t | ||
| ) |
References F77_chetrd(), F77_dsytrd(), F77_ssytrd(), F77_zhetrd(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_uplo(), FLA_Query_blocksize(), and FLA_Tridiag_check().
Referenced by FLA_Tridiag_blk_ext().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int n_A, cs_A;
int lwork;
FLA_Obj d, e, work_obj;
char blas_uplo;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Tridiag_check( uplo, A, t );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), n_A, 1, 0, 0, &d );
FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), n_A - 1, 1, 0, 0, &e );
lwork = n_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work_obj );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
switch( datatype ){
case FLA_FLOAT:
{
float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
float* buff_t = ( float * ) FLA_FLOAT_PTR( t );
float* buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
F77_ssytrd( &blas_uplo,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_t,
buff_work,
&lwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
double* buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double* buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
F77_dsytrd( &blas_uplo,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_t,
buff_work,
&lwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
scomplex* buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
F77_chetrd( &blas_uplo,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_t,
buff_work,
&lwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
dcomplex* buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex* buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
F77_zhetrd( &blas_uplo,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_t,
buff_work,
&lwork,
&info );
break;
}
}
FLA_Obj_free( &d );
FLA_Obj_free( &e );
FLA_Obj_free( &work_obj );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Tridiag_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| FLA_Obj | t | ||
| ) |
References FLA_Check_col_storage(), FLA_Check_col_vector(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_uplo(), FLA_Check_vector_dim_min(), and FLA_Obj_length().
Referenced by FLA_Tridiag_blk_external(), and FLA_Tridiag_unb_external().
{
FLA_Error e_val;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_vector( t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_col_storage( t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim_min( t, FLA_Obj_length( A ) - 1 );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Tridiag_form_Q_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| FLA_Obj | t | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_uplo(), FLA_Check_vector_dim_min(), and FLA_Obj_length().
Referenced by FLA_Tridiag_form_Q_external().
{
FLA_Error e_val;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( t );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim_min( t, FLA_Obj_length( A ) - 1 );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Tridiag_form_Q_external | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| FLA_Obj | t | ||
| ) |
References F77_cungtr(), F77_dorgtr(), F77_sorgtr(), F77_zungtr(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Param_map_flame_to_netlib_uplo(), FLA_Query_blocksize(), and FLA_Tridiag_form_Q_check().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int m_A;
int cs_A;
int lwork;
char blas_uplo;
FLA_Obj work;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Tridiag_form_Q_check( uplo, A, t );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
lwork = max( 1, ( m_A - 1 ) ) * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
switch( datatype ){
case FLA_FLOAT:
{
float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
float* buff_t = ( float * ) FLA_FLOAT_PTR( t );
float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
F77_sorgtr( &blas_uplo,
&m_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double* buff_t = ( double * ) FLA_DOUBLE_PTR( t );
double* buff_work = ( double * ) FLA_DOUBLE_PTR( work );
F77_dorgtr( &blas_uplo,
&m_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex* buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
F77_cungtr( &blas_uplo,
&m_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work );
F77_zungtr( &blas_uplo,
&m_A,
buff_A, &cs_A,
buff_t,
buff_work, &lwork,
&info );
break;
}
}
FLA_Obj_free( &work );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Tridiag_unb_external | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| FLA_Obj | t | ||
| ) |
References F77_chetd2(), F77_dsytd2(), F77_ssytd2(), F77_zhetd2(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Tridiag_check().
Referenced by FLA_Tridiag_unb_ext().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int n_A, cs_A;
FLA_Obj d, e;
char blas_uplo;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Tridiag_check( uplo, A, t );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
n_A = FLA_Obj_width( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), n_A, 1, 0, 0, &d );
FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), n_A - 1, 1, 0, 0, &e );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
switch( datatype ){
case FLA_FLOAT:
{
float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
float* buff_t = ( float * ) FLA_FLOAT_PTR( t );
F77_ssytd2( &blas_uplo,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_t,
&info );
break;
}
case FLA_DOUBLE:
{
double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
double* buff_t = ( double * ) FLA_DOUBLE_PTR( t );
F77_dsytd2( &blas_uplo,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_t,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
scomplex* buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
F77_chetd2( &blas_uplo,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_t,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
dcomplex* buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
F77_zhetd2( &blas_uplo,
&n_A,
buff_A, &cs_A,
buff_d,
buff_e,
buff_t,
&info );
break;
}
}
FLA_Obj_free( &d );
FLA_Obj_free( &e );
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Tridiag_UT_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| FLA_Obj | T | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), FLA_Check_square(), FLA_Check_valid_uplo(), and FLA_Obj_width().
Referenced by FLA_Tridiag_UT().
{
FLA_Error e_val;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( T, FLA_Obj_width( A ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_uplo(), FLA_Check_vector_dim(), and FLA_Obj_length().
Referenced by FLA_Tridiag_UT_extract_diagonals().
{
FLA_Error e_val;
dim_t m_A;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
m_A = FLA_Obj_length( A );
e_val = FLA_Check_nonconstant_object( d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( d, m_A );
FLA_Check_error_code( e_val );
if ( m_A > 1 )
{
e_val = FLA_Check_nonconstant_object( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( e, m_A - 1 );
FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Tridiag_UT_extract_real_diagonals_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| FLA_Obj | d, | ||
| FLA_Obj | e | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_uplo(), FLA_Check_vector_dim(), and FLA_Obj_length().
Referenced by FLA_Tridiag_UT_extract_real_diagonals().
{
FLA_Error e_val;
dim_t m_A;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
m_A = FLA_Obj_length( A );
e_val = FLA_Check_nonconstant_object( d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( A, d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( d, m_A );
FLA_Check_error_code( e_val );
if ( m_A > 1 )
{
e_val = FLA_Check_nonconstant_object( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( A, e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( e );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( e, m_A - 1 );
FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), FLA_Check_square(), FLA_Check_valid_uplo(), and FLA_Obj_width().
Referenced by FLA_Tridiag_UT_form_Q().
{
FLA_Error e_val;
dim_t n_T;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, T );
FLA_Check_error_code( e_val );
n_T = FLA_Obj_width( T );
e_val = FLA_Check_object_width_equals( A, n_T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( Q );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( Q );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( Q );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, Q );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( Q, n_T );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Tridiag_UT_internal_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| FLA_Obj | T, | ||
| fla_tridiagut_t * | cntl | ||
| ) |
References FLA_Check_identical_object_elemtype(), and FLA_Check_null_pointer().
Referenced by FLA_Tridiag_UT_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( A, T );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Tridiag_UT_realify_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| FLA_Obj | d | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), FLA_Check_square(), FLA_Check_valid_uplo(), and FLA_Obj_vector_dim().
Referenced by FLA_Tridiag_UT_realify().
{
FLA_Error e_val;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( A, d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( A, FLA_Obj_vector_dim( d ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_vector_dim(), and FLA_Obj_vector_dim().
Referenced by FLA_Tridiag_UT_realify_subdiagonal().
{
FLA_Error e_val;
dim_t m_d;
e_val = FLA_Check_floating_object( d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( d );
FLA_Check_error_code( e_val );
m_d = FLA_Obj_vector_dim( d );
if ( m_d > 1 )
{
e_val = FLA_Check_identical_object_datatype( b, d );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( b );
FLA_Check_error_code( e_val );
e_val = FLA_Check_vector_dim( b, m_d - 1 );
FLA_Check_error_code( e_val );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Tridiag_UT_recover_tau_check | ( | FLA_Obj | T, |
| FLA_Obj | tau | ||
| ) |
References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_if_vector(), FLA_Check_object_width_equals(), and FLA_Obj_vector_dim().
Referenced by FLA_Tridiag_UT_recover_tau().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_consistent_object_datatype( T, tau );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_vector( tau );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( T, FLA_Obj_vector_dim( tau ) + 1 );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Tridiag_UT_scale_diagonals_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | alpha, | ||
| FLA_Obj | A | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), and FLA_Check_valid_uplo().
Referenced by FLA_Tridiag_UT_scale_diagonals().
{
FLA_Error e_val;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_real_object( alpha );
FLA_Check_error_code( e_val );
e_val = FLA_Check_if_scalar( alpha );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_precision( A, alpha );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Tridiag_UT_shift_U_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | A | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().
Referenced by FLA_Tridiag_UT_shift_U().
{
FLA_Error e_val;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Blocksize_extract(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Trinv_check(), and FLA_Trinv_internal().
{
FLA_Datatype datatype;
int m_A, r_val = 0;
int FLA_TRINV_VAR3_BLOCKSIZE;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Trinv_check( uplo, diag, A );
// Determine the datatype of the operation.
datatype = FLA_Obj_datatype( A );
// Extract the appropriate blocksize for the given datatype.
FLA_TRINV_VAR3_BLOCKSIZE = FLA_Blocksize_extract( datatype, fla_trinv_var3_bsize );
// Determine the dimension of A.
m_A = FLA_Obj_length( A );
// Invoke FLA_Trinv_internal() with the appropriate control tree.
if ( m_A <= FLA_TRINV_VAR3_BLOCKSIZE )
{
r_val = FLA_Trinv_internal( uplo, diag, A, fla_trinv_cntl_leaf );
}
else if ( FLA_TRINV_VAR3_BLOCKSIZE < m_A )
{
r_val = FLA_Trinv_internal( uplo, diag, A, fla_trinv_cntl );
}
return r_val;
}
| FLA_Error FLA_Trinv_blk_external | ( | FLA_Uplo | uplo, |
| FLA_Diag | diag, | ||
| FLA_Obj | A | ||
| ) |
References F77_ctrtri(), F77_dtrtri(), F77_strtri(), F77_ztrtri(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Param_map_flame_to_netlib_diag(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Trinv_check().
Referenced by FLA_SPDinv_blk_external(), FLA_Trinv_ln_blk_ext(), FLA_Trinv_lu_blk_ext(), FLA_Trinv_un_blk_ext(), and FLA_Trinv_uu_blk_ext().
{
FLA_Error r_val = FLA_SUCCESS;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
int info;
FLA_Datatype datatype;
int m_A, cs_A;
char blas_uplo;
char blas_diag;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Trinv_check( uplo, diag, A );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
FLA_Param_map_flame_to_netlib_diag( diag, &blas_diag );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
F77_strtri( &blas_uplo,
&blas_diag,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
F77_dtrtri( &blas_uplo,
&blas_diag,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
F77_ctrtri( &blas_uplo,
&blas_diag,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
F77_ztrtri( &blas_uplo,
&blas_diag,
&m_A,
buff_A, &cs_A,
&info );
break;
}
}
// Convert to zero-based indexing, if an index was reported.
if ( info > 0 ) r_val = info - 1;
else r_val = FLA_SUCCESS;
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return r_val;
}
| FLA_Error FLA_Trinv_check | ( | FLA_Uplo | uplo, |
| FLA_Diag | diag, | ||
| FLA_Obj | A | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_diag(), and FLA_Check_valid_uplo().
Referenced by FLA_Trinv(), FLA_Trinv_blk_external(), FLA_Trinv_unb_external(), and FLASH_Trinv().
{
FLA_Error e_val;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_valid_diag( diag );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Trinv_internal_check | ( | FLA_Uplo | uplo, |
| FLA_Diag | diag, | ||
| FLA_Obj | A, | ||
| fla_trinv_t * | cntl | ||
| ) |
References FLA_Check_null_pointer().
Referenced by FLA_Trinv_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Trinv_blk_external().
Referenced by FLA_Trinv_ln().
{
return FLA_Trinv_blk_external( FLA_LOWER_TRIANGULAR, FLA_NONUNIT_DIAG, A );
}
| FLA_Error FLA_Trinv_ln_task | ( | FLA_Obj | A, |
| fla_trinv_t * | cntl | ||
| ) |
References FLA_Trinv_internal().
{
//return FLA_Trinv_unb_external( FLA_LOWER_TRIANGULAR, FLA_NONUNIT_DIAG, A );
return FLA_Trinv_internal( FLA_LOWER_TRIANGULAR, FLA_NONUNIT_DIAG, A,
fla_trinv_cntl_leaf );
}
References FLA_Trinv_unb_external().
Referenced by FLA_Trinv_ln().
{
return FLA_Trinv_unb_external( FLA_LOWER_TRIANGULAR, FLA_NONUNIT_DIAG, A );
}
References FLA_Trinv_blk_external().
Referenced by FLA_Trinv_lu().
{
return FLA_Trinv_blk_external( FLA_LOWER_TRIANGULAR, FLA_UNIT_DIAG, A );
}
| FLA_Error FLA_Trinv_lu_task | ( | FLA_Obj | A, |
| fla_trinv_t * | cntl | ||
| ) |
References FLA_Trinv_internal().
{
//return FLA_Trinv_unb_external( FLA_LOWER_TRIANGULAR, FLA_UNIT_DIAG, A );
return FLA_Trinv_internal( FLA_LOWER_TRIANGULAR, FLA_UNIT_DIAG, A,
fla_trinv_cntl_leaf );
}
References FLA_Trinv_unb_external().
Referenced by FLA_Trinv_lu().
{
return FLA_Trinv_unb_external( FLA_LOWER_TRIANGULAR, FLA_UNIT_DIAG, A );
}
| FLA_Error FLA_Trinv_task | ( | FLA_Uplo | uplo, |
| FLA_Diag | diag, | ||
| FLA_Obj | A, | ||
| fla_trinv_t * | cntl | ||
| ) |
References FLA_Trinv_internal().
Referenced by FLASH_Queue_exec_task().
{
return FLA_Trinv_internal( uplo, diag, A,
fla_trinv_cntl_leaf );
}
References FLA_Trinv_blk_external().
Referenced by FLA_Trinv_un().
{
return FLA_Trinv_blk_external( FLA_UPPER_TRIANGULAR, FLA_NONUNIT_DIAG, A );
}
| FLA_Error FLA_Trinv_un_task | ( | FLA_Obj | A, |
| fla_trinv_t * | cntl | ||
| ) |
References FLA_Trinv_internal().
{
//return FLA_Trinv_unb_external( FLA_UPPER_TRIANGULAR, FLA_NONUNIT_DIAG, A );
return FLA_Trinv_internal( FLA_UPPER_TRIANGULAR, FLA_NONUNIT_DIAG, A,
fla_trinv_cntl_leaf );
}
References FLA_Trinv_unb_external().
Referenced by FLA_Trinv_un().
{
return FLA_Trinv_unb_external( FLA_UPPER_TRIANGULAR, FLA_NONUNIT_DIAG, A );
}
| FLA_Error FLA_Trinv_unb_external | ( | FLA_Uplo | uplo, |
| FLA_Diag | diag, | ||
| FLA_Obj | A | ||
| ) |
References F77_ctrti2(), F77_dtrti2(), F77_strti2(), F77_ztrti2(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Param_map_flame_to_netlib_diag(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Trinv_check().
Referenced by FLA_Trinv_ln_unb_ext(), FLA_Trinv_lu_unb_ext(), FLA_Trinv_un_unb_ext(), and FLA_Trinv_uu_unb_ext().
{
FLA_Error r_val = FLA_SUCCESS;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
int info;
FLA_Datatype datatype;
int m_A, cs_A;
char blas_uplo;
char blas_diag;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Trinv_check( uplo, diag, A );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
FLA_Param_map_flame_to_netlib_diag( diag, &blas_diag );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
F77_strti2( &blas_uplo,
&blas_diag,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
F77_dtrti2( &blas_uplo,
&blas_diag,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
F77_ctrti2( &blas_uplo,
&blas_diag,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
F77_ztrti2( &blas_uplo,
&blas_diag,
&m_A,
buff_A, &cs_A,
&info );
break;
}
}
// Convert to zero-based indexing, if an index was reported.
if ( info > 0 ) r_val = info - 1;
else r_val = FLA_SUCCESS;
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return r_val;
}
References FLA_Trinv_blk_external().
Referenced by FLA_Trinv_uu().
{
return FLA_Trinv_blk_external( FLA_UPPER_TRIANGULAR, FLA_UNIT_DIAG, A );
}
| FLA_Error FLA_Trinv_uu_task | ( | FLA_Obj | A, |
| fla_trinv_t * | cntl | ||
| ) |
References FLA_Trinv_internal().
{
//return FLA_Trinv_unb_external( FLA_UPPER_TRIANGULAR, FLA_UNIT_DIAG, A );
return FLA_Trinv_internal( FLA_UPPER_TRIANGULAR, FLA_UNIT_DIAG, A,
fla_trinv_cntl_leaf );
}
References FLA_Trinv_unb_external().
Referenced by FLA_Trinv_uu().
{
return FLA_Trinv_unb_external( FLA_UPPER_TRIANGULAR, FLA_UNIT_DIAG, A );
}
| FLA_Error FLA_Trsm_piv_task | ( | FLA_Obj | A, |
| FLA_Obj | B, | ||
| FLA_Obj | p, | ||
| fla_trsm_t * | cntl | ||
| ) |
References FLA_Apply_pivots(), FLA_ONE, and FLA_Trsm_external().
Referenced by FLASH_Queue_exec_task(), and FLASH_Trsm_piv().
{
FLA_Apply_pivots( FLA_LEFT, FLA_NO_TRANSPOSE,
p, B );
FLA_Trsm_external( FLA_LEFT, FLA_LOWER_TRIANGULAR,
FLA_NO_TRANSPOSE, FLA_UNIT_DIAG,
FLA_ONE, A, B );
return FLA_SUCCESS;
}
References FLA_Blocksize_extract(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Ttmm_check(), and FLA_Ttmm_internal().
{
FLA_Datatype datatype;
int m_A, r_val = 0;
int FLA_TTMM_VAR1_BLOCKSIZE;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Ttmm_check( uplo, A );
// Determine the datatype of the operation.
datatype = FLA_Obj_datatype( A );
// Extract the appropriate blocksize for the given datatype.
FLA_TTMM_VAR1_BLOCKSIZE = FLA_Blocksize_extract( datatype, fla_ttmm_var1_bsize );
// Determine the dimension of A.
m_A = FLA_Obj_length( A );
// Invoke FLA_Ttmm_internal() with the appropriate control tree.
if ( m_A <= FLA_TTMM_VAR1_BLOCKSIZE )
{
r_val = FLA_Ttmm_internal( uplo, A, fla_ttmm_cntl_leaf );
}
else if ( FLA_TTMM_VAR1_BLOCKSIZE < m_A )
{
r_val = FLA_Ttmm_internal( uplo, A, fla_ttmm_cntl );
}
return r_val;
}
| FLA_Error FLA_Ttmm_blk_external | ( | FLA_Uplo | uplo, |
| FLA_Obj | A | ||
| ) |
References F77_clauum(), F77_dlauum(), F77_slauum(), F77_zlauum(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Ttmm_check().
Referenced by FLA_SPDinv_blk_external(), FLA_Ttmm_l_blk_ext(), and FLA_Ttmm_u_blk_ext().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int m_A, cs_A;
char blas_uplo;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Ttmm_check( uplo, A );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
F77_slauum( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
F77_dlauum( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
F77_clauum( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
F77_zlauum( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
}
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
| FLA_Error FLA_Ttmm_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | A | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().
Referenced by FLA_Ttmm(), FLA_Ttmm_blk_external(), FLA_Ttmm_unb_external(), and FLASH_Ttmm().
{
FLA_Error e_val;
e_val = FLA_Check_valid_uplo( uplo );
FLA_Check_error_code( e_val );
e_val = FLA_Check_floating_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( A );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( A );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_internal_check | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| fla_ttmm_t * | cntl | ||
| ) |
References FLA_Check_null_pointer().
Referenced by FLA_Ttmm_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Ttmm_blk_external().
Referenced by FLA_Ttmm_l().
{
return FLA_Ttmm_blk_external( FLA_LOWER_TRIANGULAR, A );
}
| FLA_Error FLA_Ttmm_l_task | ( | FLA_Obj | A, |
| fla_ttmm_t * | cntl | ||
| ) |
References FLA_Ttmm_internal().
{
//return FLA_Ttmm_unb_external( FLA_LOWER_TRIANGULAR, A );
return FLA_Ttmm_internal( FLA_LOWER_TRIANGULAR, A,
fla_ttmm_cntl_leaf );
}
References FLA_Ttmm_unb_external().
Referenced by FLA_Ttmm_l().
{
return FLA_Ttmm_unb_external( FLA_LOWER_TRIANGULAR, A );
}
| FLA_Error FLA_Ttmm_task | ( | FLA_Uplo | uplo, |
| FLA_Obj | A, | ||
| fla_ttmm_t * | cntl | ||
| ) |
References FLA_Ttmm_internal().
Referenced by FLASH_Queue_exec_task().
{
return FLA_Ttmm_internal( uplo, A,
fla_ttmm_cntl_leaf );
}
References FLA_Ttmm_blk_external().
Referenced by FLA_Ttmm_u().
{
return FLA_Ttmm_blk_external( FLA_UPPER_TRIANGULAR, A );
}
| FLA_Error FLA_Ttmm_u_task | ( | FLA_Obj | A, |
| fla_ttmm_t * | cntl | ||
| ) |
References FLA_Ttmm_internal().
{
//return FLA_Ttmm_unb_external( FLA_UPPER_TRIANGULAR, A );
return FLA_Ttmm_internal( FLA_UPPER_TRIANGULAR, A,
fla_ttmm_cntl_leaf );
}
References FLA_Ttmm_unb_external().
Referenced by FLA_Ttmm_u().
{
return FLA_Ttmm_unb_external( FLA_UPPER_TRIANGULAR, A );
}
| FLA_Error FLA_Ttmm_unb_external | ( | FLA_Uplo | uplo, |
| FLA_Obj | A | ||
| ) |
References F77_clauu2(), F77_dlauu2(), F77_slauu2(), F77_zlauu2(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Ttmm_check().
Referenced by FLA_Ttmm_l_unb_ext(), and FLA_Ttmm_u_unb_ext().
{
int info = 0;
#ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
FLA_Datatype datatype;
int m_A, cs_A;
char blas_uplo;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Ttmm_check( uplo, A );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
cs_A = FLA_Obj_col_stride( A );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
F77_slauu2( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
F77_dlauu2( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
F77_clauu2( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
F77_zlauu2( &blas_uplo,
&m_A,
buff_A, &cs_A,
&info );
break;
}
}
#else
FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
#endif
return info;
}
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), FLA_Check_square(), and FLA_Obj_width().
Referenced by FLA_UDdate_UT().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, D );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( R, FLA_Obj_width( C ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( R, FLA_Obj_width( D ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( R, FLA_Obj_width( T ) );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_square(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLASH_UDdate_UT_inc().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, D );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, W );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( R, FLA_Obj_width( C ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( R, FLA_Obj_width( D ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( R, FLA_Obj_width( T ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( T, max( FLA_Obj_length( C ),
FLA_Obj_length( D ) ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, R, W );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_UDdate_UT_inc_solve_check | ( | FLA_Obj | R, |
| FLA_Obj | bR, | ||
| FLA_Obj | x | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), and FLA_Check_square().
Referenced by FLASH_UDdate_UT_inc_solve().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, bR );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, x );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, R, x, bR );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_UDdate_UT_inc_update_rhs_check | ( | FLA_Obj | T, |
| FLA_Obj | bR, | ||
| FLA_Obj | C, | ||
| FLA_Obj | bC, | ||
| FLA_Obj | D, | ||
| FLA_Obj | bD | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLASH_UDdate_UT_inc_update_rhs().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( T, bR );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( T, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( T, bC );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( T, D );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( T, bD );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( T, max( FLA_Obj_length( C ),
FLA_Obj_length( D ) ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( C, FLA_Obj_width( T ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( D, FLA_Obj_width( T ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, C, bR, bC );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, bR, bD );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_UDdate_UT_internal_check | ( | FLA_Obj | R, |
| FLA_Obj | C, | ||
| FLA_Obj | D, | ||
| FLA_Obj | T, | ||
| fla_uddateut_t * | cntl | ||
| ) |
References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_square(), FLA_Obj_elemtype(), FLA_Obj_length(), and FLA_Obj_width().
Referenced by FLA_UDdate_UT_internal().
{
FLA_Error e_val;
// Abort if the control structure is NULL.
e_val = FLA_Check_null_pointer( ( void* ) cntl );
FLA_Check_error_code( e_val );
// Verify that the object element types are identical.
e_val = FLA_Check_identical_object_elemtype( R, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( R, D );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_elemtype( R, T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( R );
FLA_Check_error_code( e_val );
if ( FLA_Obj_elemtype( R ) == FLA_MATRIX )
{
e_val = FLA_Check_object_width_equals( R, FLA_Obj_width( C ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( R, FLA_Obj_width( D ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( R, FLA_Obj_width( T ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_length_equals( T, max( FLA_Obj_length( C ),
FLA_Obj_length( D ) ) );
FLA_Check_error_code( e_val );
}
else
{
}
return FLA_SUCCESS;
}
| FLA_Error FLA_UDdate_UT_solve_check | ( | FLA_Obj | R, |
| FLA_Obj | bR, | ||
| FLA_Obj | x | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), and FLA_Check_square().
Referenced by FLA_UDdate_UT_solve().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, bR );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( R, x );
FLA_Check_error_code( e_val );
e_val = FLA_Check_square( R );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, R, x, bR );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
| FLA_Error FLA_UDdate_UT_task | ( | FLA_Obj | R, |
| FLA_Obj | C, | ||
| FLA_Obj | D, | ||
| FLA_Obj | T, | ||
| fla_uddateut_t * | cntl | ||
| ) |
References FLA_UDdate_UT_internal().
Referenced by FLASH_Queue_exec_task().
{
return FLA_UDdate_UT_internal( R, C, D, T,
fla_uddateut_cntl_leaf );
}
| FLA_Error FLA_UDdate_UT_update_rhs_check | ( | FLA_Obj | T, |
| FLA_Obj | bR, | ||
| FLA_Obj | C, | ||
| FLA_Obj | bC, | ||
| FLA_Obj | D, | ||
| FLA_Obj | bD | ||
| ) |
References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), and FLA_Obj_width().
Referenced by FLA_UDdate_UT_update_rhs().
{
FLA_Error e_val;
e_val = FLA_Check_floating_object( T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_nonconstant_object( T );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( T, bR );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( T, C );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( T, bC );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( T, D );
FLA_Check_error_code( e_val );
e_val = FLA_Check_identical_object_datatype( T, bD );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( C, FLA_Obj_width( T ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_object_width_equals( D, FLA_Obj_width( T ) );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, C, bR, bC );
FLA_Check_error_code( e_val );
e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, bR, bD );
FLA_Check_error_code( e_val );
return FLA_SUCCESS;
}
1.7.6.1