libflame revision_anchor
Functions
FLA_LU_piv_unb_var3.c File Reference

(r)

Functions

FLA_Error FLA_LU_piv_unb_var3 (FLA_Obj A, FLA_Obj p)
 

Function Documentation

◆ FLA_LU_piv_unb_var3()

FLA_Error FLA_LU_piv_unb_var3 ( FLA_Obj  A,
FLA_Obj  p 
)
16{
17 FLA_Obj ATL, ATR, A00, a01, A02,
19 A20, a21, A22;
20
21 FLA_Obj AL, AR, A0, a1, A2;
22
23 FLA_Obj pT, p0,
24 pB, pi1,
25 p2;
26
28
29
30 FLA_Part_2x2( A, &ATL, &ATR,
31 &ABL, &ABR, 0, 0, FLA_TL );
32
33 FLA_Part_1x2( A, &AL, &AR, 0, FLA_LEFT );
34
35 FLA_Part_2x1( p, &pT,
36 &pB, 0, FLA_TOP );
37
38 while ( FLA_Obj_length( ATL ) < FLA_Obj_length( A ) &&
40
41 FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &a01, &A02,
42 /* ************* */ /* ************************** */
43 &a10t, /**/ &alpha11, &a12t,
44 ABL, /**/ ABR, &A20, /**/ &a21, &A22,
45 1, 1, FLA_BR );
46
47 FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &a1, &A2,
48 1, FLA_RIGHT );
49
51 /* ** */ /* *** */
52 &pi1,
53 pB, &p2, 1, FLA_BOTTOM );
54
55 /*------------------------------------------------------------*/
56
57 // Apply previously computed pivots
59
60 // a01 = trilu( A00 ) \ a01
62
63 // alpha11 = alpha11 - a10t * a01
65
66 // a21 = a21 - A20 * a01
68
69 // aB1 = / alpha11 \
70 // \ a21 /
72 a21, &aB1 );
73
74 // Determine pivot index
76
77 // Apply pivots to current column
79
80 // a21 = a21 / alpha11
82
83 // AB0 = / a10t \
84 // \ A20 /
86 A20, &AB0 );
87
88 // Apply pivots to previous columns
90
91 /*------------------------------------------------------------*/
92
93 FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, a01, /**/ A02,
94 a10t, alpha11, /**/ a12t,
95 /* ************** */ /* ************************ */
96 &ABL, /**/ &ABR, A20, a21, /**/ A22,
97 FLA_TL );
98
99 FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, a1, /**/ A2,
100 FLA_LEFT );
101
103 pi1,
104 /* ** */ /* *** */
105 &pB, p2, FLA_TOP );
106
107 }
108
109 if ( FLA_Obj_width( ATR ) > 0 )
110 {
111 /* Apply pivots to untouched columns */
113
114 /* ATR = trilu( ATL ) \ ATR */
117 FLA_ONE, ATL, ATR );
118 }
119
120 return FLA_SUCCESS;
121}
FLA_Error FLA_Amax_external(FLA_Obj x, FLA_Obj index)
Definition FLA_Amax_external.c:13
FLA_Error FLA_Inv_scal_external(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Inv_scal_external.c:13
FLA_Error FLA_Dots_external(FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj beta, FLA_Obj rho)
Definition FLA_Dots_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_Error FLA_Trsv_external(FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj A, FLA_Obj x)
Definition FLA_Trsv_external.c:13
FLA_Error FLA_Trsm_external(FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLA_Trsm_external.c:13
FLA_Obj FLA_MINUS_ONE
Definition FLA_Init.c:22
FLA_Obj FLA_ONE
Definition FLA_Init.c:18
FLA_Error FLA_Apply_pivots(FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A)
Definition FLA_Apply_pivots.c:15
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_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
FLA_Error FLA_Merge_2x1(FLA_Obj AT, FLA_Obj AB, FLA_Obj *A)
Definition FLA_View.c:541
int i
Definition bl1_axmyv2.c:145
Definition FLA_type_defs.h:159

References FLA_Amax_external(), FLA_Apply_pivots(), FLA_Cont_with_1x3_to_1x2(), FLA_Cont_with_3x1_to_2x1(), FLA_Cont_with_3x3_to_2x2(), FLA_Dots_external(), FLA_Gemv_external(), FLA_Inv_scal_external(), FLA_Merge_2x1(), FLA_MINUS_ONE, FLA_Obj_length(), 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_Trsm_external(), FLA_Trsv_external(), and i.

Referenced by FLA_LU_piv_internal().