Go to the source code of this file.
Functions | |
FLA_Error | FLASH_Apply_Q_UT_UD (FLA_Side side, FLA_Trans trans, FLA_Store storev, FLA_Obj D, FLA_Obj T, FLA_Obj W, FLA_Obj C, FLA_Obj E) |
FLA_Error | FLA_Apply_Q_UT_UD_internal (FLA_Side side, FLA_Trans trans, FLA_Store storev, FLA_Obj D, FLA_Obj T, FLA_Obj W, FLA_Obj C, FLA_Obj E, fla_apqutud_t *cntl) |
FLA_Error | FLA_Apply_Q_UT_UD_lhc (FLA_Obj D, FLA_Obj T, FLA_Obj W, FLA_Obj C, FLA_Obj E, fla_apqutud_t *cntl) |
FLA_Error FLA_Apply_Q_UT_UD_internal | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | D, | |||
FLA_Obj | T, | |||
FLA_Obj | W, | |||
FLA_Obj | C, | |||
FLA_Obj | E, | |||
fla_apqutud_t * | cntl | |||
) |
References FLA_Apply_Q_UT_UD_internal(), FLA_Apply_Q_UT_UD_internal_check(), FLA_Apply_Q_UT_UD_lhc(), FLA_Check_error_level(), FLA_Obj_elemtype(), and FLASH_Queue_get_enabled().
00042 { 00043 FLA_Error r_val = FLA_SUCCESS; 00044 00045 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING ) 00046 FLA_Apply_Q_UT_UD_internal_check( side, trans, storev, D, T, W, C, E, cntl ); 00047 00048 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00049 FLA_Obj_elemtype( D ) == FLA_MATRIX && 00050 FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) 00051 { 00052 // Recurse 00053 r_val = FLA_Apply_Q_UT_UD_internal( side, 00054 trans, 00055 storev, 00056 *FLASH_OBJ_PTR_AT( D ), 00057 *FLASH_OBJ_PTR_AT( T ), 00058 *FLASH_OBJ_PTR_AT( W ), 00059 *FLASH_OBJ_PTR_AT( C ), 00060 *FLASH_OBJ_PTR_AT( E ), 00061 flash_apqutud_cntl_leaf ); 00062 } 00063 else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00064 FLA_Obj_elemtype( D ) == FLA_SCALAR && 00065 FLASH_Queue_get_enabled( ) ) 00066 { 00067 // Enqueue 00068 ENQUEUE_FLASH_Apply_Q_UT_UD( side, trans, storev, D, T, W, C, E, cntl ); 00069 } 00070 else 00071 { 00072 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER && 00073 FLA_Obj_elemtype( D ) == FLA_SCALAR && 00074 !FLASH_Queue_get_enabled( ) ) 00075 { 00076 // Execute leaf. 00077 // NOTE: This may be redundant since we execute _internal() with 00078 // fla_apqutud_cntl_leaf (in lieu of an _external() function) in 00079 // the helper function below. 00080 cntl = fla_apqutud_cntl_leaf; 00081 } 00082 00083 if ( side == FLA_LEFT ) 00084 { 00085 if ( trans == FLA_NO_TRANSPOSE ) 00086 { 00087 if ( storev == FLA_COLUMNWISE ) 00088 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00089 else if ( storev == FLA_ROWWISE ) 00090 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00091 } 00092 else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE ) 00093 { 00094 if ( storev == FLA_COLUMNWISE ) 00095 r_val = FLA_Apply_Q_UT_UD_lhc( D, T, W, C, E, cntl ); 00096 else if ( storev == FLA_ROWWISE ) 00097 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00098 } 00099 } 00100 else if ( side == FLA_RIGHT ) 00101 { 00102 if ( trans == FLA_NO_TRANSPOSE ) 00103 { 00104 if ( storev == FLA_COLUMNWISE ) 00105 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00106 else if ( storev == FLA_ROWWISE ) 00107 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00108 } 00109 else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE ) 00110 { 00111 if ( storev == FLA_COLUMNWISE ) 00112 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00113 else if ( storev == FLA_ROWWISE ) 00114 FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED ); 00115 } 00116 } 00117 } 00118 00119 return r_val; 00120 }
FLA_Error FLA_Apply_Q_UT_UD_lhc | ( | FLA_Obj | D, | |
FLA_Obj | T, | |||
FLA_Obj | W, | |||
FLA_Obj | C, | |||
FLA_Obj | E, | |||
fla_apqutud_t * | cntl | |||
) |
References FLA_Apply_Q_UT_UD_lhc_blk_var1(), FLA_Apply_Q_UT_UD_lhc_blk_var2(), FLA_Apply_Q_UT_UD_lhc_blk_var3(), and FLA_Apply_Q_UT_UD_lhc_task().
Referenced by FLA_Apply_Q_UT_UD_internal().
00039 { 00040 FLA_Error r_val = FLA_SUCCESS; 00041 00042 if ( FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM ) 00043 { 00044 r_val = FLA_Apply_Q_UT_UD_lhc_task( D, T, W, C, E, fla_apqutud_cntl_leaf ); 00045 } 00046 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 ) 00047 { 00048 r_val = FLA_Apply_Q_UT_UD_lhc_blk_var1( D, T, W, C, E, cntl ); 00049 } 00050 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 ) 00051 { 00052 r_val = FLA_Apply_Q_UT_UD_lhc_blk_var2( D, T, W, C, E, cntl ); 00053 } 00054 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT3 ) 00055 { 00056 r_val = FLA_Apply_Q_UT_UD_lhc_blk_var3( D, T, W, C, E, cntl ); 00057 } 00058 00059 return r_val; 00060 }
FLA_Error FLASH_Apply_Q_UT_UD | ( | FLA_Side | side, | |
FLA_Trans | trans, | |||
FLA_Store | storev, | |||
FLA_Obj | D, | |||
FLA_Obj | T, | |||
FLA_Obj | W, | |||
FLA_Obj | C, | |||
FLA_Obj | E | |||
) |
References FLA_Apply_Q_UT_UD_check(), FLA_Apply_Q_UT_UD_internal(), FLA_Blocksize_set(), FLA_Check_error_level(), FLA_Part_2x1(), FLASH_Obj_scalar_length(), FLASH_Queue_begin(), and FLASH_Queue_end().
00042 { 00043 FLA_Error r_val; 00044 int nb_alg_in; 00045 FLA_Obj TT, TB; 00046 00047 // Check parameters. 00048 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00049 FLA_Apply_Q_UT_UD_check( side, trans, storev, D, T, W, C, E ); 00050 00051 // Inspect the length of a single row of T to get the blocksize used by 00052 // the QR/LQ factorization, which will be our inner blocksize for 00053 // Apply_Q_UT_UD. 00054 FLA_Part_2x1( T, &TT, 00055 &TB, 1, FLA_TOP ); 00056 nb_alg_in = FLASH_Obj_scalar_length( TT ); 00057 00058 // Adjust the blocksize of the leaf control tree node. 00059 FLA_Blocksize_set( FLA_Cntl_blocksize( fla_apqutud_cntl_leaf ), 00060 nb_alg_in, nb_alg_in, nb_alg_in, nb_alg_in ); 00061 00062 // Begin a parallel region. 00063 FLASH_Queue_begin(); 00064 00065 // Invoke FLA_Apply_Q_UT_UD_internal() with the standard control tree. 00066 r_val = FLA_Apply_Q_UT_UD_internal( side, trans, storev, D, T, W, C, E, flash_apqutud_cntl ); 00067 00068 // End the parallel region. 00069 FLASH_Queue_end(); 00070 00071 return r_val; 00072 }