libflame revision_anchor
Functions
FLA_LU_piv_blk_var5.c File Reference

(r)

Functions

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

Function Documentation

◆ FLA_LU_piv_blk_var5()

FLA_Error FLA_LU_piv_blk_var5 ( FLA_Obj  A,
FLA_Obj  p,
fla_lu_t cntl 
)
14{
16 FLA_Obj ATL, ATR, A00, A01, A02,
17 ABL, ABR, A10, A11, A12,
18 A20, A21, A22;
19
20 FLA_Obj pT, p0,
21 pB, p1,
22 p2;
23
25
26 dim_t b;
27
28
29 FLA_Part_2x2( A, &ATL, &ATR,
30 &ABL, &ABR, 0, 0, FLA_TL );
31
32 FLA_Part_2x1( p, &pT,
33 &pB, 0, FLA_TOP );
34
35 while ( FLA_Obj_length( ATL ) < FLA_Obj_length( A ) &&
37
39
40 FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &A01, &A02,
41 /* ************* */ /* ******************** */
42 &A10, /**/ &A11, &A12,
43 ABL, /**/ ABR, &A20, /**/ &A21, &A22,
44 b, b, FLA_BR );
45
47 /* ** */ /* ** */
48 &p1,
49 pB, &p2, b, FLA_BOTTOM );
50
51 /*------------------------------------------------------------*/
52
53 // AB1 = / A11 \
54 // \ A21 /
56 A21, &AB1 );
57
58 // AB1, p1 = LU_piv( AB1 )
60 FLA_Cntl_sub_lu( cntl ) );
61
62 // If the unblocked algorithm returns a null pivot,
63 // update the pivot index and return it.
64 if ( r_val == FLA_SUCCESS && r_val_sub >= 0 )
65 {
67 }
68
69 // AB0 = / A10 \
70 // \ A20 /
72 A20, &AB0 );
73
74 // Apply computed pivots to AB0
76 FLA_Cntl_sub_appiv1( cntl ) );
77
78 // AB2 = / A12 \
79 // \ A22 /
81 A22, &AB2 );
82
83 // Apply computed pivots to AB2
85 FLA_Cntl_sub_appiv1( cntl ) );
86
87 // A12 = trilu( A11 ) \ A12
90 FLA_ONE, A11, A12,
91 FLA_Cntl_sub_trsm1( cntl ) );
92
93 // A22 = A22 - A21 * A12
96 FLA_Cntl_sub_gemm1( cntl ) );
97
98 /*------------------------------------------------------------*/
99
100 FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02,
101 A10, A11, /**/ A12,
102 /* ************** */ /* ****************** */
103 &ABL, /**/ &ABR, A20, A21, /**/ A22,
104 FLA_TL );
105
107 p1,
108 /* ** */ /* ** */
109 &pB, p2, FLA_TOP );
110
111 }
112
113 return r_val;
114}
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_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
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
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
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_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_2x1(), FLA_Part_2x2(), FLA_Repart_2x1_to_3x1(), FLA_Repart_2x2_to_3x3(), FLA_Trsm_internal(), and i.

Referenced by FLA_LU_piv_internal().