libflame revision_anchor
Functions
FLA_UDdate_UT_blk_var1.c File Reference

(r)

Functions

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

Function Documentation

◆ FLA_UDdate_UT_blk_var1()

FLA_Error FLA_UDdate_UT_blk_var1 ( FLA_Obj  R,
FLA_Obj  C,
FLA_Obj  D,
FLA_Obj  T,
fla_uddateut_t cntl 
)
16{
17 FLA_Obj RTL, RTR, R00, R01, R02,
18 RBL, RBR, R10, R11, R12,
19 R20, R21, R22;
20
21 FLA_Obj CL, CR, C0, C1, C2;
22
23 FLA_Obj DL, DR, D0, D1, D2;
24
25 FLA_Obj TL, TR, T0, T1, W12;
26
28
30
31 dim_t b_alg, b;
32
33 // Query the algorithmic blocksize by inspecting the length of T.
35
36 FLA_Part_2x2( R, &RTL, &RTR,
37 &RBL, &RBR, 0, 0, FLA_TL );
38
39 FLA_Part_1x2( C, &CL, &CR, 0, FLA_LEFT );
40
41 FLA_Part_1x2( D, &DL, &DR, 0, FLA_LEFT );
42
43 FLA_Part_1x2( T, &TL, &TR, 0, FLA_LEFT );
44
45 while ( FLA_Obj_min_dim( RBR ) > 0 ){
46
47 b = min( b_alg, FLA_Obj_min_dim( RBR ) );
48
49 FLA_Repart_2x2_to_3x3( RTL, /**/ RTR, &R00, /**/ &R01, &R02,
50 /* ************* */ /* ******************** */
51 &R10, /**/ &R11, &R12,
52 RBL, /**/ RBR, &R20, /**/ &R21, &R22,
53 b, b, FLA_BR );
54
55 FLA_Repart_1x2_to_1x3( CL, /**/ CR, &C0, /**/ &C1, &C2,
56 b, FLA_RIGHT );
57
58 FLA_Repart_1x2_to_1x3( DL, /**/ DR, &D0, /**/ &D1, &D2,
59 b, FLA_RIGHT );
60
61 FLA_Repart_1x2_to_1x3( TL, /**/ TR, &T0, /**/ &T1, &W12,
62 b, FLA_RIGHT );
63
64 /*------------------------------------------------------------*/
65
67 &T1B, b, FLA_TOP );
68
69 /*
70 Perform an up/downdate of the upper triangular factor R11 via
71 up/downdating UT Householder transformations:
72
73 [ R11, ...
74 C1, ...
75 D1, T1T ] = FLA_UDdate_UT( R11, ...
76 C1, ...
77 D1, T1T );
78
79 by updating R11 in such a way that removes the contributions of the rows
80 in D1 while simultaneously adding new contributions to the factorization
81 from the rows of C1. Note that C1 and D1 are also updated in the process.
82 */
83
85 C1,
86 D1, T1T,
87 FLA_Cntl_sub_uddateut( cntl ) );
88
89
90 if ( FLA_Obj_width( R12 ) > 0 )
91 {
93 &W12B, b, FLA_TOP );
94
95 /*
96 Apply Q' to R12, C2, and D2 from the left:
97
98 / R12 \ / R12 \
99 | C2 | = Q' * | C2 |
100 \ D2 / \ D2 /
101
102 where Q is formed from C1 and D1.
103 */
104
106 T1T, W12T,
107 R12,
108 C1, C2,
109 D1, D2, FLA_Cntl_sub_apqudut( cntl ) );
110 }
111
112 /*------------------------------------------------------------*/
113
114 FLA_Cont_with_3x3_to_2x2( &RTL, /**/ &RTR, R00, R01, /**/ R02,
115 R10, R11, /**/ R12,
116 /* ************** */ /* ****************** */
117 &RBL, /**/ &RBR, R20, R21, /**/ R22,
118 FLA_TL );
119
120 FLA_Cont_with_1x3_to_1x2( &CL, /**/ &CR, C0, C1, /**/ C2,
121 FLA_LEFT );
122
123 FLA_Cont_with_1x3_to_1x2( &DL, /**/ &DR, D0, D1, /**/ D2,
124 FLA_LEFT );
125
126 FLA_Cont_with_1x3_to_1x2( &TL, /**/ &TR, T0, T1, /**/ W12,
127 FLA_LEFT );
128 }
129
130 return FLA_SUCCESS;
131}
FLA_Error FLA_Apply_QUD_UT_internal(FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudut_t *cntl)
Definition FLA_Apply_QUD_UT_internal.c:17
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
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
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
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
unsigned long dim_t
Definition FLA_type_defs.h:71
int i
Definition bl1_axmyv2.c:145
Definition FLA_type_defs.h:159

References FLA_Apply_QUD_UT_internal(), FLA_Cont_with_1x3_to_1x2(), FLA_Cont_with_3x3_to_2x2(), FLA_Obj_length(), FLA_Obj_min_dim(), FLA_Obj_width(), FLA_Part_1x2(), FLA_Part_2x1(), FLA_Part_2x2(), FLA_Repart_1x2_to_1x3(), FLA_Repart_2x2_to_3x3(), FLA_UDdate_UT_internal(), and i.

Referenced by FLA_UDdate_UT_internal().