libflame revision_anchor
Functions
FLA_UDdate_UT.h File Reference

(r)

Go to the source code of this file.

Functions

FLA_Error FLA_UDdate_UT (FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T)
 
FLA_Error FLA_UDdate_UT_internal (FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T, fla_uddateut_t *cntl)
 
FLA_Error FLA_UDdate_UT_create_T (FLA_Obj R, FLA_Obj *T)
 
FLA_Error FLA_UDdate_UT_update_rhs (FLA_Obj T, FLA_Obj bR, FLA_Obj C, FLA_Obj bC, FLA_Obj D, FLA_Obj bD)
 
FLA_Error FLA_UDdate_UT_solve (FLA_Obj R, FLA_Obj bR, FLA_Obj x)
 

Function Documentation

◆ FLA_UDdate_UT()

FLA_Error FLA_UDdate_UT ( FLA_Obj  R,
FLA_Obj  C,
FLA_Obj  D,
FLA_Obj  T 
)
17{
19
20 // Check parameters.
23
24 // Invoke the _internal() back-end with the standard control tree.
26
27 return r_val;
28}
fla_uddateut_t * fla_uddateut_cntl_leaf
Definition FLA_UDdate_UT_cntl_init.c:16
FLA_Error FLA_UDdate_UT_internal(FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T, fla_uddateut_t *cntl)
Definition FLA_UDdate_UT_internal.c:16
FLA_Error FLA_UDdate_UT_check(FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T)
Definition FLA_UDdate_UT_check.c:13
unsigned int FLA_Check_error_level(void)
Definition FLA_Check.c:18
int FLA_Error
Definition FLA_type_defs.h:47
int i
Definition bl1_axmyv2.c:145

References FLA_Check_error_level(), FLA_UDdate_UT_check(), FLA_UDdate_UT_internal(), fla_uddateut_cntl_leaf, and i.

◆ FLA_UDdate_UT_create_T()

FLA_Error FLA_UDdate_UT_create_T ( FLA_Obj  R,
FLA_Obj T 
)
14{
15 FLA_Datatype datatype;
16 dim_t b_alg, k;
18
19 // Query the datatype of R.
20 datatype = FLA_Obj_datatype( R );
21
22 // Query the blocksize from the library.
24
25 // We want the width of R, which is the same as that of C and D. Also,
26 // R should be square, so we could grab either dimension.
27 k = FLA_Obj_width( R );
28
29 // Figure out whether T should be row-major or column-major.
30 if ( FLA_Obj_row_stride( R ) == 1 )
31 {
32 rs_T = 1;
33 cs_T = b_alg;
34 }
35 else // if ( FLA_Obj_col_stride( R ) == 1 )
36 {
37 rs_T = k;
38 cs_T = 1;
39 }
40
41 // Create a b_alg x k matrix to hold the block Householder transforms that
42 // will be accumulated within the UDdate operation algorithm.
43 FLA_Obj_create( datatype, b_alg, k, rs_T, cs_T, T );
44
45 return FLA_SUCCESS;
46}
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
FLA_Error FLA_Obj_create(FLA_Datatype datatype, dim_t m, dim_t n, dim_t rs, dim_t cs, FLA_Obj *obj)
Definition FLA_Obj.c:55
dim_t FLA_Obj_row_stride(FLA_Obj obj)
Definition FLA_Query.c:167
dim_t FLA_Query_blocksize(FLA_Datatype dt, FLA_Dimension dim)
Definition FLA_Blocksize.c:161
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition FLA_Query.c:13
int FLA_Datatype
Definition FLA_type_defs.h:49
unsigned long dim_t
Definition FLA_type_defs.h:71

References FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Query_blocksize(), and i.

◆ FLA_UDdate_UT_internal()

FLA_Error FLA_UDdate_UT_internal ( FLA_Obj  R,
FLA_Obj  C,
FLA_Obj  D,
FLA_Obj  T,
fla_uddateut_t cntl 
)
19{
21
24
25 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER &&
28 {
29 // Recurse
35 }
36 else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER &&
39 {
40 // Enqueue
41 ENQUEUE_FLASH_UDdate_UT( R, C, D, T, cntl );
42 }
43 else
44 {
45 if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER &&
48 {
49 // Execute leaf.
51 }
52
54 {
56 }
57 else if ( FLA_Cntl_variant( cntl ) == FLA_UNB_OPT_VARIANT1 )
58 {
60 }
61 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 )
62 {
63 r_val = FLA_UDdate_UT_blk_var1( R, C, D, T, cntl );
64 }
65 else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 )
66 {
67 r_val = FLA_UDdate_UT_blk_var2( R, C, D, T, cntl );
68 }
69 else
70 {
72 }
73 }
74
75 return r_val;
76}
FLA_Bool FLASH_Queue_get_enabled(void)
Definition FLASH_Queue.c:171
FLA_Error FLA_UDdate_UT_blk_var1(FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T, fla_uddateut_t *cntl)
Definition FLA_UDdate_UT_blk_var1.c:13
FLA_Error FLA_UDdate_UT_blk_var2(FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T, fla_uddateut_t *cntl)
Definition FLA_UDdate_UT_blk_var2.c:13
fla_uddateut_t * fla_uddateut_cntl_leaf
Definition FLA_UDdate_UT_cntl_init.c:16
fla_uddateut_t * flash_uddateut_cntl
Definition FLASH_UDdate_UT_cntl_init.c:14
FLA_Error FLA_UDdate_UT_internal(FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T, fla_uddateut_t *cntl)
Definition FLA_UDdate_UT_internal.c:16
FLA_Error FLA_UDdate_UT_internal_check(FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T, fla_uddateut_t *cntl)
Definition FLA_UDdate_UT_internal_check.c:13
FLA_Error FLA_UDdate_UT_opt_var1(FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T)
Definition FLA_UDdate_UT_opt_var1.c:13
FLA_Error FLA_UDdate_UT_unb_var1(FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T)
Definition FLA_UDdate_UT_unb_var1.c:13
FLA_Elemtype FLA_Obj_elemtype(FLA_Obj obj)
Definition FLA_Query.c:51

References FLA_Check_error_level(), FLA_Obj_elemtype(), FLA_UDdate_UT_blk_var1(), FLA_UDdate_UT_blk_var2(), FLA_UDdate_UT_internal(), FLA_UDdate_UT_internal_check(), FLA_UDdate_UT_opt_var1(), FLA_UDdate_UT_unb_var1(), fla_uddateut_cntl_leaf, FLASH_Queue_get_enabled(), flash_uddateut_cntl, and i.

Referenced by FLA_UDdate_UT(), FLA_UDdate_UT_blk_var1(), FLA_UDdate_UT_blk_var2(), FLA_UDdate_UT_inc_blk_var1(), FLA_UDdate_UT_internal(), and FLA_UDdate_UT_task().

◆ FLA_UDdate_UT_solve()

FLA_Error FLA_UDdate_UT_solve ( FLA_Obj  R,
FLA_Obj  bR,
FLA_Obj  x 
)
14{
15 // Check parameters.
18
19 // Copy the contents of bR to x so that after the triangular solve, the
20 // solution resides in x (and bR is preserved).
22
23 // Perform a triangular solve with R the right-hand side.
26 FLA_ONE, R, x );
27
28 return FLA_SUCCESS;
29}
FLA_Error FLA_UDdate_UT_solve_check(FLA_Obj R, FLA_Obj bR, FLA_Obj x)
Definition FLA_UDdate_UT_solve_check.c:13
FLA_Error FLA_Copy_external(FLA_Obj A, FLA_Obj B)
Definition FLA_Copy_external.c:13
FLA_Error FLA_Trsm_external(FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLA_Trsm_external.c:13
FLA_Obj FLA_ONE
Definition FLA_Init.c:18

References FLA_Check_error_level(), FLA_Copy_external(), FLA_ONE, FLA_Trsm_external(), FLA_UDdate_UT_solve_check(), and i.

◆ FLA_UDdate_UT_update_rhs()

FLA_Error FLA_UDdate_UT_update_rhs ( FLA_Obj  T,
FLA_Obj  bR,
FLA_Obj  C,
FLA_Obj  bC,
FLA_Obj  D,
FLA_Obj  bD 
)
16{
17 FLA_Obj W;
20
21 // Check parameters.
24
25 // Create workspace according to the algorithmic blocksize (length of T)
26 // and the number of right-hand sides.
28
29 // Make temporary copies of the bC and bD right-hand side objects so we
30 // don't destory their original contents.
33
34 // Apply the updowndating Q' to the right-hand sides.
36 T, W,
37 bR,
38 C, bC_copy,
39 D, bD_copy );
40
41 // Free the temporary objects.
44
45 // Free the workspace object.
46 FLA_Obj_free( &W );
47
48 return FLA_SUCCESS;
49}
FLA_Error FLA_Apply_QUD_UT(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)
Definition FLA_Apply_QUD_UT.c:16
FLA_Error FLA_Apply_QUD_UT_create_workspace(FLA_Obj T, FLA_Obj R, FLA_Obj *W)
Definition FLA_Apply_QUD_UT_create_workspace.c:13
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)
Definition FLA_UDdate_UT_update_rhs_check.c:13
FLA_Error FLA_Obj_create_copy_of(FLA_Trans trans, FLA_Obj old, FLA_Obj *obj)
Definition FLA_Obj.c:345
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition FLA_Obj.c:588
Definition FLA_type_defs.h:159

References FLA_Apply_QUD_UT(), FLA_Apply_QUD_UT_create_workspace(), FLA_Check_error_level(), FLA_Obj_create_copy_of(), FLA_Obj_free(), FLA_UDdate_UT_update_rhs_check(), and i.