libflame revision_anchor
Functions
FLA_QR_UT_recover_tau.c File Reference

(r)

Functions

FLA_Error FLA_QR_UT_recover_tau_submatrix (FLA_Obj T, FLA_Obj t)
 
FLA_Error FLA_QR_UT_recover_tau (FLA_Obj T, FLA_Obj t)
 

Function Documentation

◆ FLA_QR_UT_recover_tau()

FLA_Error FLA_QR_UT_recover_tau ( FLA_Obj  T,
FLA_Obj  t 
)
16{
17 FLA_Obj TL, TR, T0, T1, T2;
18
19 FLA_Obj tT, t0,
20 tB, t1,
21 t2;
22
23 dim_t b_alg, b;
24
27
29
30 FLA_Part_1x2( T, &TL, &TR, 0, FLA_LEFT );
31
32 FLA_Part_2x1( t, &tT,
33 &tB, 0, FLA_TOP );
34
35 // T matrix may include workspace; thus, T should not be placed as a loop guard.
36 while ( FLA_Obj_length( tB ) > 0 ) {
37
38 // The blocksize should be determined that the T matrix is square.
39 b = min( FLA_Obj_length( tB ), b_alg );
40
41 FLA_Repart_1x2_to_1x3( TL, /**/ TR, &T0, /**/ &T1, &T2,
42 b, FLA_RIGHT );
43
45 /* ** */ /* ** */
46 &t1,
47 tB, &t2, b, FLA_BOTTOM );
48
49 /*------------------------------------------------------------*/
50
52
53 /*------------------------------------------------------------*/
54
55 FLA_Cont_with_1x3_to_1x2( &TL, /**/ &TR, T0, T1, /**/ T2,
56 FLA_LEFT );
57
59 t1,
60 /* ** */ /* ** */
61 &tB, t2, FLA_TOP );
62 }
63
64 return FLA_SUCCESS;
65}
FLA_Error FLA_QR_UT_recover_tau_submatrix(FLA_Obj T, FLA_Obj t)
Definition FLA_QR_UT_recover_tau.c:68
FLA_Error FLA_QR_UT_recover_tau_check(FLA_Obj T, FLA_Obj tau)
Definition FLA_QR_UT_recover_tau_check.c:13
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_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_1x2(FLA_Obj A, FLA_Obj *A1, FLA_Obj *A2, dim_t nb, FLA_Side side)
Definition FLA_View.c:110
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
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 int FLA_Check_error_level(void)
Definition FLA_Check.c:18
unsigned long dim_t
Definition FLA_type_defs.h:71
int i
Definition bl1_axmyv2.c:145
Definition FLA_type_defs.h:159

References FLA_Check_error_level(), FLA_Cont_with_1x3_to_1x2(), FLA_Cont_with_3x1_to_2x1(), FLA_Obj_length(), FLA_Part_1x2(), FLA_Part_2x1(), FLA_QR_UT_recover_tau_check(), FLA_QR_UT_recover_tau_submatrix(), FLA_Repart_1x2_to_1x3(), FLA_Repart_2x1_to_3x1(), and i.

Referenced by FLA_LQ_UT_recover_tau().

◆ FLA_QR_UT_recover_tau_submatrix()

FLA_Error FLA_QR_UT_recover_tau_submatrix ( FLA_Obj  T,
FLA_Obj  t 
)
69{
70 FLA_Obj TTL, TTR, T00, t01, T02,
71 TBL, TBR, t10t, tau11, t12t,
72 T20, t21, T22;
73
74 FLA_Obj tT, t0,
75 tB, tau1,
76 t2;
77
78
79 FLA_Part_2x2( T, &TTL, &TTR,
80 &TBL, &TBR, 0, 0, FLA_TL );
81
82 FLA_Part_2x1( t, &tT,
83 &tB, 0, FLA_TOP );
84
85 while ( FLA_Obj_min_dim( TBR ) > 0 ){
86
87 FLA_Repart_2x2_to_3x3( TTL, /**/ TTR, &T00, /**/ &t01, &T02,
88 /* ************* */ /* ************************ */
89 &t10t, /**/ &tau11, &t12t,
90 TBL, /**/ TBR, &T20, /**/ &t21, &T22,
91 1, 1, FLA_BR );
92
94 /* ** */ /* ** */
95 &tau1,
96 tB, &t2, 1, FLA_BOTTOM );
97
98 /*------------------------------------------------------------*/
99
100 // tau1 = tau11;
102
103 /*------------------------------------------------------------*/
104
105 FLA_Cont_with_3x3_to_2x2( &TTL, /**/ &TTR, T00, t01, /**/ T02,
106 t10t, tau11, /**/ t12t,
107 /* ************** */ /* ********************** */
108 &TBL, /**/ &TBR, T20, t21, /**/ T22,
109 FLA_TL );
110
112 tau1,
113 /* ** */ /* ** */
114 &tB, t2, FLA_TOP );
115
116 }
117
118 return FLA_SUCCESS;
119}
FLA_Error FLA_Copy_external(FLA_Obj A, FLA_Obj B)
Definition FLA_Copy_external.c:13
FLA_Error FLA_Cont_with_3x3_to_2x2(FLA_Obj *ATL, FLA_Obj *ATR, FLA_Obj A00, FLA_Obj A01, FLA_Obj A02, FLA_Obj A10, FLA_Obj A11, FLA_Obj A12, FLA_Obj *ABL, FLA_Obj *ABR, FLA_Obj A20, FLA_Obj A21, FLA_Obj A22, FLA_Quadrant quadrant)
Definition FLA_View.c:304
FLA_Error FLA_Part_2x2(FLA_Obj A, FLA_Obj *A11, FLA_Obj *A12, FLA_Obj *A21, FLA_Obj *A22, dim_t mb, dim_t nb, FLA_Quadrant quadrant)
Definition FLA_View.c:17
FLA_Error FLA_Repart_2x2_to_3x3(FLA_Obj ATL, FLA_Obj ATR, FLA_Obj *A00, FLA_Obj *A01, FLA_Obj *A02, FLA_Obj *A10, FLA_Obj *A11, FLA_Obj *A12, FLA_Obj ABL, FLA_Obj ABR, FLA_Obj *A20, FLA_Obj *A21, FLA_Obj *A22, dim_t mb, dim_t nb, FLA_Quadrant quadrant)
Definition FLA_View.c:142
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition FLA_Query.c:153

References FLA_Cont_with_3x1_to_2x1(), FLA_Cont_with_3x3_to_2x2(), FLA_Copy_external(), FLA_Obj_min_dim(), FLA_Part_2x1(), FLA_Part_2x2(), FLA_Repart_2x1_to_3x1(), FLA_Repart_2x2_to_3x3(), and i.

Referenced by FLA_QR_UT_recover_tau().