libflame  revision_anchor
Functions
FLA_UDdate_UT_blk_var2.c File Reference

(r)

Functions

FLA_Error FLA_UDdate_UT_blk_var2 (FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T, fla_uddateut_t *cntl)
 

Function Documentation

◆ FLA_UDdate_UT_blk_var2()

FLA_Error FLA_UDdate_UT_blk_var2 ( FLA_Obj  R,
FLA_Obj  C,
FLA_Obj  D,
FLA_Obj  T,
fla_uddateut_t cntl 
)

References FLA_Cont_with_3x1_to_2x1(), FLA_Determine_blocksize(), FLA_Obj_length(), FLA_Part_2x1(), FLA_Repart_2x1_to_3x1(), and FLA_UDdate_UT_internal().

Referenced by FLA_UDdate_UT_internal().

16 {
17  FLA_Obj CT, C0,
18  CB, C1,
19  C2;
20 
21  FLA_Obj DT, D0,
22  DB, D1,
23  D2;
24 
25  FLA_Obj TT, T0,
26  TB, T1,
27  T2;
28 
29  dim_t b_C, b_D, b_T;
30 
31  FLA_Part_2x1( C, &CT,
32  &CB, 0, FLA_TOP );
33 
34  FLA_Part_2x1( D, &DT,
35  &DB, 0, FLA_TOP );
36 
37  FLA_Part_2x1( T, &TT,
38  &TB, 0, FLA_TOP );
39 
40  while ( FLA_Obj_length( CT ) < FLA_Obj_length( C ) &&
41  FLA_Obj_length( DT ) < FLA_Obj_length( D ) ){
42 
43  b_C = FLA_Determine_blocksize( CB, FLA_BOTTOM, FLA_Cntl_blocksize( cntl ) );
44  b_D = FLA_Determine_blocksize( DB, FLA_BOTTOM, FLA_Cntl_blocksize( cntl ) );
45  b_T = FLA_Determine_blocksize( TB, FLA_BOTTOM, FLA_Cntl_blocksize( cntl ) );
46 
47  FLA_Repart_2x1_to_3x1( CT, &C0,
48  /* ** */ /* ****** */
49  &C1,
50  CB, &C2, b_C, FLA_BOTTOM );
51 
52  FLA_Repart_2x1_to_3x1( DT, &D0,
53  /* ** */ /* ****** */
54  &D1,
55  DB, &D2, b_D, FLA_BOTTOM );
56 
57  FLA_Repart_2x1_to_3x1( TT, &T0,
58  /* ** */ /* ****** */
59  &T1,
60  TB, &T2, b_T, FLA_BOTTOM );
61 
62  /*------------------------------------------------------------*/
63 
64  /*
65  Perform an up/downdate of the upper triangular Cholesky factor R via
66  "UD" UT Householder transformations:
67 
68  [ R, ...
69  C1, ...
70  D1, T1 ] = FLA_UDdate_UT( R, ...
71  C1, ...
72  D1, T1 );
73 
74  by updating R in such a way that removes the contributions of the rows
75  in D1 while simultaneously adding new contributions to the factorization
76  from the rows of C1. Note that C1 and D1 are also updated in the process.
77  Also note that either C1 or D1 may become empty at any iteration.
78  */
79 
81  C1,
82  D1, T1,
83  FLA_Cntl_sub_uddateut( cntl ) );
84 
85  /*------------------------------------------------------------*/
86 
87  FLA_Cont_with_3x1_to_2x1( &CT, C0,
88  C1,
89  /* ** */ /* ****** */
90  &CB, C2, FLA_TOP );
91 
92  FLA_Cont_with_3x1_to_2x1( &DT, D0,
93  D1,
94  /* ** */ /* ****** */
95  &DB, D2, FLA_TOP );
96 
97  FLA_Cont_with_3x1_to_2x1( &TT, T0,
98  T1,
99  /* ** */ /* ****** */
100  &TB, T2, FLA_TOP );
101  }
102 
103  return FLA_SUCCESS;
104 }
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
unsigned long dim_t
Definition: FLA_type_defs.h:71
dim_t FLA_Determine_blocksize(FLA_Obj A_unproc, FLA_Quadrant to_dir, fla_blocksize_t *cntl_blocksizes)
Definition: FLA_Blocksize.c:234
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_UDdate_UT_internal(FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T, fla_uddateut_t *cntl)
Definition: FLA_UDdate_UT_internal.c:16
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
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116