libflame revision_anchor
Functions
FLA_Hess_UT_unb_var1.c File Reference

(r)

Functions

FLA_Error FLA_Hess_UT_unb_var1 (FLA_Obj A, FLA_Obj T)
 
FLA_Error FLA_Hess_UT_step_unb_var1 (FLA_Obj A, FLA_Obj T)
 

Function Documentation

◆ FLA_Hess_UT_step_unb_var1()

FLA_Error FLA_Hess_UT_step_unb_var1 ( FLA_Obj  A,
FLA_Obj  T 
)
19{
20 FLA_Obj ATL, ATR, A00, a01, A02,
22 A20, a21, A22;
23 FLA_Obj AL, AR, A0, a1, A2;
24 FLA_Obj TTL, TTR, T00, t01, T02,
25 TBL, TBR, t10t, tau11, t12t,
26 T20, t21, T22;
27
29 a21_b;
30
32 A22_b;
33
35
37
40
41
44
45 FLA_Obj_create( datatype_A, 1, 1, 0, 0, &first_elem );
46
47 FLA_Part_2x2( A, &ATL, &ATR,
48 &ABL, &ABR, 0, 0, FLA_TL );
49 FLA_Part_1x2( A, &AL, &AR, 0, FLA_LEFT );
50 FLA_Part_2x2( T, &TTL, &TTR,
51 &TBL, &TBR, 0, 0, FLA_TL );
52
53 while ( FLA_Obj_length( ATL ) < b_alg )
54 {
55 FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &a01, &A02,
56 /* ************* */ /* ************************** */
57 &a10t, /**/ &alpha11, &a12t,
58 ABL, /**/ ABR, &A20, /**/ &a21, &A22,
59 1, 1, FLA_BR );
60
61 FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &a1, &A2,
62 1, FLA_RIGHT );
63
64 FLA_Repart_2x2_to_3x3( TTL, /**/ TTR, &T00, /**/ &t01, &T02,
65 /* ************* */ /* ************************** */
66 &t10t, /**/ &tau11, &t12t,
67 TBL, /**/ TBR, &T20, /**/ &t21, &T22,
68 1, 1, FLA_BR );
69
70 /*------------------------------------------------------------*/
71
72 if ( FLA_Obj_length( A22 ) > 0 )
73 {
75 &a21_b, 1, FLA_TOP );
76
78 &A22_b, 1, FLA_TOP );
79
80 FLA_Part_1x2( A2, &A2_l, &A2_r, 1, FLA_LEFT );
81
82 // [ u21, tau11, a21 ] = House( a21 );
84 a21_t,
85 a21_b, tau11 );
86
87 // Save first element of a21_t and set it to one so we can use a21 as
88 // u21 in subsequent computations. We will restore a21_t later on.
91
92 // A22 = ( I - inv( tau ) * u21 * u21' ) * A22;
94 A22_b );
95
96 // A02 = A02 * ( I - inv( tau ) * u21 * u21' );
97 // a12t = a12t * ( I - inv( tau ) * u21 * u21' );
98 // A22 = A22 * ( I - inv( tau ) * u21 * u21' );
100
101 // t01 = U20' * u21;
103
104 // Restore first element of a21.
106 }
107
108 /*------------------------------------------------------------*/
109
110 FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, a01, /**/ A02,
111 a10t, alpha11, /**/ a12t,
112 /* ************** */ /* ************************ */
113 &ABL, /**/ &ABR, A20, a21, /**/ A22,
114 FLA_TL );
115
116 FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, a1, /**/ A2,
117 FLA_LEFT );
118
119 FLA_Cont_with_3x3_to_2x2( &TTL, /**/ &TTR, T00, t01, /**/ T02,
120 t10t, tau11, /**/ t12t,
121 /* ************** */ /* ************************ */
122 &TBL, /**/ &TBR, T20, t21, /**/ T22,
123 FLA_TL );
124 }
125
127
128 return FLA_SUCCESS;
129}
FLA_Error FLA_Copy(FLA_Obj A, FLA_Obj B)
Definition FLA_Copy.c:15
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_ZERO
Definition FLA_Init.c:20
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
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_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_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
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_Apply_H2_UT(), FLA_Cont_with_1x3_to_1x2(), FLA_Cont_with_3x3_to_2x2(), FLA_Copy(), FLA_Gemv(), FLA_Househ2_UT(), 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_1x2_to_1x3(), FLA_Repart_2x2_to_3x3(), FLA_Set(), FLA_ZERO, and i.

Referenced by FLA_Hess_UT_unb_var1().

◆ FLA_Hess_UT_unb_var1()

FLA_Error FLA_Hess_UT_unb_var1 ( FLA_Obj  A,
FLA_Obj  T 
)
14{
15 return FLA_Hess_UT_step_unb_var1( A, T );
16}
FLA_Error FLA_Hess_UT_step_unb_var1(FLA_Obj A, FLA_Obj T)
Definition FLA_Hess_UT_unb_var1.c:18

References FLA_Hess_UT_step_unb_var1(), and i.

Referenced by FLA_Hess_UT_internal().