libflame  revision_anchor
Functions
FLA_Apply_QUD_UT.h File Reference

(r)

Go to the source code of this file.

Functions

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)
 
FLA_Error FLA_Apply_QUD_UT_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_apqudut_t *cntl)
 
FLA_Error FLA_Apply_QUD_UT_lhfc (FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudut_t *cntl)
 
FLA_Error FLA_Apply_QUD_UT_create_workspace (FLA_Obj T, FLA_Obj R, FLA_Obj *W)
 

Function Documentation

◆ FLA_Apply_QUD_UT()

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 
)
17 {
18  FLA_Error r_val;
19 
20  // Check parameters.
21  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
22  FLA_Apply_QUD_UT_check( side, trans, direct, storev, T, W, R, U, C, V, D );
23 
24  // Invoke _internal() back-end with the standard control tree.
25  r_val = FLA_Apply_QUD_UT_internal( side, trans, direct, storev,
26  T, W, R, U, C, V, D, fla_apqudut_cntl_leaf );
27 
28  return r_val;
29 }
fla_apqudut_t * fla_apqudut_cntl_leaf
Definition: FLA_Apply_QUD_UT_cntl_init.c:18
FLA_Error FLA_Apply_QUD_UT_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_apqudut_t *cntl)
Definition: FLA_Apply_QUD_UT_internal.c:17
FLA_Error FLA_Apply_QUD_UT_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_check.c:13
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Error
Definition: FLA_type_defs.h:47

References FLA_Apply_QUD_UT_check(), FLA_Apply_QUD_UT_internal(), fla_apqudut_cntl_leaf, and FLA_Check_error_level().

Referenced by FLA_UDdate_UT_update_rhs().

◆ FLA_Apply_QUD_UT_create_workspace()

FLA_Error FLA_Apply_QUD_UT_create_workspace ( FLA_Obj  T,
FLA_Obj  R,
FLA_Obj W 
)
14 {
15  FLA_Datatype datatype;
16  dim_t m_W, n_W;
17 
18  datatype = FLA_Obj_datatype( T );
19  m_W = FLA_Obj_length( T );
20  n_W = FLA_Obj_width( R );
21 
22  FLA_Obj_create( datatype, m_W, n_W, 0, 0, W );
23 
24  return FLA_SUCCESS;
25 }
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_length(FLA_Obj obj)
Definition: FLA_Query.c:116
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_length(), and FLA_Obj_width().

Referenced by FLA_UDdate_UT_update_rhs().

◆ FLA_Apply_QUD_UT_internal()

FLA_Error FLA_Apply_QUD_UT_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_apqudut_t cntl 
)
22 {
23  FLA_Error r_val = FLA_SUCCESS;
24 
25  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
26  FLA_Apply_QUD_UT_internal_check( side, trans, direct, storev,
27  T, W, R, U, C, V, D, cntl );
28 
29  if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER &&
30  FLA_Obj_elemtype( R ) == FLA_MATRIX &&
31  FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM )
32  {
33  // Recurse
34  r_val = FLA_Apply_QUD_UT_internal( side,
35  trans,
36  direct,
37  storev,
38  *FLASH_OBJ_PTR_AT( T ),
39  *FLASH_OBJ_PTR_AT( W ),
40  *FLASH_OBJ_PTR_AT( R ),
41  *FLASH_OBJ_PTR_AT( U ),
42  *FLASH_OBJ_PTR_AT( C ),
43  *FLASH_OBJ_PTR_AT( V ),
44  *FLASH_OBJ_PTR_AT( D ),
46  }
47  else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER &&
48  FLA_Obj_elemtype( R ) == FLA_SCALAR &&
50  {
51  // Enqueue
52  ENQUEUE_FLASH_Apply_QUD_UT( side, trans, direct, storev,
53  T, W, R, U, C, V, D, cntl );
54  }
55  else
56  {
57  if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER &&
58  FLA_Obj_elemtype( R ) == FLA_SCALAR &&
60  {
61  // Execute leaf.
62  cntl = fla_apqudut_cntl_leaf;
63  }
64 
65  if ( side == FLA_LEFT )
66  {
67  if ( trans == FLA_NO_TRANSPOSE )
68  {
69  if ( direct == FLA_FORWARD )
70  {
71  if ( storev == FLA_COLUMNWISE )
72  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
73  else if ( storev == FLA_ROWWISE )
74  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
75  }
76  else if ( direct == FLA_BACKWARD )
77  {
78  if ( storev == FLA_COLUMNWISE )
79  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
80  else if ( storev == FLA_ROWWISE )
81  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
82  }
83  }
84  else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE )
85  {
86  if ( direct == FLA_FORWARD )
87  {
88  if ( storev == FLA_COLUMNWISE )
89  r_val = FLA_Apply_QUD_UT_lhfc( T, W, R, U, C, V, D, cntl );
90  else if ( storev == FLA_ROWWISE )
91  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
92  }
93  else if ( direct == FLA_BACKWARD )
94  {
95  if ( storev == FLA_COLUMNWISE )
96  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
97  else if ( storev == FLA_ROWWISE )
98  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
99  }
100  }
101  }
102  else if ( side == FLA_RIGHT )
103  {
104  if ( trans == FLA_NO_TRANSPOSE )
105  {
106  if ( direct == FLA_FORWARD )
107  {
108  if ( storev == FLA_COLUMNWISE )
109  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
110  else if ( storev == FLA_ROWWISE )
111  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
112  }
113  else if ( direct == FLA_BACKWARD )
114  {
115  if ( storev == FLA_COLUMNWISE )
116  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
117  else if ( storev == FLA_ROWWISE )
118  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
119  }
120  }
121  else if ( trans == FLA_TRANSPOSE || trans == FLA_CONJ_TRANSPOSE )
122  {
123  if ( direct == FLA_FORWARD )
124  {
125  if ( storev == FLA_COLUMNWISE )
126  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
127  else if ( storev == FLA_ROWWISE )
128  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
129  }
130  else if ( direct == FLA_BACKWARD )
131  {
132  if ( storev == FLA_COLUMNWISE )
133  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
134  else if ( storev == FLA_ROWWISE )
135  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
136  }
137  }
138  }
139  }
140 
141  return r_val;
142 }
FLA_Bool FLASH_Queue_get_enabled(void)
Definition: FLASH_Queue.c:171
FLA_Error FLA_Apply_QUD_UT_lhfc(FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudut_t *cntl)
Definition: FLA_Apply_QUD_UT_lhfc.c:15
FLA_Error FLA_Apply_QUD_UT_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_apqudut_t *cntl)
Definition: FLA_Apply_QUD_UT_internal.c:17
fla_apqudut_t * fla_apqudut_cntl_leaf
Definition: FLA_Apply_QUD_UT_cntl_init.c:18
fla_apqudut_t * flash_apqudut_cntl
Definition: FLASH_Apply_QUD_UT_cntl_init.c:15
FLA_Error FLA_Apply_QUD_UT_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_apqudut_t *cntl)
Definition: FLA_Apply_QUD_UT_internal_check.c:13
FLA_Elemtype FLA_Obj_elemtype(FLA_Obj obj)
Definition: FLA_Query.c:51

References FLA_Apply_QUD_UT_internal(), FLA_Apply_QUD_UT_internal_check(), FLA_Apply_QUD_UT_lhfc(), fla_apqudut_cntl_leaf, FLA_Check_error_level(), FLA_Obj_elemtype(), flash_apqudut_cntl, and FLASH_Queue_get_enabled().

Referenced by FLA_Apply_QUD_UT(), FLA_Apply_QUD_UT_inc_lhfc_blk_var1(), FLA_Apply_QUD_UT_internal(), FLA_Apply_QUD_UT_lhfc_blk_var2(), FLA_Apply_QUD_UT_lhfc_blk_var3(), FLA_Apply_QUD_UT_lhfc_task(), FLA_Apply_QUD_UT_task(), FLA_UDdate_UT_blk_var1(), and FLA_UDdate_UT_inc_blk_var1().

◆ FLA_Apply_QUD_UT_lhfc()

FLA_Error FLA_Apply_QUD_UT_lhfc ( FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  R,
FLA_Obj  U,
FLA_Obj  C,
FLA_Obj  V,
FLA_Obj  D,
fla_apqudut_t cntl 
)
19 {
20  FLA_Error r_val = FLA_SUCCESS;
21 
22  if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 )
23  {
24  r_val = FLA_Apply_QUD_UT_lhfc_blk_var1( T, W, R, U, C, V, D, cntl );
25  }
26  else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 )
27  {
28  r_val = FLA_Apply_QUD_UT_lhfc_blk_var2( T, W, R, U, C, V, D, cntl );
29  }
30  else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT3 )
31  {
32  r_val = FLA_Apply_QUD_UT_lhfc_blk_var3( T, W, R, U, C, V, D, cntl );
33  }
34  else
35  {
36  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
37  }
38 
39  return r_val;
40 }
FLA_Error FLA_Apply_QUD_UT_lhfc_blk_var1(FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudut_t *cntl)
Definition: FLA_Apply_QUD_UT_lhfc_blk_var1.c:13
FLA_Error FLA_Apply_QUD_UT_lhfc_blk_var2(FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudut_t *cntl)
Definition: FLA_Apply_QUD_UT_lhfc_blk_var2.c:13
FLA_Error FLA_Apply_QUD_UT_lhfc_blk_var3(FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudut_t *cntl)
Definition: FLA_Apply_QUD_UT_lhfc_blk_var3.c:13

References FLA_Apply_QUD_UT_lhfc_blk_var1(), FLA_Apply_QUD_UT_lhfc_blk_var2(), and FLA_Apply_QUD_UT_lhfc_blk_var3().

Referenced by FLA_Apply_QUD_UT_internal().