libflame  revision_anchor
Functions
FLA_Apply_QUD_UT_inc_lhfc_blk_var1.c File Reference

(r)

Functions

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)
 

Function Documentation

◆ FLA_Apply_QUD_UT_inc_lhfc_blk_var1()

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 
)

References FLA_Apply_QUD_UT_internal(), FLA_Cont_with_1x3_to_1x2(), FLA_Cont_with_3x1_to_2x1(), FLA_Determine_blocksize(), FLA_Obj_width(), FLA_Part_1x2(), FLA_Part_2x1(), FLA_Repart_1x2_to_1x3(), and FLA_Repart_2x1_to_3x1().

Referenced by FLA_Apply_QUD_UT_inc_lhfc().

17 {
18  FLA_Obj TL, TR, T0, T1, T2;
19 
20  FLA_Obj UL, UR, U0, U1, U2;
21 
22  FLA_Obj VL, VR, V0, V1, V2;
23 
24  FLA_Obj WT, W0,
25  WB, W1,
26  W2;
27 
28  FLA_Obj BT, B0,
29  BB, B1,
30  B2;
31 
32  dim_t b;
33 
34  FLA_Part_1x2( T, &TL, &TR, 0, FLA_LEFT );
35 
36  FLA_Part_1x2( U, &UL, &UR, 0, FLA_LEFT );
37 
38  FLA_Part_1x2( V, &VL, &VR, 0, FLA_LEFT );
39 
40  FLA_Part_2x1( W, &WT,
41  &WB, 0, FLA_TOP );
42 
43  FLA_Part_2x1( B, &BT,
44  &BB, 0, FLA_TOP );
45 
46  while ( FLA_Obj_width( UL ) < FLA_Obj_width( U ) ){
47 
48  b = FLA_Determine_blocksize( UR, FLA_RIGHT, FLA_Cntl_blocksize( cntl ) );
49 
50  FLA_Repart_1x2_to_1x3( TL, /**/ TR, &T0, /**/ &T1, &T2,
51  b, FLA_RIGHT );
52 
53  FLA_Repart_1x2_to_1x3( UL, /**/ UR, &U0, /**/ &U1, &U2,
54  b, FLA_RIGHT );
55 
56  FLA_Repart_1x2_to_1x3( VL, /**/ VR, &V0, /**/ &V1, &V2,
57  b, FLA_RIGHT );
58 
59  FLA_Repart_2x1_to_3x1( WT, &W0,
60  /* ** */ /* ** */
61  &W1,
62  WB, &W2, b, FLA_BOTTOM );
63 
64  FLA_Repart_2x1_to_3x1( BT, &B0,
65  /* ** */ /* ** */
66  &B1,
67  BB, &B2, b, FLA_BOTTOM );
68 
69  /*------------------------------------------------------------*/
70 
71  /*
72  Apply Q' to B1, C, and D from the left:
73 
74  / B1 \ / B1 \
75  | C | = Q' * | C |
76  \ D / \ D /
77 
78  where Q is formed from U1, V1, and T1.
79  */
80 
81  FLA_Apply_QUD_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
82  T1, W1,
83  B1,
84  U1, C,
85  V1, D, FLA_Cntl_sub_apqudut( cntl ) );
86 
87  /*------------------------------------------------------------*/
88 
89  FLA_Cont_with_1x3_to_1x2( &TL, /**/ &TR, T0, T1, /**/ T2,
90  FLA_LEFT );
91 
92  FLA_Cont_with_1x3_to_1x2( &UL, /**/ &UR, U0, U1, /**/ U2,
93  FLA_LEFT );
94 
95  FLA_Cont_with_1x3_to_1x2( &VL, /**/ &VR, V0, V1, /**/ V2,
96  FLA_LEFT );
97 
98  FLA_Cont_with_3x1_to_2x1( &WT, W0,
99  W1,
100  /* ** */ /* ** */
101  &WB, W2, FLA_TOP );
102 
103  FLA_Cont_with_3x1_to_2x1( &BT, B0,
104  B1,
105  /* ** */ /* ** */
106  &BB, B2, FLA_TOP );
107  }
108 
109  return FLA_SUCCESS;
110 }
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_Repart_1x2_to_1x3(FLA_Obj AL, FLA_Obj AR, FLA_Obj *A0, FLA_Obj *A1, FLA_Obj *A2, dim_t nb, FLA_Side side)
Definition: FLA_View.c:267
unsigned long dim_t
Definition: FLA_type_defs.h:71
dim_t FLA_Determine_blocksize(FLA_Obj A_unproc, FLA_Quadrant to_dir, fla_blocksize_t *cntl_blocksizes)
Definition: FLA_Blocksize.c:234
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
Definition: FLA_type_defs.h:158
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Cont_with_1x3_to_1x2(FLA_Obj *AL, FLA_Obj *AR, FLA_Obj A0, FLA_Obj A1, FLA_Obj A2, FLA_Side side)
Definition: FLA_View.c:475
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
FLA_Error FLA_Part_1x2(FLA_Obj A, FLA_Obj *A1, FLA_Obj *A2, dim_t nb, FLA_Side side)
Definition: FLA_View.c:110
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