libflame revision_anchor
Functions
FLA_Bidiag_UT_u_blk_var4.c File Reference

(r)

Functions

FLA_Error FLA_Bidiag_UT_u_blk_var4 (FLA_Obj A, FLA_Obj TU, FLA_Obj TV)
 

Function Documentation

◆ FLA_Bidiag_UT_u_blk_var4()

FLA_Error FLA_Bidiag_UT_u_blk_var4 ( FLA_Obj  A,
FLA_Obj  TU,
FLA_Obj  TV 
)
14{
15 FLA_Obj ATL, ATR, A00, A01, A02,
16 ABL, ABR, A10, A11, A12,
17 A20, A21, A22;
18 FLA_Obj UT, U0,
19 UB, U1,
20 U2;
21 FLA_Obj VT, V0,
22 VB, V1,
23 V2;
24 FLA_Obj YT, Y0,
25 YB, Y1,
26 Y2;
27 FLA_Obj ZT, Z0,
28 ZB, Z1,
29 Z2;
32
33 FLA_Obj U, V, Y, Z;
43 VB_bl;
45 dim_t m_A, n_A;
46 dim_t b_alg, b;
47
49
51 m_A = FLA_Obj_length( A );
52 n_A = FLA_Obj_width( A );
53
54 FLA_Obj_create( datatype_A, m_A, b_alg, 0, 0, &U );
55 FLA_Obj_create( datatype_A, n_A, b_alg, 0, 0, &V );
56 FLA_Obj_create( datatype_A, n_A, b_alg, 0, 0, &Y );
57 FLA_Obj_create( datatype_A, m_A, b_alg, 0, 0, &Z );
58
59 FLA_Part_2x2( A, &ATL, &ATR,
60 &ABL, &ABR, 0, 0, FLA_TL );
61 FLA_Part_2x1( U, &UT,
62 &UB, 0, FLA_TOP );
63 FLA_Part_2x1( V, &VT,
64 &VB, 0, FLA_TOP );
65 FLA_Part_2x1( Y, &YT,
66 &YB, 0, FLA_TOP );
67 FLA_Part_2x1( Z, &ZT,
68 &ZB, 0, FLA_TOP );
69 FLA_Part_1x2( TU, &TUL, &TUR, 0, FLA_LEFT );
70 FLA_Part_1x2( TV, &TVL, &TVR, 0, FLA_LEFT );
71
72 while ( FLA_Obj_min_dim( ABR ) > 0 )
73 {
74 b = min( FLA_Obj_min_dim( ABR ), b_alg );
75
76 FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &A01, &A02,
77 /* ************* */ /* ******************** */
78 &A10, /**/ &A11, &A12,
79 ABL, /**/ ABR, &A20, /**/ &A21, &A22,
80 b, b, FLA_BR );
82 /* ** */ /* ** */
83 &U1,
84 UB, &U2, b, FLA_BOTTOM );
86 /* ** */ /* ** */
87 &V1,
88 VB, &V2, b, FLA_BOTTOM );
90 /* ** */ /* ** */
91 &Y1,
92 YB, &Y2, b, FLA_BOTTOM );
94 /* ** */ /* ** */
95 &Z1,
96 ZB, &Z2, b, FLA_BOTTOM );
97 FLA_Repart_1x2_to_1x3( TUL, /**/ TUR, &TU0, /**/ &TU1, &TU2,
98 b, FLA_RIGHT );
99 FLA_Repart_1x2_to_1x3( TVL, /**/ TVR, &TV0, /**/ &TV1, &TV2,
100 b, FLA_RIGHT );
101
102 /*------------------------------------------------------------*/
103
105 &none2, &none3, b, b, FLA_TL );
106
108 &none2, &none3, b, b, FLA_TL );
109
112 &none, b, FLA_TOP );
113
118
120 &U2_l, b, FLA_TOP );
122 &V2_l, b, FLA_TOP );
124 &Y2_l, b, FLA_TOP );
126 &Z2_l, b, FLA_TOP );
127
128 // [ ABR, YB, ZB, TU1, TV1 ] = FLA_Bidiag_UT_u_step_unb_var4( ABR, TU1, TV1, b );
129 //FLA_Bidiag_UT_u_step_unb_var4( ABR, YB, ZB, TU1_tl, TV1_tl );
130 //FLA_Bidiag_UT_u_step_ofu_var4( ABR, YB, ZB, TU1_tl, TV1_tl );
132
133 if ( FLA_Obj_length( A22 ) > 0 )
134 {
135 // Build UB from ABR, with explicit unit subdiagonal and zeros.
136 FLA_Copy( ABR_l, UB_l );
138
139 // Build VB from ABR, with explicit unit subdiagonal and zeros.
142 &VB_bl, 1, FLA_TOP );
145
146 // A22 = A22 - U2 * Y2' - Z2 * V2';
151 }
152
153 /*------------------------------------------------------------*/
154
155 FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02,
156 A10, A11, /**/ A12,
157 /* ************** */ /* ****************** */
158 &ABL, /**/ &ABR, A20, A21, /**/ A22,
159 FLA_TL );
161 U1,
162 /* ** */ /* ** */
163 &UB, U2, FLA_TOP );
165 V1,
166 /* ** */ /* ** */
167 &VB, V2, FLA_TOP );
169 Y1,
170 /* ** */ /* ** */
171 &YB, Y2, FLA_TOP );
173 Z1,
174 /* ** */ /* ** */
175 &ZB, Z2, FLA_TOP );
176 FLA_Cont_with_1x3_to_1x2( &TUL, /**/ &TUR, TU0, TU1, /**/ TU2,
177 FLA_LEFT );
178 FLA_Cont_with_1x3_to_1x2( &TVL, /**/ &TVR, TV0, TV1, /**/ TV2,
179 FLA_LEFT );
180 }
181
182 FLA_Obj_free( &U );
183 FLA_Obj_free( &V );
184 FLA_Obj_free( &Y );
185 FLA_Obj_free( &Z );
186
187 return FLA_SUCCESS;
188}
FLA_Error FLA_Bidiag_UT_u_step_opt_var4(FLA_Obj A, FLA_Obj Y, FLA_Obj Z, FLA_Obj T, FLA_Obj S)
Definition FLA_Bidiag_UT_u_opt_var4.c:35
FLA_Error FLA_Copy(FLA_Obj A, FLA_Obj B)
Definition FLA_Copy.c:15
FLA_Error FLA_Copyt(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Copyt.c:15
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_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_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
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
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
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition FLA_Query.c:153
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_Triangularize(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition FLA_Triangularize.c:13
FLA_Error FLA_Set(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Set.c:13
int i
Definition bl1_axmyv2.c:145
Definition FLA_type_defs.h:159

References FLA_Bidiag_UT_u_step_opt_var4(), FLA_Cont_with_1x3_to_1x2(), FLA_Cont_with_3x1_to_2x1(), FLA_Cont_with_3x3_to_2x2(), FLA_Copy(), FLA_Copyt(), FLA_Gemm_external(), FLA_MINUS_ONE, FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_length(), FLA_Obj_min_dim(), FLA_Obj_width(), FLA_ONE, FLA_Part_1x2(), FLA_Part_2x1(), FLA_Part_2x2(), FLA_Repart_1x2_to_1x3(), FLA_Repart_2x1_to_3x1(), FLA_Repart_2x2_to_3x3(), FLA_Set(), FLA_Triangularize(), FLA_ZERO, and i.

Referenced by FLA_Bidiag_UT_u().