Go to the source code of this file.
Functions | |
FLA_Error | FLASH_Apply_Q_UT_inc (FLA_Side side, FLA_Trans trans, 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_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_lhc (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_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_lhc(), and FLA_Check_error_level().
00038 { 00039 FLA_Error r_val = FLA_SUCCESS; 00040 00041 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00042 FLA_Apply_Q_UT_inc_internal_check( side, trans, storev, A, TW, W1, B, cntl ); 00043 00044 if ( side == FLA_LEFT ) 00045 { 00046 if ( trans == FLA_NO_TRANSPOSE ) 00047 { 00048 if ( storev == FLA_COLUMNWISE ) 00049 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00050 else if ( storev == FLA_ROWWISE ) 00051 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00052 } 00053 else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE ) 00054 { 00055 if ( storev == FLA_COLUMNWISE ) 00056 r_val = FLA_Apply_Q_UT_inc_lhc( A, TW, W1, B, cntl ); 00057 else if ( storev == FLA_ROWWISE ) 00058 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00059 } 00060 } 00061 else if ( side == FLA_RIGHT ) 00062 { 00063 if ( trans == FLA_NO_TRANSPOSE ) 00064 { 00065 if ( storev == FLA_COLUMNWISE ) 00066 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00067 else if ( storev == FLA_ROWWISE ) 00068 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00069 } 00070 else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE ) 00071 { 00072 if ( storev == FLA_COLUMNWISE ) 00073 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00074 else if ( storev == FLA_ROWWISE ) 00075 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00076 } 00077 } 00078 00079 return r_val; 00080 }
FLA_Error FLA_Apply_Q_UT_inc_lhc | ( | FLA_Obj | A, | |
FLA_Obj | TW, | |||
FLA_Obj | W1, | |||
FLA_Obj | B, | |||
fla_apqutinc_t * | cntl | |||
) |
References FLA_Apply_Q_UT_inc_lhc_blk_var1().
Referenced by FLA_Apply_Q_UT_inc_internal().
00036 { 00037 return FLA_Apply_Q_UT_inc_lhc_blk_var1( A, TW, W1, B, cntl ); 00038 }
FLA_Error FLASH_Apply_Q_UT_inc | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
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_Blocksize_set(), FLA_Check_error_level(), FLA_Part_2x2(), FLASH_Obj_scalar_length(), FLASH_Queue_begin(), and FLASH_Queue_end().
00042 { 00043 FLA_Error r_val; 00044 int nb_alg; 00045 FLA_Obj TWTL, TWTR, 00046 TWBL, TWBR; 00047 00048 // Check parameters. 00049 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00050 FLA_Apply_Q_UT_inc_check( side, trans, storev, A, TW, W1, B ); 00051 00052 // Inspect the length of a the top-left element of T to get the algorithmic 00053 // blocksize we'll use throughout the Apply_Q_UT_inc algorithm. 00054 FLA_Part_2x2( TW, &TWTL, &TWTR, 00055 &TWBL, &TWBR, 1, 1, FLA_TL ); 00056 nb_alg = FLASH_Obj_scalar_length( TWTL ); 00057 00058 // Adjust the blocksizes of the leaf control tree nodes, which are invoked 00059 // by the individual QR_UT_inc tasks. 00060 FLA_Blocksize_set( FLA_Cntl_blocksize( fla_apqut_cntl_leaf ), 00061 nb_alg, nb_alg, nb_alg, nb_alg ); 00062 FLA_Blocksize_set( FLA_Cntl_blocksize( fla_apqutud_cntl_leaf ), 00063 nb_alg, nb_alg, nb_alg, nb_alg ); 00064 00065 // Begin a parallel region. 00066 FLASH_Queue_begin(); 00067 00068 // Invoke FLA_Apply_Q_UT_inc_internal() with the standard control tree. 00069 r_val = FLA_Apply_Q_UT_inc_internal( side, trans, storev, A, TW, W1, B, flash_apqutinc_cntl ); 00070 00071 // End the parallel region. 00072 FLASH_Queue_end(); 00073 00074 return r_val; 00075 }
References FLA_Abort(), FLA_Obj_datatype(), FLA_Obj_width(), FLA_Part_2x2(), FLA_Print_message(), FLASH_Obj_create_ext(), FLASH_Obj_depth(), FLASH_Obj_scalar_length(), and FLASH_Obj_scalar_width().
00036 { 00037 FLA_Datatype datatype; 00038 FLA_Obj TWTL, TWTR, 00039 TWBL, TWBR; 00040 dim_t depth; 00041 dim_t b_alg; 00042 dim_t b_flash; 00043 dim_t m, n; 00044 00045 // Query the depth. 00046 depth = FLASH_Obj_depth( TW ); 00047 00048 // *** The current Apply_Q_UT_inc algorithm implemented assumes that 00049 // the matrix has a hierarchical depth of 1. We check for that here 00050 // because we anticipate that we'll use a more general algorithm in the 00051 // future, and we don't want to forget to remove the constraint. *** 00052 if ( depth != 1 ) 00053 { 00054 FLA_Print_message( "FLASH_Apply_Q_UT_inc() currently only supports matrices of depth 1", 00055 __FILE__, __LINE__ ); 00056 FLA_Abort(); 00057 } 00058 00059 // Query the datatype of matrix TW. 00060 datatype = FLA_Obj_datatype( TW ); 00061 00062 // Inspect the length of a the top-left element of TW to get the 00063 // algorithmic blocksize we'll use throughout the Apply_Q_UT_inc 00064 // algorithm. 00065 FLA_Part_2x2( TW, &TWTL, &TWTR, 00066 &TWBL, &TWBR, 1, 1, FLA_TL ); 00067 b_alg = FLASH_Obj_scalar_length( TWTL ); 00068 00069 // The width of the top-left element gives us the storage blocksize. 00070 b_flash = FLASH_Obj_scalar_width( TWTL ); 00071 00072 // The element length of W is 1. 00073 m = 1; 00074 00075 // Query the element (not scalar) width of the right-hand side 00076 // matrix B. This is done so we can create W with full blocks for the 00077 // right "edge cases" of B. 00078 n = FLA_Obj_width( B ); 00079 00080 // Create hierarchical matrix W. 00081 FLASH_Obj_create_ext( datatype, m * b_alg, n * b_flash, 00082 depth, &b_alg, &b_flash, 00083 W ); 00084 00085 return FLA_SUCCESS; 00086 }