libflame revision_anchor
Functions
FLA_QR_UT_piv_blk_var1.c File Reference

(r)

Functions

FLA_Error FLA_QR_UT_piv_blk_var1 (FLA_Obj A, FLA_Obj T, FLA_Obj w, FLA_Obj p, fla_qrut_t *cntl)
 

Function Documentation

◆ FLA_QR_UT_piv_blk_var1()

FLA_Error FLA_QR_UT_piv_blk_var1 ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  w,
FLA_Obj  p,
fla_qrut_t cntl 
)
14{
15 FLA_Obj ATL, ATR, A00, A01, A02,
16 ABL, ABR, A10, A11, A12,
17 A20, A21, A22;
18
19 FLA_Obj TL, TR, T0, T1, W12;
21
22 FLA_Obj pT, p0,
23 pB, p1,
24 p2;
25
26 FLA_Obj wT, w0,
27 wB, w1,
28 w2;
29
30 dim_t b_alg, b;
31
32 // Query the algorithmic blocksize by inspecting the length of T.
34
35 FLA_Part_2x2( A, &ATL, &ATR,
36 &ABL, &ABR, 0, 0, FLA_TL );
37
38 FLA_Part_1x2( T, &TL, &TR, 0, FLA_LEFT );
39
40 FLA_Part_2x1( p, &pT,
41 &pB, 0, FLA_TOP );
42
43 FLA_Part_2x1( w, &wT,
44 &wB, 0, FLA_TOP );
45
46 // Loop over A; T is properly truncated.
47 while ( FLA_Obj_min_dim( ABR ) > 0 ){
48
49 b = min( b_alg, FLA_Obj_min_dim( ABR ) );
50
51 FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &A01, &A02,
52 /* ************* */ /* ******************** */
53 &A10, /**/ &A11, &A12,
54 ABL, /**/ ABR, &A20, /**/ &A21, &A22,
55 b, b, FLA_BR );
56
57 FLA_Repart_1x2_to_1x3( TL, /**/ TR, &T0, /**/ &T1, &W12,
58 b, FLA_RIGHT );
59
61 /* ** */ /* ** */
62 &p1,
63 pB, &p2, b, FLA_BOTTOM );
64
66 /* ** */ /* ** */
67 &w1,
68 wB, &w2, b, FLA_BOTTOM );
69
70 /*------------------------------------------------------------*/
71
73 &T2B, b, FLA_TOP );
74
75 // Perform a unblocked (BLAS2-oriented) QR factorization
76 // with pivoting via the UT transform on ABR:
77 //
78 // ABR -> QB1 R11
79 //
80 // where:
81 // - QB1 is formed from UB1 (which is stored column-wise below the
82 // diagonal of ( A11 A21 )^T and T1T (which is stored to the upper triangle
83 // of T11).
84 // - R11 is stored to ( A11 A12 ).
86 FLA_Cntl_sub_qrut( cntl ) );
87
88 // Apply pivots to previous columns.
90
91 /*------------------------------------------------------------*/
92
93 FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02,
94 A10, A11, /**/ A12,
95 /* ************** */ /* ****************** */
96 &ABL, /**/ &ABR, A20, A21, /**/ A22,
97 FLA_TL );
98
99 FLA_Cont_with_1x3_to_1x2( &TL, /**/ &TR, T0, T1, /**/ W12,
100 FLA_LEFT );
101
103 p1,
104 /* ** */ /* ** */
105 &pB, p2, FLA_TOP );
106
108 w1,
109 /* ** */ /* ** */
110 &wB, w2, FLA_TOP );
111 }
112
113 return FLA_SUCCESS;
114}
FLA_Error FLA_QR_UT_piv_internal(FLA_Obj A, FLA_Obj T, FLA_Obj w, FLA_Obj p, fla_qrut_t *cntl)
Definition FLA_QR_UT_piv_internal.c:13
FLA_Error FLA_Apply_pivots(FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A)
Definition FLA_Apply_pivots.c:15
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_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_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
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
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition FLA_Query.c:153
unsigned long dim_t
Definition FLA_type_defs.h:71
int i
Definition bl1_axmyv2.c:145
double *restrict w1
Definition bl1_dotsv3.c:172
Definition FLA_type_defs.h:159

References FLA_Apply_pivots(), FLA_Cont_with_1x3_to_1x2(), FLA_Cont_with_3x1_to_2x1(), FLA_Cont_with_3x3_to_2x2(), FLA_Obj_length(), FLA_Obj_min_dim(), FLA_Part_1x2(), FLA_Part_2x1(), FLA_Part_2x2(), FLA_QR_UT_piv_internal(), FLA_Repart_1x2_to_1x3(), FLA_Repart_2x1_to_3x1(), FLA_Repart_2x2_to_3x3(), i, and w1.

Referenced by FLA_QR_UT_piv_internal().