libflame revision_anchor
Functions
FLA_CAQR2_UT_unb_var1.c File Reference

(r)

Functions

FLA_Error FLA_CAQR2_UT_unb_var1 (FLA_Obj U, FLA_Obj D, FLA_Obj T)
 

Function Documentation

◆ FLA_CAQR2_UT_unb_var1()

FLA_Error FLA_CAQR2_UT_unb_var1 ( FLA_Obj  U,
FLA_Obj  D,
FLA_Obj  T 
)
15{
16 FLA_Obj UTL, UTR, U00, u01, U02,
18 U20, u21, U22;
19
20 FLA_Obj DTL, DTR, D00, d01, D02,
22 D20, d21, D22;
23
24 FLA_Obj TTL, TTR, T00, t01, T02,
25 TBL, TBR, t10t, tau11, t12t,
26 T20, t21, T22;
27
28 FLA_Obj d1, D2;
29
31 d01B;
32
34 D00B;
35
36 dim_t m_DT;
37
38 // Begin partitioning diagonally through D with m - n rows above
39 // the diagonal.
41
42 FLA_Part_2x2( U, &UTL, &UTR,
43 &UBL, &UBR, 0, 0, FLA_TL );
44
45 FLA_Part_2x2( D, &DTL, &DTR,
46 &DBL, &DBR, m_DT, 0, FLA_TL );
47
48 FLA_Part_2x2( T, &TTL, &TTR,
49 &TBL, &TBR, 0, 0, FLA_TL );
50
51 while ( FLA_Obj_min_dim( UBR ) > 0 ){
52
53 FLA_Repart_2x2_to_3x3( UTL, /**/ UTR, &U00, /**/ &u01, &U02,
54 /* ************* */ /* ************************** */
55 &u10t, /**/ &upsilon11, &u12t,
56 UBL, /**/ UBR, &U20, /**/ &u21, &U22,
57 1, 1, FLA_BR );
58
59 FLA_Repart_2x2_to_3x3( DTL, /**/ DTR, &D00, /**/ &d01, &D02,
60 /* ************* */ /* ************************** */
61 &d10t, /**/ &delta11, &d12t,
62 DBL, /**/ DBR, &D20, /**/ &d21, &D22,
63 1, 1, FLA_BR );
64
65 FLA_Repart_2x2_to_3x3( TTL, /**/ TTR, &T00, /**/ &t01, &T02,
66 /* ************* */ /* ************************ */
67 &t10t, /**/ &tau11, &t12t,
68 TBL, /**/ TBR, &T20, /**/ &t21, &T22,
69 1, 1, FLA_BR );
70
71 /*------------------------------------------------------------*/
72
74 delta11, &d1 );
75
77 d12t, &D2 );
78
79 // Compute tau11 and u2 from upsilon11 and d1 such that tau11 and u2
80 // determine a Householder transform H such that applying H from the
81 // left to the column vector consisting of upsilon11 and d1 annihilates
82 // the entries in d1 (and updates upsilon11).
85 d1, tau11 );
86
87 // / u12t \ = H / u12t \
88 // \ D2 / \ D2 /
89 //
90 // where H is formed from tau11 and d1.
92 D2 );
93
95 &d01B, m_DT, FLA_TOP );
96
98 &D00B, m_DT, FLA_TOP );
99
100 // t01 = D00' * d01;
101 // = D00T' * d01T + triu( D00B )' * d01B;
104 D00B, t01 );
106
107 /*------------------------------------------------------------*/
108
109 FLA_Cont_with_3x3_to_2x2( &UTL, /**/ &UTR, U00, u01, /**/ U02,
110 u10t, upsilon11, /**/ u12t,
111 /* ************** */ /* ************************ */
112 &UBL, /**/ &UBR, U20, u21, /**/ U22,
113 FLA_TL );
114
115 FLA_Cont_with_3x3_to_2x2( &DTL, /**/ &DTR, D00, d01, /**/ D02,
116 d10t, delta11, /**/ d12t,
117 /* ************** */ /* ************************ */
118 &DBL, /**/ &DBR, D20, d21, /**/ D22,
119 FLA_TL );
120
121 FLA_Cont_with_3x3_to_2x2( &TTL, /**/ &TTR, T00, t01, /**/ T02,
122 t10t, tau11, /**/ t12t,
123 /* ************** */ /* ********************** */
124 &TBL, /**/ &TBR, T20, t21, /**/ T22,
125 FLA_TL );
126 }
127
128 return FLA_SUCCESS;
129}
FLA_Error FLA_Copy_external(FLA_Obj A, FLA_Obj B)
Definition FLA_Copy_external.c:13
FLA_Error FLA_Gemv_external(FLA_Trans transa, FLA_Obj alpha, FLA_Obj A, FLA_Obj x, FLA_Obj beta, FLA_Obj y)
Definition FLA_Gemv_external.c:13
FLA_Error FLA_Trmv_external(FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj A, FLA_Obj x)
Definition FLA_Trmv_external.c:13
FLA_Obj FLA_ONE
Definition FLA_Init.c:18
FLA_Error FLA_Apply_H2_UT(FLA_Side side, FLA_Obj tau, FLA_Obj u2, FLA_Obj a1, FLA_Obj A2)
Definition FLA_Apply_H2_UT.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
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
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_Merge_2x1(FLA_Obj AT, FLA_Obj AB, FLA_Obj *A)
Definition FLA_View.c:541
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition FLA_Query.c:153
unsigned long dim_t
Definition FLA_type_defs.h:71
FLA_Error FLA_Househ2_UT(FLA_Side side, FLA_Obj chi_1, FLA_Obj x2, FLA_Obj tau)
Definition FLA_Househ2_UT.c:16
int i
Definition bl1_axmyv2.c:145
Definition FLA_type_defs.h:159

References FLA_Apply_H2_UT(), FLA_Cont_with_3x3_to_2x2(), FLA_Copy_external(), FLA_Gemv_external(), FLA_Househ2_UT(), FLA_Merge_2x1(), FLA_Obj_length(), FLA_Obj_min_dim(), FLA_Obj_width(), FLA_ONE, FLA_Part_2x1(), FLA_Part_2x2(), FLA_Repart_2x2_to_3x3(), FLA_Trmv_external(), and i.

Referenced by FLA_CAQR2_UT_internal().