libflame revision_anchor
Functions
FLA_Apply_Q_UT_inc.h File Reference

(r)

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)
 

Function Documentation

◆ FLA_Apply_Q_UT_inc_internal()

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 
)
16{
18
21
22 if ( side == FLA_LEFT )
23 {
24 if ( trans == FLA_NO_TRANSPOSE )
25 {
26 if ( direct == FLA_FORWARD )
27 {
28 if ( storev == FLA_COLUMNWISE )
29 r_val = FLA_Apply_Q_UT_inc_lnfc( A, TW, W1, B, cntl );
30 else if ( storev == FLA_ROWWISE )
32 }
33 else if ( direct == FLA_BACKWARD )
34 {
35 if ( storev == FLA_COLUMNWISE )
37 else if ( storev == FLA_ROWWISE )
39 }
40 }
41 else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE )
42 {
43 if ( direct == FLA_FORWARD )
44 {
45 if ( storev == FLA_COLUMNWISE )
46 r_val = FLA_Apply_Q_UT_inc_lhfc( A, TW, W1, B, cntl );
47 else if ( storev == FLA_ROWWISE )
49 }
50 else if ( direct == FLA_BACKWARD )
51 {
52 if ( storev == FLA_COLUMNWISE )
54 else if ( storev == FLA_ROWWISE )
56 }
57 }
58 }
59 else if ( side == FLA_RIGHT )
60 {
61 if ( trans == FLA_NO_TRANSPOSE )
62 {
63 if ( direct == FLA_FORWARD )
64 {
65 if ( storev == FLA_COLUMNWISE )
67 else if ( storev == FLA_ROWWISE )
69 }
70 else if ( direct == FLA_BACKWARD )
71 {
72 if ( storev == FLA_COLUMNWISE )
74 else if ( storev == FLA_ROWWISE )
76 }
77 }
78 else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE )
79 {
80 if ( direct == FLA_FORWARD )
81 {
82 if ( storev == FLA_COLUMNWISE )
84 else if ( storev == FLA_ROWWISE )
86 }
87 else if ( direct == FLA_BACKWARD )
88 {
89 if ( storev == FLA_COLUMNWISE )
91 else if ( storev == FLA_ROWWISE )
93 }
94 }
95 }
96
97 return r_val;
98}
FLA_Error FLA_Apply_Q_UT_inc_lhfc(FLA_Obj A, FLA_Obj TW, FLA_Obj W1, FLA_Obj B, fla_apqutinc_t *cntl)
Definition FLA_Apply_Q_UT_inc_lhfc.c:13
FLA_Error FLA_Apply_Q_UT_inc_lnfc(FLA_Obj A, FLA_Obj TW, FLA_Obj W1, FLA_Obj B, fla_apqutinc_t *cntl)
Definition FLA_Apply_Q_UT_inc_lnfc.c:13
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)
Definition FLA_Apply_Q_UT_inc_internal_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_Apply_Q_UT_inc_internal_check(), FLA_Apply_Q_UT_inc_lhfc(), FLA_Apply_Q_UT_inc_lnfc(), FLA_Check_error_level(), and i.

Referenced by FLASH_Apply_Q_UT_inc().

◆ FLA_Apply_Q_UT_inc_lhfc()

FLA_Error FLA_Apply_Q_UT_inc_lhfc ( FLA_Obj  A,
FLA_Obj  TW,
FLA_Obj  W1,
FLA_Obj  B,
fla_apqutinc_t cntl 
)
14{
15 return FLA_Apply_Q_UT_inc_lhfc_blk_var1( A, TW, W1, B, cntl );
16}
FLA_Error FLA_Apply_Q_UT_inc_lhfc_blk_var1(FLA_Obj A, FLA_Obj TW, FLA_Obj W1, FLA_Obj B, fla_apqutinc_t *cntl)
Definition FLA_Apply_Q_UT_inc_lhfc_blk_var1.c:13

References FLA_Apply_Q_UT_inc_lhfc_blk_var1(), and i.

Referenced by FLA_Apply_Q_UT_inc_internal().

◆ FLA_Apply_Q_UT_inc_lnfc()

FLA_Error FLA_Apply_Q_UT_inc_lnfc ( FLA_Obj  A,
FLA_Obj  TW,
FLA_Obj  W1,
FLA_Obj  B,
fla_apqutinc_t cntl 
)
14{
15 return FLA_Apply_Q_UT_inc_lnfc_blk_var1( A, TW, W1, B, cntl );
16}
FLA_Error FLA_Apply_Q_UT_inc_lnfc_blk_var1(FLA_Obj A, FLA_Obj TW, FLA_Obj W1, FLA_Obj B, fla_apqutinc_t *cntl)
Definition FLA_Apply_Q_UT_inc_lnfc_blk_var1.c:13

References FLA_Apply_Q_UT_inc_lnfc_blk_var1(), and i.

Referenced by FLA_Apply_Q_UT_inc_internal().

◆ FLASH_Apply_Q_UT_inc()

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 
)
20{
22
23 // Check parameters.
26
27 // Begin a parallel region.
29
30 // Invoke FLA_Apply_Q_UT_inc_internal() with the standard control tree.
32
33 // End the parallel region.
35
36 return r_val;
37}
fla_apqutinc_t * flash_apqutinc_cntl
Definition FLASH_Apply_Q_UT_inc_cntl_init.c:16
void FLASH_Queue_begin(void)
Definition FLASH_Queue.c:59
void FLASH_Queue_end(void)
Definition FLASH_Queue.c:81
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)
Definition FLA_Apply_Q_UT_inc_internal.c:13
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)
Definition FLA_Apply_Q_UT_inc_check.c:13

◆ FLASH_Apply_Q_UT_inc_create_workspace()

FLA_Error FLASH_Apply_Q_UT_inc_create_workspace ( FLA_Obj  TW,
FLA_Obj  B,
FLA_Obj W 
)
14{
15 FLA_Datatype datatype;
19 dim_t m, n;
20
21 // Query the depth.
23
24 // *** The current Apply_Q_UT_inc algorithm implemented assumes that
25 // the matrix has a hierarchical depth of 1. We check for that here
26 // because we anticipate that we'll use a more general algorithm in the
27 // future, and we don't want to forget to remove the constraint. ***
28 if ( depth != 1 )
29 {
30 FLA_Print_message( "FLASH_Apply_Q_UT_inc() currently only supports matrices of depth 1",
32 FLA_Abort();
33 }
34
35 // Query the datatype of matrix TW.
36 datatype = FLA_Obj_datatype( TW );
37
38 // Inspect the length of a the top-left element of TW to get the
39 // algorithmic blocksize we'll use throughout the Apply_Q_UT_inc
40 // algorithm.
42
43 // The width of the top-left element gives us the storage blocksize.
45
46 // The element length of W is 1.
47 m = 1;
48
49 // Query the element (not scalar) width of the right-hand side
50 // matrix B. This is done so we can create W with full blocks for the
51 // right "edge cases" of B.
52 n = FLA_Obj_width( B );
53
54 // Create hierarchical matrix W.
55 FLASH_Obj_create_ext( datatype, m * b_alg, n * b_flash,
56 depth, &b_alg, &b_flash,
57 W );
58
59 return FLA_SUCCESS;
60}
dim_t FLASH_Obj_scalar_length_tl(FLA_Obj H)
Definition FLASH_View.c:723
FLA_Error FLASH_Obj_create_ext(FLA_Datatype datatype, dim_t m, dim_t n, dim_t depth, dim_t *b_m, dim_t *b_n, FLA_Obj *H)
Definition FLASH_Obj.c:151
dim_t FLASH_Obj_depth(FLA_Obj H)
Definition FLASH_Obj.c:20
dim_t FLASH_Obj_scalar_width_tl(FLA_Obj H)
Definition FLASH_View.c:737
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
void FLA_Abort(void)
Definition FLA_Error.c:248
void FLA_Print_message(char *str, char *file, int line)
Definition FLA_Error.c:234
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_Abort(), FLA_Obj_datatype(), FLA_Obj_width(), FLA_Print_message(), FLASH_Obj_create_ext(), FLASH_Obj_depth(), FLASH_Obj_scalar_length_tl(), FLASH_Obj_scalar_width_tl(), and i.

Referenced by FLASH_QR_UT_inc_solve().