libflame revision_anchor
Functions
FLA_Apply_QUD_UT_inc.h File Reference

(r)

Go to the source code of this file.

Functions

FLA_Error FLASH_Apply_QUD_UT_inc (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)
 
FLA_Error FLA_Apply_QUD_UT_inc_internal (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, fla_apqudutinc_t *cntl)
 
FLA_Error FLA_Apply_QUD_UT_inc_lhfc (FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudutinc_t *cntl)
 
FLA_Error FLASH_Apply_QUD_UT_inc_create_workspace (FLA_Obj T, FLA_Obj R, FLA_Obj *W)
 

Function Documentation

◆ FLA_Apply_QUD_UT_inc_internal()

FLA_Error FLA_Apply_QUD_UT_inc_internal ( 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,
fla_apqudutinc_t cntl 
)
18{
20
23
24 if ( side == FLA_LEFT )
25 {
26 if ( trans == FLA_NO_TRANSPOSE )
27 {
28 if ( direct == FLA_FORWARD )
29 {
30 if ( storev == FLA_COLUMNWISE )
32 else if ( storev == FLA_ROWWISE )
34 }
35 else if ( direct == FLA_BACKWARD )
36 {
37 if ( storev == FLA_COLUMNWISE )
39 else if ( storev == FLA_ROWWISE )
41 }
42 }
43 else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE )
44 {
45 if ( direct == FLA_FORWARD )
46 {
47 if ( storev == FLA_COLUMNWISE )
48 r_val = FLA_Apply_QUD_UT_inc_lhfc( T, W, R, U, C, V, D, cntl );
49 else if ( storev == FLA_ROWWISE )
51 }
52 else if ( direct == FLA_BACKWARD )
53 {
54 if ( storev == FLA_COLUMNWISE )
56 else if ( storev == FLA_ROWWISE )
58 }
59 }
60 }
61 else if ( side == FLA_RIGHT )
62 {
63 if ( trans == FLA_NO_TRANSPOSE )
64 {
65 if ( direct == FLA_FORWARD )
66 {
67 if ( storev == FLA_COLUMNWISE )
69 else if ( storev == FLA_ROWWISE )
71 }
72 else if ( direct == FLA_BACKWARD )
73 {
74 if ( storev == FLA_COLUMNWISE )
76 else if ( storev == FLA_ROWWISE )
78 }
79 }
80 else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE )
81 {
82 if ( direct == FLA_FORWARD )
83 {
84 if ( storev == FLA_COLUMNWISE )
86 else if ( storev == FLA_ROWWISE )
88 }
89 else if ( direct == FLA_BACKWARD )
90 {
91 if ( storev == FLA_COLUMNWISE )
93 else if ( storev == FLA_ROWWISE )
95 }
96 }
97 }
98
99 return r_val;
100}
FLA_Error FLA_Apply_QUD_UT_inc_lhfc(FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudutinc_t *cntl)
Definition FLA_Apply_QUD_UT_inc_lhfc.c:13
FLA_Error FLA_Apply_QUD_UT_inc_internal_check(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, fla_apqudutinc_t *cntl)
Definition FLA_Apply_QUD_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_QUD_UT_inc_internal_check(), FLA_Apply_QUD_UT_inc_lhfc(), FLA_Check_error_level(), and i.

Referenced by FLASH_Apply_QUD_UT_inc().

◆ FLA_Apply_QUD_UT_inc_lhfc()

FLA_Error FLA_Apply_QUD_UT_inc_lhfc ( FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  R,
FLA_Obj  U,
FLA_Obj  C,
FLA_Obj  V,
FLA_Obj  D,
fla_apqudutinc_t cntl 
)
17{
18 return FLA_Apply_QUD_UT_inc_lhfc_blk_var1( T, W, R, U, C, V, D, cntl );
19}
FLA_Error FLA_Apply_QUD_UT_inc_lhfc_blk_var1(FLA_Obj T, FLA_Obj W, FLA_Obj B, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudutinc_t *cntl)
Definition FLA_Apply_QUD_UT_inc_lhfc_blk_var1.c:13

References FLA_Apply_QUD_UT_inc_lhfc_blk_var1(), and i.

Referenced by FLA_Apply_QUD_UT_inc_internal().

◆ FLASH_Apply_QUD_UT_inc()

FLA_Error FLASH_Apply_QUD_UT_inc ( 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 
)
21{
23
24 // Check parameters.
27
28 // Begin a parallel region.
30
31 // Invoke _internal() back-end with the standard control tree.
33 T, W, R, U, C, V, D, flash_apqudutinc_cntl );
34
35 // End the parallel region.
37
38 return r_val;
39}
fla_apqudutinc_t * flash_apqudutinc_cntl
Definition FLASH_Apply_QUD_UT_inc_cntl_init.c:15
void FLASH_Queue_begin(void)
Definition FLASH_Queue.c:59
void FLASH_Queue_end(void)
Definition FLASH_Queue.c:81
FLA_Error FLA_Apply_QUD_UT_inc_internal(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, fla_apqudutinc_t *cntl)
Definition FLA_Apply_QUD_UT_inc_internal.c:13
FLA_Error FLA_Apply_QUD_UT_inc_check(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_inc_check.c:13

References FLA_Apply_QUD_UT_inc_check(), FLA_Apply_QUD_UT_inc_internal(), FLA_Check_error_level(), flash_apqudutinc_cntl, FLASH_Queue_begin(), FLASH_Queue_end(), and i.

Referenced by FLASH_UDdate_UT_inc_update_rhs().

◆ FLASH_Apply_QUD_UT_inc_create_workspace()

FLA_Error FLASH_Apply_QUD_UT_inc_create_workspace ( FLA_Obj  T,
FLA_Obj  R,
FLA_Obj W 
)
14{
15 FLA_Datatype datatype;
19 dim_t m, n;
20
21 // Query the depth.
23
24 // *** The current Apply_QUD_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_QUD_UT_inc() currently only supports matrices of depth 1",
32 FLA_Abort();
33 }
34
35 // Query the datatype of matrix T.
36 datatype = FLA_Obj_datatype( T );
37
38 // Inspect the length of a the top-left element of T to get the
39 // algorithmic blocksize we'll use throughout the Apply_QUD_UT_inc
40 // algorithm.
42
43 // The width of the top-left element gives us the storage blocksize.
45
46 // Determine the element (not scalar) dimensions of the new hierarchical
47 // matrix W. By using the element dimensions, we will probably allocate
48 // more storage than we actually need (at the bottom and right edge cases)
49 // but this is simpler than computing the exact amount and the excess
50 // storage is usually small in practice.
51 m = FLA_Obj_length( R );
52 n = FLA_Obj_width( R );
53
54 // Create hierarchical matrix W, with element dimensions conformal to R,
55 // where each block is b_alg-by-b_flash.
56 FLASH_Obj_create_ext( datatype, m * b_alg, n * b_flash,
57 depth, &b_alg, &b_flash,
58 W );
59
60 return FLA_SUCCESS;
61}
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
dim_t FLA_Obj_length(FLA_Obj obj)
Definition FLA_Query.c:116
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_length(), 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_UDdate_UT_inc_update_rhs().