libflame revision_anchor
Functions
FLA_LU_piv_blk_var3.c File Reference

(r)

Functions

FLA_Error FLA_LU_piv_blk_var3 (FLA_Obj A, FLA_Obj p, fla_lu_t *cntl)
 

Function Documentation

◆ FLA_LU_piv_blk_var3()

FLA_Error FLA_LU_piv_blk_var3 ( FLA_Obj  A,
FLA_Obj  p,
fla_lu_t cntl 
)
16{
18 FLA_Obj ATL, ATR, A00, A01, A02,
19 ABL, ABR, A10, A11, A12,
20 A20, A21, A22;
21
22 FLA_Obj AL, AR, A0, A1, A2;
23
24 FLA_Obj pT, p0,
25 pB, p1,
26 p2;
27
29
30 dim_t b;
31
32
33 FLA_Part_2x2( A, &ATL, &ATR,
34 &ABL, &ABR, 0, 0, FLA_TL );
35
36 FLA_Part_1x2( A, &AL, &AR, 0, FLA_LEFT );
37
38 FLA_Part_2x1( p, &pT,
39 &pB, 0, FLA_TOP );
40
41 while ( FLA_Obj_length( ATL ) < FLA_Obj_length( A ) &&
43
45
46 FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &A01, &A02,
47 /* ************* */ /* ******************** */
48 &A10, /**/ &A11, &A12,
49 ABL, /**/ ABR, &A20, /**/ &A21, &A22,
50 b, b, FLA_BR );
51
52 FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &A1, &A2,
53 b, FLA_RIGHT );
54
56 /* ** */ /* ** */
57 &p1,
58 pB, &p2, b, FLA_BOTTOM );
59
60 /*------------------------------------------------------------*/
61
62 // Apply previously computed pivots
64 FLA_Cntl_sub_appiv1( cntl ) );
65
66 // A01 = trilu( A00 ) \ A10
69 FLA_ONE, A00, A01,
70 FLA_Cntl_sub_trsm1( cntl ) );
71
72 // A11 = A11 - A10 * A01
75 FLA_Cntl_sub_gemm1( cntl ) );
76
77 // A21 = A21 - A20 * A01
80 FLA_Cntl_sub_gemm2( cntl ) );
81
82 // AB1 = / A11 \
83 // \ A21 /
85 A21, &AB1 );
86
87 // AB1, p1 = LU_piv( AB1 )
89 FLA_Cntl_sub_lu( cntl ) );
90
91 // If the unblocked algorithm returns a null pivot,
92 // update the pivot index and return it.
93 if ( r_val == FLA_SUCCESS && r_val_sub >= 0 )
94 {
96 }
97
98 // AB0 = / A10 \
99 // \ A20 /
101 A20, &AB0 );
102
103 // Apply pivots to previous columns
105 FLA_Cntl_sub_appiv2( cntl ) );
106
107 /*------------------------------------------------------------*/
108
109 FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02,
110 A10, A11, /**/ A12,
111 /* ************** */ /* ****************** */
112 &ABL, /**/ &ABR, A20, A21, /**/ A22,
113 FLA_TL );
114
115 FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, A1, /**/ A2,
116 FLA_LEFT );
117
119 p1,
120 /* ** */ /* ** */
121 &pB, p2, FLA_TOP );
122
123 }
124
125 if ( FLA_Obj_width( ATR ) > 0 )
126 {
127 /* Apply pivots to untouched columns */
129 FLA_Cntl_sub_appiv1( cntl ) );
130
131 /* ATR = trilu( ATL ) \ ATR */
134 FLA_ONE, ATL, ATR );
135 }
136
137 return r_val;
138}
FLA_Error FLA_Apply_pivots_internal(FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A, fla_appiv_t *cntl)
Definition FLA_Apply_pivots_internal.c:13
FLA_Error FLA_Gemm_internal(FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
Definition FLA_Gemm_internal.c:16
FLA_Error FLA_LU_piv_internal(FLA_Obj A, FLA_Obj p, fla_lu_t *cntl)
Definition FLA_LU_piv_internal.c:15
FLA_Error FLA_Trsm_internal(FLA_Side side, FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
Definition FLA_Trsm_internal.c:16
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_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
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_Merge_2x1(FLA_Obj AT, FLA_Obj AB, FLA_Obj *A)
Definition FLA_View.c:541
int FLA_Error
Definition FLA_type_defs.h:47
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_pivots_internal(), FLA_Cont_with_1x3_to_1x2(), FLA_Cont_with_3x1_to_2x1(), FLA_Cont_with_3x3_to_2x2(), FLA_Determine_blocksize(), FLA_Gemm_internal(), FLA_LU_piv_internal(), 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_Trsm_internal(), and i.

Referenced by FLA_LU_piv_internal().