|
libflame
revision_anchor
|
Go to the source code of this file.
Functions | |
| FLA_Error | FLASH_Apply_Q_UT_inc (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_Error | FLASH_Apply_Q_UT_inc_create_workspace (FLA_Obj TW, FLA_Obj B, FLA_Obj *W) |
| FLA_Error | FLA_Apply_Q_UT_inc_internal (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) |
| FLA_Error | FLA_Apply_Q_UT_inc_lhfc (FLA_Obj A, FLA_Obj TW, FLA_Obj W1, FLA_Obj B, fla_apqutinc_t *cntl) |
| FLA_Error | FLA_Apply_Q_UT_inc_lnfc (FLA_Obj A, FLA_Obj TW, FLA_Obj W1, FLA_Obj B, fla_apqutinc_t *cntl) |
| FLA_Error FLA_Apply_Q_UT_inc_internal | ( | 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_Apply_Q_UT_inc_internal_check(), FLA_Apply_Q_UT_inc_lhfc(), FLA_Apply_Q_UT_inc_lnfc(), and FLA_Check_error_level().
Referenced by FLASH_Apply_Q_UT_inc().
{
FLA_Error r_val = FLA_SUCCESS;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Apply_Q_UT_inc_internal_check( side, trans, direct, storev, A, TW, W1, B, cntl );
if ( side == FLA_LEFT )
{
if ( trans == FLA_NO_TRANSPOSE )
{
if ( direct == FLA_FORWARD )
{
if ( storev == FLA_COLUMNWISE )
r_val = FLA_Apply_Q_UT_inc_lnfc( A, TW, W1, B, cntl );
else if ( storev == FLA_ROWWISE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
else if ( direct == FLA_BACKWARD )
{
if ( storev == FLA_COLUMNWISE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
else if ( storev == FLA_ROWWISE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
}
else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE )
{
if ( direct == FLA_FORWARD )
{
if ( storev == FLA_COLUMNWISE )
r_val = FLA_Apply_Q_UT_inc_lhfc( A, TW, W1, B, cntl );
else if ( storev == FLA_ROWWISE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
else if ( direct == FLA_BACKWARD )
{
if ( storev == FLA_COLUMNWISE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
else if ( storev == FLA_ROWWISE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
}
}
else if ( side == FLA_RIGHT )
{
if ( trans == FLA_NO_TRANSPOSE )
{
if ( direct == FLA_FORWARD )
{
if ( storev == FLA_COLUMNWISE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
else if ( storev == FLA_ROWWISE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
else if ( direct == FLA_BACKWARD )
{
if ( storev == FLA_COLUMNWISE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
else if ( storev == FLA_ROWWISE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
}
else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE )
{
if ( direct == FLA_FORWARD )
{
if ( storev == FLA_COLUMNWISE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
else if ( storev == FLA_ROWWISE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
else if ( direct == FLA_BACKWARD )
{
if ( storev == FLA_COLUMNWISE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
else if ( storev == FLA_ROWWISE )
FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
}
}
}
return r_val;
}
| FLA_Error FLA_Apply_Q_UT_inc_lhfc | ( | FLA_Obj | A, |
| FLA_Obj | TW, | ||
| FLA_Obj | W1, | ||
| FLA_Obj | B, | ||
| fla_apqutinc_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_inc_lhfc_blk_var1().
Referenced by FLA_Apply_Q_UT_inc_internal().
{
return FLA_Apply_Q_UT_inc_lhfc_blk_var1( A, TW, W1, B, cntl );
}
| FLA_Error FLA_Apply_Q_UT_inc_lnfc | ( | FLA_Obj | A, |
| FLA_Obj | TW, | ||
| FLA_Obj | W1, | ||
| FLA_Obj | B, | ||
| fla_apqutinc_t * | cntl | ||
| ) |
References FLA_Apply_Q_UT_inc_lnfc_blk_var1().
Referenced by FLA_Apply_Q_UT_inc_internal().
{
return FLA_Apply_Q_UT_inc_lnfc_blk_var1( A, TW, W1, B, cntl );
}
| FLA_Error FLASH_Apply_Q_UT_inc | ( | 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_Apply_Q_UT_inc_check(), FLA_Apply_Q_UT_inc_internal(), FLA_Check_error_level(), FLASH_Queue_begin(), and FLASH_Queue_end().
{
FLA_Error r_val;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Apply_Q_UT_inc_check( side, trans, direct, storev, A, TW, W1, B );
// Begin a parallel region.
FLASH_Queue_begin();
// Invoke FLA_Apply_Q_UT_inc_internal() with the standard control tree.
r_val = FLA_Apply_Q_UT_inc_internal( side, trans, direct, storev, A, TW, W1, B, flash_apqutinc_cntl );
// End the parallel region.
FLASH_Queue_end();
return r_val;
}
| FLA_Error FLASH_Apply_Q_UT_inc_create_workspace | ( | FLA_Obj | TW, |
| FLA_Obj | B, | ||
| FLA_Obj * | W | ||
| ) |
References FLA_Abort(), FLA_Obj_datatype(), FLA_Obj_width(), FLA_Print_message(), FLASH_Obj_create_ext(), FLASH_Obj_depth(), FLASH_Obj_scalar_length_tl(), and FLASH_Obj_scalar_width_tl().
Referenced by FLASH_QR_UT_inc_solve().
{
FLA_Datatype datatype;
dim_t depth;
dim_t b_alg;
dim_t b_flash;
dim_t m, n;
// Query the depth.
depth = FLASH_Obj_depth( TW );
// *** The current Apply_Q_UT_inc algorithm implemented assumes that
// the matrix has a hierarchical depth of 1. We check for that here
// because we anticipate that we'll use a more general algorithm in the
// future, and we don't want to forget to remove the constraint. ***
if ( depth != 1 )
{
FLA_Print_message( "FLASH_Apply_Q_UT_inc() currently only supports matrices of depth 1",
__FILE__, __LINE__ );
FLA_Abort();
}
// Query the datatype of matrix TW.
datatype = FLA_Obj_datatype( TW );
// Inspect the length of a the top-left element of TW to get the
// algorithmic blocksize we'll use throughout the Apply_Q_UT_inc
// algorithm.
b_alg = FLASH_Obj_scalar_length_tl( TW );
// The width of the top-left element gives us the storage blocksize.
b_flash = FLASH_Obj_scalar_width_tl( TW );
// The element length of W is 1.
m = 1;
// Query the element (not scalar) width of the right-hand side
// matrix B. This is done so we can create W with full blocks for the
// right "edge cases" of B.
n = FLA_Obj_width( B );
// Create hierarchical matrix W.
FLASH_Obj_create_ext( datatype, m * b_alg, n * b_flash,
depth, &b_alg, &b_flash,
W );
return FLA_SUCCESS;
}
1.7.6.1