libflame  revision_anchor
Functions
FLA_Apply_QUD_UT_lhfc_blk_var3.c File Reference

(r)

Functions

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)
 

Function Documentation

◆ FLA_Apply_QUD_UT_lhfc_blk_var3()

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 
)
17 {
18  FLA_Obj TT, T0,
19  TB, T1,
20  T2;
21 
22  FLA_Obj UT, U0,
23  UB, U1,
24  U2;
25 
26  FLA_Obj VT, V0,
27  VB, V1,
28  V2;
29 
30  FLA_Obj CT, C0,
31  CB, C1,
32  C2;
33 
34  FLA_Obj DT, D0,
35  DB, D1,
36  D2;
37 
38  dim_t b_T, b_UC, b_VD;
39 
40  FLA_Part_2x1( T, &TT,
41  &TB, 0, FLA_TOP );
42 
43  FLA_Part_2x1( U, &UT,
44  &UB, 0, FLA_TOP );
45 
46  FLA_Part_2x1( V, &VT,
47  &VB, 0, FLA_TOP );
48 
49  FLA_Part_2x1( C, &CT,
50  &CB, 0, FLA_TOP );
51 
52  FLA_Part_2x1( D, &DT,
53  &DB, 0, FLA_TOP );
54 
55  while ( FLA_Obj_length( TT ) < FLA_Obj_length( T ) ){
56 
57  b_T = FLA_Determine_blocksize( TB, FLA_BOTTOM, FLA_Cntl_blocksize( cntl ) );
58  b_UC = FLA_Determine_blocksize( UB, FLA_BOTTOM, FLA_Cntl_blocksize( cntl ) );
59  b_VD = FLA_Determine_blocksize( VB, FLA_BOTTOM, FLA_Cntl_blocksize( cntl ) );
60 
61  FLA_Repart_2x1_to_3x1( TT, &T0,
62  /* ** */ /* ** */
63  &T1,
64  TB, &T2, b_T, FLA_BOTTOM );
65 
66  FLA_Repart_2x1_to_3x1( UT, &U0,
67  /* ** */ /* ** */
68  &U1,
69  UB, &U2, b_UC, FLA_BOTTOM );
70 
71  FLA_Repart_2x1_to_3x1( VT, &V0,
72  /* ** */ /* ** */
73  &V1,
74  VB, &V2, b_VD, FLA_BOTTOM );
75 
76  FLA_Repart_2x1_to_3x1( CT, &C0,
77  /* ** */ /* ** */
78  &C1,
79  CB, &C2, b_UC, FLA_BOTTOM );
80 
81  FLA_Repart_2x1_to_3x1( DT, &D0,
82  /* ** */ /* ** */
83  &D1,
84  DB, &D2, b_VD, FLA_BOTTOM );
85 
86  /*------------------------------------------------------------*/
87 
88  // / R \ / R \
89  // | C1 | = Q' | C1 |
90  // \ D1 / \ D1 /
91  //
92  // where Q is formed from U1, V1, and T1.
93 
94  FLA_Apply_QUD_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
95  T1, W,
96  R,
97  U1, C1,
98  V1, D1, FLA_Cntl_sub_apqudut( cntl ) );
99 
100  /*------------------------------------------------------------*/
101 
102  FLA_Cont_with_3x1_to_2x1( &TT, T0,
103  T1,
104  /* ** */ /* ** */
105  &TB, T2, FLA_TOP );
106 
107  FLA_Cont_with_3x1_to_2x1( &UT, U0,
108  U1,
109  /* ** */ /* ** */
110  &UB, U2, FLA_TOP );
111 
112  FLA_Cont_with_3x1_to_2x1( &VT, V0,
113  V1,
114  /* ** */ /* ** */
115  &VB, V2, FLA_TOP );
116 
117  FLA_Cont_with_3x1_to_2x1( &CT, C0,
118  C1,
119  /* ** */ /* ** */
120  &CB, C2, FLA_TOP );
121 
122  FLA_Cont_with_3x1_to_2x1( &DT, D0,
123  D1,
124  /* ** */ /* ** */
125  &DB, D2, FLA_TOP );
126  }
127 
128  return FLA_SUCCESS;
129 }
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_Cont_with_3x1_to_2x1(FLA_Obj *AT, FLA_Obj A0, FLA_Obj A1, FLA_Obj *AB, FLA_Obj A2, FLA_Side side)
Definition: FLA_View.c:428
FLA_Error FLA_Repart_2x1_to_3x1(FLA_Obj AT, FLA_Obj *A0, FLA_Obj *A1, FLA_Obj AB, FLA_Obj *A2, dim_t mb, FLA_Side side)
Definition: FLA_View.c:226
FLA_Error FLA_Part_2x1(FLA_Obj A, FLA_Obj *A1, FLA_Obj *A2, dim_t mb, FLA_Side side)
Definition: FLA_View.c:76
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
dim_t FLA_Determine_blocksize(FLA_Obj A_unproc, FLA_Quadrant to_dir, fla_blocksize_t *cntl_blocksizes)
Definition: FLA_Blocksize.c:234
unsigned long dim_t
Definition: FLA_type_defs.h:71
Definition: FLA_type_defs.h:159

References FLA_Apply_QUD_UT_internal(), FLA_Cont_with_3x1_to_2x1(), FLA_Determine_blocksize(), FLA_Obj_length(), FLA_Part_2x1(), and FLA_Repart_2x1_to_3x1().

Referenced by FLA_Apply_QUD_UT_lhfc().