libflame  revision_anchor
Functions
FLA_Ttmm_u_opt_var2.c File Reference

(r)

Functions

FLA_Error FLA_Ttmm_u_opt_var2 (FLA_Obj A)
 
FLA_Error FLA_Ttmm_u_ops_var2 (int mn_A, float *buff_A, int rs_A, int cs_A)
 
FLA_Error FLA_Ttmm_u_opd_var2 (int mn_A, double *buff_A, int rs_A, int cs_A)
 
FLA_Error FLA_Ttmm_u_opc_var2 (int mn_A, scomplex *buff_A, int rs_A, int cs_A)
 
FLA_Error FLA_Ttmm_u_opz_var2 (int mn_A, dcomplex *buff_A, int rs_A, int cs_A)
 

Function Documentation

◆ FLA_Ttmm_u_opc_var2()

FLA_Error FLA_Ttmm_u_opc_var2 ( int  mn_A,
scomplex buff_A,
int  rs_A,
int  cs_A 
)
188 {
189  scomplex* buff_1 = FLA_COMPLEX_PTR( FLA_ONE );
190  int i;
191 
192  for ( i = 0; i < mn_A; ++i )
193  {
194  scomplex* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
195  scomplex* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
196  scomplex* A02 = buff_A + (i+1)*cs_A + (0 )*rs_A;
197  scomplex* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
198 
199  int mn_ahead = mn_A - i - 1;
200  int mn_behind = i;
201 
202  /*------------------------------------------------------------*/
203 
204  // FLA_Scal_external( alpha11, a01 );
206  mn_behind,
207  alpha11,
208  a01, rs_A );
209 
210  // FLA_Gemvc_external( FLA_NO_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A02, a12t, FLA_ONE, a01 );
213  mn_behind,
214  mn_ahead,
215  buff_1,
216  A02, rs_A, cs_A,
217  a12t, cs_A,
218  buff_1,
219  a01, rs_A );
220 
221  // FLA_Absolute_square( alpha11 );
222  bl1_cabsqr( alpha11 );
223 
224  // FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a21, a21, FLA_ONE, alpha11 );
226  mn_ahead,
227  buff_1,
228  a12t, cs_A,
229  a12t, cs_A,
230  buff_1,
231  alpha11 );
232 
233  /*------------------------------------------------------------*/
234 
235  }
236 
237  return FLA_SUCCESS;
238 }
FLA_Obj FLA_ONE
Definition: FLA_Init.c:18
int i
Definition: bl1_axmyv2.c:145
void bl1_cdots(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *beta, scomplex *rho)
Definition: bl1_dots.c:39
void bl1_cgemv(trans1_t transa, conj1_t conjx, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
Definition: bl1_gemv.c:125
void bl1_cscalv(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx)
Definition: bl1_scalv.c:46
@ BLIS1_NO_TRANSPOSE
Definition: blis_type_defs.h:54
@ 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_cdots(), bl1_cgemv(), bl1_cscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, FLA_ONE, and i.

Referenced by FLA_Ttmm_u_opt_var2().

◆ FLA_Ttmm_u_opd_var2()

FLA_Error FLA_Ttmm_u_opd_var2 ( int  mn_A,
double *  buff_A,
int  rs_A,
int  cs_A 
)
132 {
133  double* buff_1 = FLA_DOUBLE_PTR( FLA_ONE );
134  int i;
135 
136  for ( i = 0; i < mn_A; ++i )
137  {
138  double* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
139  double* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
140  double* A02 = buff_A + (i+1)*cs_A + (0 )*rs_A;
141  double* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
142 
143  int mn_ahead = mn_A - i - 1;
144  int mn_behind = i;
145 
146  /*------------------------------------------------------------*/
147 
148  // FLA_Scal_external( alpha11, a01 );
150  mn_behind,
151  alpha11,
152  a01, rs_A );
153 
154  // FLA_Gemvc_external( FLA_NO_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A02, a12t, FLA_ONE, a01 );
157  mn_behind,
158  mn_ahead,
159  buff_1,
160  A02, rs_A, cs_A,
161  a12t, cs_A,
162  buff_1,
163  a01, rs_A );
164 
165  // FLA_Absolute_square( alpha11 );
166  bl1_dabsqr( alpha11 );
167 
168  // FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a21, a21, FLA_ONE, alpha11 );
170  mn_ahead,
171  buff_1,
172  a12t, cs_A,
173  a12t, cs_A,
174  buff_1,
175  alpha11 );
176 
177  /*------------------------------------------------------------*/
178 
179  }
180 
181  return FLA_SUCCESS;
182 }
void bl1_ddots(conj1_t conj, int n, double *alpha, double *x, int incx, double *y, int incy, double *beta, double *rho)
Definition: bl1_dots.c:26
void bl1_dgemv(trans1_t transa, conj1_t conjx, int m, int n, double *alpha, double *a, int a_rs, int a_cs, double *x, int incx, double *beta, double *y, int incy)
Definition: bl1_gemv.c:69
void bl1_dscalv(conj1_t conj, int n, double *alpha, double *x, int incx)
Definition: bl1_scalv.c:24

References bl1_ddots(), bl1_dgemv(), bl1_dscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, FLA_ONE, and i.

Referenced by FLA_Ttmm_u_opt_var2().

◆ FLA_Ttmm_u_ops_var2()

FLA_Error FLA_Ttmm_u_ops_var2 ( int  mn_A,
float *  buff_A,
int  rs_A,
int  cs_A 
)
76 {
77  float* buff_1 = FLA_FLOAT_PTR( FLA_ONE );
78  int i;
79 
80  for ( i = 0; i < mn_A; ++i )
81  {
82  float* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
83  float* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
84  float* A02 = buff_A + (i+1)*cs_A + (0 )*rs_A;
85  float* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
86 
87  int mn_ahead = mn_A - i - 1;
88  int mn_behind = i;
89 
90  /*------------------------------------------------------------*/
91 
92  // FLA_Scal_external( alpha11, a01 );
94  mn_behind,
95  alpha11,
96  a01, rs_A );
97 
98  // FLA_Gemvc_external( FLA_NO_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A02, a12t, FLA_ONE, a01 );
101  mn_behind,
102  mn_ahead,
103  buff_1,
104  A02, rs_A, cs_A,
105  a12t, cs_A,
106  buff_1,
107  a01, rs_A );
108 
109  // FLA_Absolute_square( alpha11 );
110  bl1_sabsqr( alpha11 );
111 
112  // FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a21, a21, FLA_ONE, alpha11 );
114  mn_ahead,
115  buff_1,
116  a12t, cs_A,
117  a12t, cs_A,
118  buff_1,
119  alpha11 );
120 
121  /*------------------------------------------------------------*/
122 
123  }
124 
125  return FLA_SUCCESS;
126 }
void bl1_sdots(conj1_t conj, int n, float *alpha, float *x, int incx, float *y, int incy, float *beta, float *rho)
Definition: bl1_dots.c:13
void bl1_sgemv(trans1_t transa, conj1_t conjx, int m, int n, float *alpha, float *a, int a_rs, int a_cs, float *x, int incx, float *beta, float *y, int incy)
Definition: bl1_gemv.c:13
void bl1_sscalv(conj1_t conj, int n, float *alpha, float *x, int incx)
Definition: bl1_scalv.c:13

References bl1_sdots(), bl1_sgemv(), bl1_sscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, FLA_ONE, and i.

Referenced by FLA_Ttmm_u_opt_var2().

◆ FLA_Ttmm_u_opt_var2()

FLA_Error FLA_Ttmm_u_opt_var2 ( FLA_Obj  A)
14 {
15  FLA_Datatype datatype;
16  int mn_A;
17  int rs_A, cs_A;
18 
19  datatype = FLA_Obj_datatype( A );
20 
21  mn_A = FLA_Obj_length( A );
22  rs_A = FLA_Obj_row_stride( A );
23  cs_A = FLA_Obj_col_stride( A );
24 
25 
26  switch ( datatype )
27  {
28  case FLA_FLOAT:
29  {
30  float* buff_A = FLA_FLOAT_PTR( A );
31 
32  FLA_Ttmm_u_ops_var2( mn_A,
33  buff_A, rs_A, cs_A );
34 
35  break;
36  }
37 
38  case FLA_DOUBLE:
39  {
40  double* buff_A = FLA_DOUBLE_PTR( A );
41 
42  FLA_Ttmm_u_opd_var2( mn_A,
43  buff_A, rs_A, cs_A );
44 
45  break;
46  }
47 
48  case FLA_COMPLEX:
49  {
50  scomplex* buff_A = FLA_COMPLEX_PTR( A );
51 
52  FLA_Ttmm_u_opc_var2( mn_A,
53  buff_A, rs_A, cs_A );
54 
55  break;
56  }
57 
58  case FLA_DOUBLE_COMPLEX:
59  {
60  dcomplex* buff_A = FLA_DOUBLE_COMPLEX_PTR( A );
61 
62  FLA_Ttmm_u_opz_var2( mn_A,
63  buff_A, rs_A, cs_A );
64 
65  break;
66  }
67  }
68 
69  return FLA_SUCCESS;
70 }
FLA_Error FLA_Ttmm_u_ops_var2(int mn_A, float *buff_A, int rs_A, int cs_A)
Definition: FLA_Ttmm_u_opt_var2.c:74
FLA_Error FLA_Ttmm_u_opc_var2(int mn_A, scomplex *buff_A, int rs_A, int cs_A)
Definition: FLA_Ttmm_u_opt_var2.c:186
FLA_Error FLA_Ttmm_u_opz_var2(int mn_A, dcomplex *buff_A, int rs_A, int cs_A)
Definition: FLA_Ttmm_u_opt_var2.c:242
FLA_Error FLA_Ttmm_u_opd_var2(int mn_A, double *buff_A, int rs_A, int cs_A)
Definition: FLA_Ttmm_u_opt_var2.c:130
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_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Ttmm_u_opc_var2(), FLA_Ttmm_u_opd_var2(), FLA_Ttmm_u_ops_var2(), and FLA_Ttmm_u_opz_var2().

Referenced by FLA_Ttmm_u().

◆ FLA_Ttmm_u_opz_var2()

FLA_Error FLA_Ttmm_u_opz_var2 ( int  mn_A,
dcomplex buff_A,
int  rs_A,
int  cs_A 
)
244 {
245  dcomplex* buff_1 = FLA_DOUBLE_COMPLEX_PTR( FLA_ONE );
246  int i;
247 
248  for ( i = 0; i < mn_A; ++i )
249  {
250  dcomplex* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
251  dcomplex* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
252  dcomplex* A02 = buff_A + (i+1)*cs_A + (0 )*rs_A;
253  dcomplex* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
254 
255  int mn_ahead = mn_A - i - 1;
256  int mn_behind = i;
257 
258  /*------------------------------------------------------------*/
259 
260  // FLA_Scal_external( alpha11, a01 );
262  mn_behind,
263  alpha11,
264  a01, rs_A );
265 
266  // FLA_Gemvc_external( FLA_NO_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A02, a12t, FLA_ONE, a01 );
269  mn_behind,
270  mn_ahead,
271  buff_1,
272  A02, rs_A, cs_A,
273  a12t, cs_A,
274  buff_1,
275  a01, rs_A );
276 
277  // FLA_Absolute_square( alpha11 );
278  bl1_zabsqr( alpha11 );
279 
280  // FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a21, a21, FLA_ONE, alpha11 );
282  mn_ahead,
283  buff_1,
284  a12t, cs_A,
285  a12t, cs_A,
286  buff_1,
287  alpha11 );
288 
289  /*------------------------------------------------------------*/
290 
291  }
292 
293  return FLA_SUCCESS;
294 }
void bl1_zdots(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *beta, dcomplex *rho)
Definition: bl1_dots.c:56
void bl1_zgemv(trans1_t transa, conj1_t conjx, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
Definition: bl1_gemv.c:255
void bl1_zscalv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx)
Definition: bl1_scalv.c:72

References bl1_zdots(), bl1_zgemv(), bl1_zscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, FLA_ONE, and i.

Referenced by FLA_Ttmm_u_opt_var2().