libflame  revision_anchor
Functions
FLA_Hess_UT_recover_tau.c File Reference

(r)

Functions

FLA_Error FLA_Hess_UT_recover_tau_submatrix (FLA_Obj T, FLA_Obj t)
 
FLA_Error FLA_Hess_UT_recover_tau (FLA_Obj T, FLA_Obj t)
 

Function Documentation

◆ FLA_Hess_UT_recover_tau()

FLA_Error FLA_Hess_UT_recover_tau ( FLA_Obj  T,
FLA_Obj  t 
)

References FLA_Check_error_level(), FLA_Cont_with_1x3_to_1x2(), FLA_Cont_with_3x1_to_2x1(), FLA_Hess_UT_recover_tau_check(), FLA_Hess_UT_recover_tau_submatrix(), FLA_Obj_length(), FLA_Part_1x2(), FLA_Part_2x1(), FLA_Repart_1x2_to_1x3(), and FLA_Repart_2x1_to_3x1().

16 {
17  FLA_Obj TL, TR, T0, T1, T2;
18 
19  FLA_Obj tT, t0,
20  tB, t1,
21  t2;
22 
23  dim_t b_alg, b;
24 
25  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
27 
28  b_alg = FLA_Obj_length( T );
29 
30  FLA_Part_1x2( T, &TL, &TR, 0, FLA_LEFT );
31 
32  FLA_Part_2x1( t, &tT,
33  &tB, 0, FLA_TOP );
34 
35  while ( FLA_Obj_length( tT ) < FLA_Obj_length( t ) ){
36 
37  b = min( FLA_Obj_length( tB ), b_alg );
38 
39  FLA_Repart_1x2_to_1x3( TL, /**/ TR, &T0, /**/ &T1, &T2,
40  b, FLA_RIGHT );
41 
42  FLA_Repart_2x1_to_3x1( tT, &t0,
43  /* ** */ /* ** */
44  &t1,
45  tB, &t2, b, FLA_BOTTOM );
46 
47  /*------------------------------------------------------------*/
48 
50 
51  /*------------------------------------------------------------*/
52 
53  FLA_Cont_with_1x3_to_1x2( &TL, /**/ &TR, T0, T1, /**/ T2,
54  FLA_LEFT );
55 
56  FLA_Cont_with_3x1_to_2x1( &tT, t0,
57  t1,
58  /* ** */ /* ** */
59  &tB, t2, FLA_TOP );
60  }
61 
62  return FLA_SUCCESS;
63 }
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_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
unsigned long dim_t
Definition: FLA_type_defs.h:71
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_Hess_UT_recover_tau_check(FLA_Obj T, FLA_Obj tau)
Definition: FLA_Hess_UT_recover_tau_check.c:13
FLA_Error FLA_Hess_UT_recover_tau_submatrix(FLA_Obj T, FLA_Obj t)
Definition: FLA_Hess_UT_recover_tau.c:66
Definition: FLA_type_defs.h:158
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_Part_2x1(FLA_Obj A, FLA_Obj *A1, FLA_Obj *A2, dim_t mb, FLA_Side side)
Definition: FLA_View.c:76
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
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
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Hess_UT_recover_tau_submatrix()

FLA_Error FLA_Hess_UT_recover_tau_submatrix ( FLA_Obj  T,
FLA_Obj  t 
)

References FLA_Cont_with_3x1_to_2x1(), FLA_Cont_with_3x3_to_2x2(), FLA_Copy_external(), FLA_Obj_min_dim(), FLA_Part_2x1(), FLA_Part_2x2(), FLA_Repart_2x1_to_3x1(), and FLA_Repart_2x2_to_3x3().

Referenced by FLA_Hess_UT_recover_tau().

67 {
68  FLA_Obj TTL, TTR, T00, t01, T02,
69  TBL, TBR, t10t, tau11, t12t,
70  T20, t21, T22;
71 
72  FLA_Obj tT, t0,
73  tB, tau1,
74  t2;
75 
76 
77  FLA_Part_2x2( T, &TTL, &TTR,
78  &TBL, &TBR, 0, 0, FLA_TL );
79 
80  FLA_Part_2x1( t, &tT,
81  &tB, 0, FLA_TOP );
82 
83  while ( FLA_Obj_min_dim( TBR ) > 0 ){
84 
85  FLA_Repart_2x2_to_3x3( TTL, /**/ TTR, &T00, /**/ &t01, &T02,
86  /* ************* */ /* ************************ */
87  &t10t, /**/ &tau11, &t12t,
88  TBL, /**/ TBR, &T20, /**/ &t21, &T22,
89  1, 1, FLA_BR );
90 
91  FLA_Repart_2x1_to_3x1( tT, &t0,
92  /* ** */ /* ** */
93  &tau1,
94  tB, &t2, 1, FLA_BOTTOM );
95 
96  /*------------------------------------------------------------*/
97 
98  // tau1 = tau11;
99  FLA_Copy_external( tau11, tau1 );
100 
101  /*------------------------------------------------------------*/
102 
103  FLA_Cont_with_3x3_to_2x2( &TTL, /**/ &TTR, T00, t01, /**/ T02,
104  t10t, tau11, /**/ t12t,
105  /* ************** */ /* ********************** */
106  &TBL, /**/ &TBR, T20, t21, /**/ T22,
107  FLA_TL );
108 
109  FLA_Cont_with_3x1_to_2x1( &tT, t0,
110  tau1,
111  /* ** */ /* ** */
112  &tB, t2, FLA_TOP );
113 
114  }
115 
116  return FLA_SUCCESS;
117 }
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_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_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_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_Copy_external(FLA_Obj A, FLA_Obj B)
Definition: FLA_Copy_external.c:13
Definition: FLA_type_defs.h:158
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
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
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153