libflame revision_anchor
Functions
FLA_LQ_UT_blk_var3.c File Reference

(r)

Functions

FLA_Error FLA_LQ_UT_blk_var3 (FLA_Obj A, FLA_Obj TW, fla_lqut_t *cntl)
 

Function Documentation

◆ FLA_LQ_UT_blk_var3()

FLA_Error FLA_LQ_UT_blk_var3 ( FLA_Obj  A,
FLA_Obj  TW,
fla_lqut_t cntl 
)
14{
15 FLA_Obj ATL, ATR, A00, A01, A02,
16 ABL, ABR, A10, A11, A12,
17 A20, A21, A22;
18
20 TWBL, TWBR, TW10, T11, W12,
21 TW20, TW21, TW22;
22
24 AR2;
25
26 dim_t b;
27
28 FLA_Part_2x2( A, &ATL, &ATR,
29 &ABL, &ABR, 0, 0, FLA_TL );
30
32 &TWBL, &TWBR, 0, 0, FLA_TL );
33
34 while ( FLA_Obj_min_dim( ABR ) > 0 ){
35
37
38 FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &A01, &A02,
39 /* ************* */ /* ******************** */
40 &A10, /**/ &A11, &A12,
41 ABL, /**/ ABR, &A20, /**/ &A21, &A22,
42 b, b, FLA_BR );
43
44 FLA_Repart_2x2_to_3x3( TWTL, /**/ TWTR, &TW00, /**/ &TW01, &TW02,
45 /* ************* */ /* ******************** */
46 &TW10, /**/ &T11, &W12,
47 TWBL, /**/ TWBR, &TW20, /**/ &TW21, &TW22,
48 b, b, FLA_BR );
49
50 /*------------------------------------------------------------*/
51
53
54 // Perform an LQ factorization via the UT transform on AR1:
55 //
56 // ( A11 A12 ) -> L11 QR1
57 //
58 // where:
59 // - QR1 is formed from UR1 (which is stored row-wise above the
60 // diagonal of AR1) and T11 (which is stored to the upper triangle
61 // of T11).
62 // - L11 is stored to the lower triangle of AR1.
63
65 FLA_Cntl_sub_lqut( cntl ) );
66
67
68 if ( FLA_Obj_length( A21 ) > 0 )
69 {
71
72 // Apply the Householder transforms associated with UR1 and T11 to
73 // AR2:
74 //
75 // ( A21 A22 ) := ( A21 A22 ) Q1
76 //
77 // where QR1 is formed from UR1 and T11.
78
80 AR1, T11, W12, AR2,
81 FLA_Cntl_sub_apqut( cntl ) );
82 }
83
84 /*------------------------------------------------------------*/
85
86 FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02,
87 A10, A11, /**/ A12,
88 /* ************** */ /* ****************** */
89 &ABL, /**/ &ABR, A20, A21, /**/ A22,
90 FLA_TL );
91
93 TW10, T11, /**/ W12,
94 /* ************** */ /* ****************** */
95 &TWBL, /**/ &TWBR, TW20, TW21, /**/ TW22,
96 FLA_TL );
97 }
98
99 return FLA_SUCCESS;
100}
FLA_Error FLA_Apply_Q_UT_internal(FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
Definition FLA_Apply_Q_UT_internal.c:17
FLA_Error FLA_LQ_UT_internal(FLA_Obj A, FLA_Obj T, fla_lqut_t *cntl)
Definition FLA_LQ_UT_internal.c:17
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
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_Merge_1x2(FLA_Obj AL, FLA_Obj AR, FLA_Obj *A)
Definition FLA_View.c:562
dim_t FLA_Determine_blocksize(FLA_Obj A_unproc, FLA_Quadrant to_dir, fla_blocksize_t *cntl_blocksizes)
Definition FLA_Blocksize.c:234
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
Definition FLA_type_defs.h:159

References FLA_Apply_Q_UT_internal(), FLA_Cont_with_3x3_to_2x2(), FLA_Determine_blocksize(), FLA_LQ_UT_internal(), FLA_Merge_1x2(), FLA_Obj_length(), FLA_Obj_min_dim(), FLA_Part_2x2(), FLA_Repart_2x2_to_3x3(), and i.

Referenced by FLA_LQ_UT_internal().