libflame  revision_anchor
Functions
FLA_QR_UT_unb_var2.c File Reference

(r)

Functions

FLA_Error FLA_QR_UT_unb_var2 (FLA_Obj A, FLA_Obj T)
 

Function Documentation

◆ FLA_QR_UT_unb_var2()

FLA_Error FLA_QR_UT_unb_var2 ( FLA_Obj  A,
FLA_Obj  T 
)
14 {
15  FLA_Obj ATL, ATR, A00, a01, A02,
16  ABL, ABR, a10t, alpha11, a12t,
17  A20, a21, A22;
18 
19  FLA_Obj TTL, TTR, T00, t01, T02,
20  TBL, TBR, t10t, tau11, t12t,
21  T20, t21, T22;
22 
23 
24  FLA_Part_2x2( A, &ATL, &ATR,
25  &ABL, &ABR, 0, 0, FLA_TL );
26 
27  FLA_Part_2x2( T, &TTL, &TTR,
28  &TBL, &TBR, 0, 0, FLA_TL );
29 
30  while ( FLA_Obj_min_dim( ABR ) > 0 ){
31 
32  FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &a01, &A02,
33  /* ************* */ /* ************************** */
34  &a10t, /**/ &alpha11, &a12t,
35  ABL, /**/ ABR, &A20, /**/ &a21, &A22,
36  1, 1, FLA_BR );
37 
38  FLA_Repart_2x2_to_3x3( TTL, /**/ TTR, &T00, /**/ &t01, &T02,
39  /* ************* */ /* ************************ */
40  &t10t, /**/ &tau11, &t12t,
41  TBL, /**/ TBR, &T20, /**/ &t21, &T22,
42  1, 1, FLA_BR );
43 
44  /*------------------------------------------------------------*/
45 
46  // Compute tau11 and u21 from alpha11 and a21 such that tau11 and u21
47  // determine a Householder transform H such that applying H from the
48  // left to the column vector consisting of alpha11 and a21 annihilates
49  // the entries in a21 (and updates alpha11).
50  FLA_Househ2_UT( FLA_LEFT,
51  alpha11,
52  a21, tau11 );
53 
54  // / a12t \ = H / a12t \
55  // \ A22 / \ A22 /
56  //
57  // where H is formed from tau11 and u21.
58  FLA_Apply_H2_UT( FLA_LEFT, tau11, a21, a12t,
59  A22 );
60 
61  // t01 = a10t' + A20' * u21;
62  FLA_Copyt_external( FLA_CONJ_TRANSPOSE, a10t, t01 );
63  FLA_Gemv_external( FLA_CONJ_TRANSPOSE, FLA_ONE, A20, a21, FLA_ONE, t01 );
64 
65  /*------------------------------------------------------------*/
66 
67  FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, a01, /**/ A02,
68  a10t, alpha11, /**/ a12t,
69  /* ************** */ /* ************************ */
70  &ABL, /**/ &ABR, A20, a21, /**/ A22,
71  FLA_TL );
72 
73  FLA_Cont_with_3x3_to_2x2( &TTL, /**/ &TTR, T00, t01, /**/ T02,
74  t10t, tau11, /**/ t12t,
75  /* ************** */ /* ********************** */
76  &TBL, /**/ &TBR, T20, t21, /**/ T22,
77  FLA_TL );
78 
79  }
80 
81  return FLA_SUCCESS;
82 }
FLA_Error FLA_Copyt_external(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Copyt_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_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_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
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153
FLA_Error FLA_Househ2_UT(FLA_Side side, FLA_Obj chi_1, FLA_Obj x2, FLA_Obj tau)
Definition: FLA_Househ2_UT.c:16
Definition: FLA_type_defs.h:159

References FLA_Apply_H2_UT(), FLA_Cont_with_3x3_to_2x2(), FLA_Copyt_external(), FLA_Gemv_external(), FLA_Househ2_UT(), FLA_Obj_min_dim(), FLA_ONE, FLA_Part_2x2(), and FLA_Repart_2x2_to_3x3().

Referenced by FLA_QR_UT_internal().