libflame revision_anchor
Functions
FLA_LQ_UT_blk_var2.c File Reference

(r)

Functions

FLA_Error FLA_LQ_UT_blk_var2 (FLA_Obj A, FLA_Obj T, fla_lqut_t *cntl)
 

Function Documentation

◆ FLA_LQ_UT_blk_var2()

FLA_Error FLA_LQ_UT_blk_var2 ( FLA_Obj  A,
FLA_Obj  T,
fla_lqut_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 TTL, TTR, T00, T01, T02,
20 TBL, TBR, T10, T11, W12,
21 T20, T21, T22;
22
24 AR2;
25
26 dim_t b;
27
28 FLA_Part_2x2( A, &ATL, &ATR,
29 &ABL, &ABR, 0, 0, FLA_TL );
30
31 FLA_Part_2x2( T, &TTL, &TTR,
32 &TBL, &TBR, 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( TTL, /**/ TTR, &T00, /**/ &T01, &T02,
45 /* ************* */ /* ******************** */
46 &T10, /**/ &T11, &W12,
47 TBL, /**/ TBR, &T20, /**/ &T21, &T22,
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 // Update T
86 //
87 // T01 = conj(A01) * U11^T + conj(A02) * U12^T;
88 //
89 // Recall: U11 = triuu( A11 );
90 // U12 = A12;
91
95 FLA_ONE, A11, T01 );
98
99 /*------------------------------------------------------------*/
100
101 FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02,
102 A10, A11, /**/ A12,
103 /* ************** */ /* ****************** */
104 &ABL, /**/ &ABR, A20, A21, /**/ A22,
105 FLA_TL );
106
107 FLA_Cont_with_3x3_to_2x2( &TTL, /**/ &TTR, T00, T01, /**/ T02,
108 T10, T11, /**/ W12,
109 /* ************** */ /* ****************** */
110 &TBL, /**/ &TBR, T20, T21, /**/ T22,
111 FLA_TL );
112 }
113
114 return FLA_SUCCESS;
115}
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_Copyt_external(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Copyt_external.c:13
FLA_Error FLA_Gemm_external(FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Gemm_external.c:13
FLA_Error FLA_Trmm_external(FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLA_Trmm_external.c:13
FLA_Obj FLA_ONE
Definition FLA_Init.c:18
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_Copyt_external(), FLA_Determine_blocksize(), FLA_Gemm_external(), FLA_LQ_UT_internal(), FLA_Merge_1x2(), FLA_Obj_length(), FLA_Obj_min_dim(), FLA_ONE, FLA_Part_2x2(), FLA_Repart_2x2_to_3x3(), FLA_Trmm_external(), and i.

Referenced by FLA_LQ_UT_internal().