libflame revision_anchor
Functions
FLA_Tridiag_UT_l_unb_var3.c File Reference

(r)

Functions

FLA_Error FLA_Tridiag_UT_l_unb_var3 (FLA_Obj A, FLA_Obj T)
 
FLA_Error FLA_Tridiag_UT_l_step_unb_var3 (FLA_Obj A, FLA_Obj Z, FLA_Obj T)
 

Function Documentation

◆ FLA_Tridiag_UT_l_step_unb_var3()

FLA_Error FLA_Tridiag_UT_l_step_unb_var3 ( FLA_Obj  A,
FLA_Obj  Z,
FLA_Obj  T 
)
30{
31 FLA_Obj ATL, ATR, A00, a01, A02,
33 A20, a21, A22;
36 Z20, z21, Z22;
37 FLA_Obj TTL, TTR, T00, t01, T02,
38 TBL, TBR, t10t, tau11, t12t,
39 T20, t21, T22;
40 FLA_Obj dT, d01,
41 dB, delta11,
42 d21;
43 FLA_Obj fT, f01,
44 fB, phi11,
45 f21;
46 FLA_Obj d, f;
47
53
56 a21_b;
57 FLA_Obj a2;
58
60 dim_t m_A;
62
63
65
67 m_A = FLA_Obj_length( A );
68
69 FLA_Obj_create( datatype_A, 1, 1, 0, 0, &inv_tau11 );
71 FLA_Obj_create( datatype_A, 1, 1, 0, 0, &beta );
72 FLA_Obj_create( datatype_A, 1, 1, 0, 0, &first_elem );
73 FLA_Obj_create( datatype_A, 1, 1, 0, 0, &last_elem );
74 FLA_Obj_create( datatype_A, m_A, 1, 0, 0, &d );
75 FLA_Obj_create( datatype_A, m_A, 1, 0, 0, &f );
76
77 FLA_Set( FLA_ZERO, Z );
78
79 FLA_Part_2x2( A, &ATL, &ATR,
80 &ABL, &ABR, 0, 0, FLA_TL );
81 FLA_Part_2x2( Z, &ZTL, &ZTR,
82 &ZBL, &ZBR, 0, 0, FLA_TL );
83 FLA_Part_2x2( T, &TTL, &TTR,
84 &TBL, &TBR, 0, 0, FLA_TL );
85 FLA_Part_2x1( d, &dT,
86 &dB, 0, FLA_TOP );
87 FLA_Part_2x1( f, &fT,
88 &fB, 0, FLA_TOP );
89
90 while ( FLA_Obj_length( ATL ) < b_alg )
91 {
92 FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &a01, &A02,
93 /* ************* */ /* ************************** */
94 &a10t, /**/ &alpha11, &a12t,
95 ABL, /**/ ABR, &A20, /**/ &a21, &A22,
96 1, 1, FLA_BR );
97 FLA_Repart_2x2_to_3x3( ZTL, /**/ ZTR, &Z00, /**/ &z011, &Z02,
98 /* ************* */ /* ************************* */
99 &z10t, /**/ &zeta11, &z12t,
100 ZBL, /**/ ZBR, &Z20, /**/ &z21, &Z22,
101 1, 1, FLA_BR );
102 FLA_Repart_2x2_to_3x3( TTL, /**/ TTR, &T00, /**/ &t01, &T02,
103 /* ************* */ /* ************************ */
104 &t10t, /**/ &tau11, &t12t,
105 TBL, /**/ TBR, &T20, /**/ &t21, &T22,
106 1, 1, FLA_BR );
108 /* ** */ /* ******* */
109 &delta11,
110 dB, &d21, 1, FLA_BOTTOM );
112 /* ** */ /* ***** */
113 &phi11,
114 fB, &f21, 1, FLA_BOTTOM );
115
116 /*------------------------------------------------------------*/
117
118 // Save first element of a10_r and set it to one so we can use a10t as
119 // u10t in subsequent computations. We will restore a10_r later on.
120 if ( FLA_Obj_length( ATL ) > 0 )
121 {
125 }
126
128 a21, &a2 );
129
130 // alpha11 = alpha11 - u10t * z10t' - z10t * u10t';
131 // a21 = a21 - U20 * z10t' - Z20 * u10t';
134
135 // Restore last element of a10t.
136 if ( FLA_Obj_length( ATL ) > 0 )
137 {
139 }
140
141 if ( FLA_Obj_length( A22 ) > 0 )
142 {
144 &a21_b, 1, FLA_TOP );
145
146 // [ u21, tau11, a21 ] = House( a21 );
148 a21_t,
149 a21_b, tau11 );
150
151 // inv_tau11 = 1 / tau11;
152 // minus_inv_tau11 = -1 / tau11;
157
158 // Save first element of a21_t and set it to one.
161
162 // z21 = A22 * u21;
164
165 // z21 = z21 - U20 * ( Z20' * u21 ) - Z20 * ( U20' * u21 );
168
171
172 // t01 = U20' * u21;
173 FLA_Copy( d01, t01 );
174
175 // beta = u21' * z21 / 2;
178
179 // z21 = ( z21 - beta / tau * u21 ) / tau;
181 FLA_Axpy( beta, a21, z21 );
183
184 // Restore first element of a21.
186 }
187
188 /*------------------------------------------------------------*/
189
190 FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, a01, /**/ A02,
191 a10t, alpha11, /**/ a12t,
192 /* ************** */ /* ************************ */
193 &ABL, /**/ &ABR, A20, a21, /**/ A22,
194 FLA_TL );
195 FLA_Cont_with_3x3_to_2x2( &ZTL, /**/ &ZTR, Z00, z011, /**/ Z02,
196 z10t, zeta11, /**/ z12t,
197 /* ************** */ /* *********************** */
198 &ZBL, /**/ &ZBR, Z20, z21, /**/ Z22,
199 FLA_TL );
200 FLA_Cont_with_3x3_to_2x2( &TTL, /**/ &TTR, T00, t01, /**/ T02,
201 t10t, tau11, /**/ t12t,
202 /* ************** */ /* ********************** */
203 &TBL, /**/ &TBR, T20, t21, /**/ T22,
204 FLA_TL );
206 delta11,
207 /* ** */ /* ******* */
208 &dB, d21, FLA_TOP );
210 phi11,
211 /* ** */ /* ***** */
212 &fB, f21, FLA_TOP );
213 }
214
217 FLA_Obj_free( &beta );
220 FLA_Obj_free( &d );
221 FLA_Obj_free( &f );
222
223 return FLA_SUCCESS;
224}
FLA_Error FLA_Copy(FLA_Obj A, FLA_Obj B)
Definition FLA_Copy.c:15
FLA_Error FLA_Scal(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Scal.c:15
FLA_Error FLA_Dotc(FLA_Conj conj, FLA_Obj x, FLA_Obj y, FLA_Obj rho)
Definition FLA_Dotc.c:13
FLA_Error FLA_Axpy(FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLA_Axpy.c:15
FLA_Error FLA_Inv_scal(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Inv_scal.c:13
FLA_Error FLA_Inv_scalc(FLA_Conj conjalpha, FLA_Obj alpha, FLA_Obj A)
Definition FLA_Inv_scalc.c:13
FLA_Error FLA_Hemv(FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj x, FLA_Obj beta, FLA_Obj y)
Definition FLA_Hemv.c:13
FLA_Error FLA_Gemvc(FLA_Trans transa, FLA_Conj conjx, FLA_Obj alpha, FLA_Obj A, FLA_Obj x, FLA_Obj beta, FLA_Obj y)
Definition FLA_Gemvc.c:13
FLA_Error FLA_Gemv(FLA_Trans transa, FLA_Obj alpha, FLA_Obj A, FLA_Obj x, FLA_Obj beta, FLA_Obj y)
Definition FLA_Gemv.c:15
FLA_Obj FLA_TWO
Definition FLA_Init.c:17
FLA_Obj FLA_MINUS_ONE
Definition FLA_Init.c:22
FLA_Obj FLA_ZERO
Definition FLA_Init.c:20
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
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_Obj_create(FLA_Datatype datatype, dim_t m, dim_t n, dim_t rs, dim_t cs, FLA_Obj *obj)
Definition FLA_Obj.c:55
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_Merge_2x1(FLA_Obj AT, FLA_Obj AB, FLA_Obj *A)
Definition FLA_View.c:541
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition FLA_Obj.c:588
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition FLA_Query.c:13
int FLA_Datatype
Definition FLA_type_defs.h:49
unsigned long dim_t
Definition FLA_type_defs.h:71
FLA_Error FLA_Set(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Set.c:13
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_Axpy(), FLA_Cont_with_3x1_to_2x1(), FLA_Cont_with_3x3_to_2x2(), FLA_Copy(), FLA_Dotc(), FLA_Gemv(), FLA_Gemvc(), FLA_Hemv(), FLA_Househ2_UT(), FLA_Inv_scal(), FLA_Inv_scalc(), FLA_Merge_2x1(), FLA_MINUS_ONE, FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_length(), FLA_ONE, FLA_Part_1x2(), FLA_Part_2x1(), FLA_Part_2x2(), FLA_Repart_2x1_to_3x1(), FLA_Repart_2x2_to_3x3(), FLA_Scal(), FLA_Set(), FLA_TWO, FLA_ZERO, and i.

Referenced by FLA_Tridiag_UT_l_unb_var3().

◆ FLA_Tridiag_UT_l_unb_var3()

FLA_Error FLA_Tridiag_UT_l_unb_var3 ( FLA_Obj  A,
FLA_Obj  T 
)
14{
16 FLA_Obj Z;
17
18 //FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, A, &Y );
20
22
23 //FLA_Obj_free( &Y );
24 FLA_Obj_free( &Z );
25
26 return r_val;
27}
FLA_Error FLA_Tridiag_UT_l_step_unb_var3(FLA_Obj A, FLA_Obj Z, FLA_Obj T)
Definition FLA_Tridiag_UT_l_unb_var3.c:29
FLA_Error FLA_Obj_create_conf_to(FLA_Trans trans, FLA_Obj old, FLA_Obj *obj)
Definition FLA_Obj.c:286
int FLA_Error
Definition FLA_type_defs.h:47

References FLA_Obj_create_conf_to(), FLA_Obj_free(), FLA_Tridiag_UT_l_step_unb_var3(), and i.

Referenced by FLA_Tridiag_UT_l().