libflame revision_anchor
Functions
FLA_Chol_u_opt_var3.c File Reference

(r)

Functions

FLA_Error FLA_Chol_u_opt_var3 (FLA_Obj A)
 
FLA_Error FLA_Chol_u_ops_var3 (int mn_A, float *buff_A, int rs_A, int cs_A)
 
FLA_Error FLA_Chol_u_opd_var3 (int mn_A, double *buff_A, int rs_A, int cs_A)
 
FLA_Error FLA_Chol_u_opc_var3 (int mn_A, scomplex *buff_A, int rs_A, int cs_A)
 
FLA_Error FLA_Chol_u_opz_var3 (int mn_A, dcomplex *buff_A, int rs_A, int cs_A)
 

Function Documentation

◆ FLA_Chol_u_opc_var3()

FLA_Error FLA_Chol_u_opc_var3 ( int  mn_A,
scomplex buff_A,
int  rs_A,
int  cs_A 
)
169{
171 int i;
173
174 for ( i = 0; i < mn_A; ++i )
175 {
176 scomplex* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
177 scomplex* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
178 scomplex* A22 = buff_A + (i+1)*cs_A + (i+1)*rs_A;
179
180 int mn_ahead = mn_A - i - 1;
181 int mn_behind = i;
182
183 /*------------------------------------------------------------*/
184
185 // r_val = FLA_Sqrt( alpha11 );
186 // if ( r_val != FLA_SUCCESS )
187 // return ( FLA_Obj_length( A00 ) + 1 );
189 if ( e_val != FLA_SUCCESS ) return mn_behind;
190
191 // FLA_Inv_scal_external( alpha11, a12t );
193 mn_ahead,
194 alpha11,
195 a12t, cs_A );
196
197 // FLA_Herc_external( FLA_UPPER_TRIANGULAR, FLA_MINUS_ONE, a12t, A22 );
200 mn_ahead,
201 buff_m1,
202 a12t, cs_A,
203 A22, rs_A, cs_A );
204
205 /*------------------------------------------------------------*/
206
207 }
208
209 return FLA_SUCCESS;
210}
FLA_Obj FLA_MINUS_ONE
Definition FLA_Init.c:22
int FLA_Error
Definition FLA_type_defs.h:47
int i
Definition bl1_axmyv2.c:145
void bl1_cher(uplo1_t uplo, conj1_t conj, int m, float *alpha, scomplex *x, int incx, scomplex *a, int a_rs, int a_cs)
Definition bl1_her.c:31
void bl1_cinvscalv(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx)
Definition bl1_invscalv.c:52
@ BLIS1_UPPER_TRIANGULAR
Definition blis_type_defs.h:63
@ BLIS1_CONJUGATE
Definition blis_type_defs.h:82
@ BLIS1_NO_CONJUGATE
Definition blis_type_defs.h:81
Definition blis_type_defs.h:133

References bl1_cher(), bl1_cinvscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_UPPER_TRIANGULAR, FLA_MINUS_ONE, and i.

Referenced by FLA_Chol_u_opt_var3().

◆ FLA_Chol_u_opd_var3()

FLA_Error FLA_Chol_u_opd_var3 ( int  mn_A,
double buff_A,
int  rs_A,
int  cs_A 
)
123{
125 int i;
127
128 for ( i = 0; i < mn_A; ++i )
129 {
130 double* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
131 double* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
132 double* A22 = buff_A + (i+1)*cs_A + (i+1)*rs_A;
133
134 int mn_ahead = mn_A - i - 1;
135 int mn_behind = i;
136
137 /*------------------------------------------------------------*/
138
139 // r_val = FLA_Sqrt( alpha11 );
140 // if ( r_val != FLA_SUCCESS )
141 // return ( FLA_Obj_length( A00 ) + 1 );
143 if ( e_val != FLA_SUCCESS ) return mn_behind;
144
145 // FLA_Inv_scal_external( alpha11, a12t );
147 mn_ahead,
148 alpha11,
149 a12t, cs_A );
150
151 // FLA_Herc_external( FLA_UPPER_TRIANGULAR, FLA_MINUS_ONE, a12t, A22 );
153 mn_ahead,
154 buff_m1,
155 a12t, cs_A,
156 A22, rs_A, cs_A );
157
158 /*------------------------------------------------------------*/
159
160 }
161
162 return FLA_SUCCESS;
163}
void bl1_dinvscalv(conj1_t conj, int n, double *alpha, double *x, int incx)
Definition bl1_invscalv.c:26
void bl1_dsyr(uplo1_t uplo, int m, double *alpha, double *x, int incx, double *a, int a_rs, int a_cs)
Definition bl1_syr.c:57

References bl1_dinvscalv(), bl1_dsyr(), BLIS1_NO_CONJUGATE, BLIS1_UPPER_TRIANGULAR, FLA_MINUS_ONE, and i.

Referenced by FLA_Chol_u_opt_var3().

◆ FLA_Chol_u_ops_var3()

FLA_Error FLA_Chol_u_ops_var3 ( int  mn_A,
float buff_A,
int  rs_A,
int  cs_A 
)
77{
79 int i;
81
82 for ( i = 0; i < mn_A; ++i )
83 {
84 float* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
85 float* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
86 float* A22 = buff_A + (i+1)*cs_A + (i+1)*rs_A;
87
88 int mn_ahead = mn_A - i - 1;
89 int mn_behind = i;
90
91 /*------------------------------------------------------------*/
92
93 // r_val = FLA_Sqrt( alpha11 );
94 // if ( r_val != FLA_SUCCESS )
95 // return ( FLA_Obj_length( A00 ) + 1 );
97 if ( e_val != FLA_SUCCESS ) return mn_behind;
98
99 // FLA_Inv_scal_external( alpha11, a12t );
101 mn_ahead,
102 alpha11,
103 a12t, cs_A );
104
105 // FLA_Herc_external( FLA_UPPER_TRIANGULAR, FLA_MINUS_ONE, a12t, A22 );
107 mn_ahead,
108 buff_m1,
109 a12t, cs_A,
110 A22, rs_A, cs_A );
111
112 /*------------------------------------------------------------*/
113
114 }
115
116 return FLA_SUCCESS;
117}
void bl1_sinvscalv(conj1_t conj, int n, float *alpha, float *x, int incx)
Definition bl1_invscalv.c:13
void bl1_ssyr(uplo1_t uplo, int m, float *alpha, float *x, int incx, float *a, int a_rs, int a_cs)
Definition bl1_syr.c:13

References bl1_sinvscalv(), bl1_ssyr(), BLIS1_NO_CONJUGATE, BLIS1_UPPER_TRIANGULAR, FLA_MINUS_ONE, and i.

Referenced by FLA_Chol_u_opt_var3().

◆ FLA_Chol_u_opt_var3()

FLA_Error FLA_Chol_u_opt_var3 ( FLA_Obj  A)
14{
16 FLA_Datatype datatype;
17 int mn_A;
18 int rs_A, cs_A;
19
20 datatype = FLA_Obj_datatype( A );
21
25
26
27 switch ( datatype )
28 {
29 case FLA_FLOAT:
30 {
31 float* buff_A = FLA_FLOAT_PTR( A );
32
34 buff_A, rs_A, cs_A );
35
36 break;
37 }
38
39 case FLA_DOUBLE:
40 {
41 double* buff_A = FLA_DOUBLE_PTR( A );
42
44 buff_A, rs_A, cs_A );
45
46 break;
47 }
48
49 case FLA_COMPLEX:
50 {
52
54 buff_A, rs_A, cs_A );
55
56 break;
57 }
58
60 {
62
64 buff_A, rs_A, cs_A );
65
66 break;
67 }
68 }
69
70 return r_val;
71}
FLA_Error FLA_Chol_u_opc_var3(int mn_A, scomplex *buff_A, int rs_A, int cs_A)
Definition FLA_Chol_u_opt_var3.c:167
FLA_Error FLA_Chol_u_opz_var3(int mn_A, dcomplex *buff_A, int rs_A, int cs_A)
Definition FLA_Chol_u_opt_var3.c:214
FLA_Error FLA_Chol_u_ops_var3(int mn_A, float *buff_A, int rs_A, int cs_A)
Definition FLA_Chol_u_opt_var3.c:75
FLA_Error FLA_Chol_u_opd_var3(int mn_A, double *buff_A, int rs_A, int cs_A)
Definition FLA_Chol_u_opt_var3.c:121
dim_t FLA_Obj_row_stride(FLA_Obj obj)
Definition FLA_Query.c:167
dim_t FLA_Obj_length(FLA_Obj obj)
Definition FLA_Query.c:116
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition FLA_Query.c:174
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition FLA_Query.c:13
int FLA_Datatype
Definition FLA_type_defs.h:49
Definition blis_type_defs.h:138

References FLA_Chol_u_opc_var3(), FLA_Chol_u_opd_var3(), FLA_Chol_u_ops_var3(), FLA_Chol_u_opz_var3(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), and i.

Referenced by FLA_Chol_u().

◆ FLA_Chol_u_opz_var3()

FLA_Error FLA_Chol_u_opz_var3 ( int  mn_A,
dcomplex buff_A,
int  rs_A,
int  cs_A 
)
216{
218 int i;
220
221 for ( i = 0; i < mn_A; ++i )
222 {
223 dcomplex* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
224 dcomplex* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
225 dcomplex* A22 = buff_A + (i+1)*cs_A + (i+1)*rs_A;
226
227 int mn_ahead = mn_A - i - 1;
228 int mn_behind = i;
229
230 /*------------------------------------------------------------*/
231
232 // r_val = FLA_Sqrt( alpha11 );
233 // if ( r_val != FLA_SUCCESS )
234 // return ( FLA_Obj_length( A00 ) + 1 );
236 if ( e_val != FLA_SUCCESS ) return mn_behind;
237
238 // FLA_Inv_scal_external( alpha11, a12t );
240 mn_ahead,
241 alpha11,
242 a12t, cs_A );
243
244 // FLA_Herc_external( FLA_UPPER_TRIANGULAR, FLA_MINUS_ONE, a12t, A22 );
247 mn_ahead,
248 buff_m1,
249 a12t, cs_A,
250 A22, rs_A, cs_A );
251
252 /*------------------------------------------------------------*/
253
254 }
255
256 return FLA_SUCCESS;
257}
void bl1_zher(uplo1_t uplo, conj1_t conj, int m, double *alpha, dcomplex *x, int incx, dcomplex *a, int a_rs, int a_cs)
Definition bl1_her.c:101
void bl1_zinvscalv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx)
Definition bl1_invscalv.c:78

References bl1_zher(), bl1_zinvscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_UPPER_TRIANGULAR, FLA_MINUS_ONE, and i.

Referenced by FLA_Chol_u_opt_var3().