libflame  revision_anchor
Functions
FLA_Apply_G_rf_opt_var1.c File Reference

(r)

Functions

FLA_Error FLA_Apply_G_rf_opt_var1 (FLA_Obj G, FLA_Obj A)
 
FLA_Error FLA_Apply_G_rf_ops_var1 (int k_G, int m_A, int n_A, scomplex *buff_G, int rs_G, int cs_G, float *buff_A, int rs_A, int cs_A)
 
FLA_Error FLA_Apply_G_rf_opd_var1 (int k_G, int m_A, int n_A, dcomplex *buff_G, int rs_G, int cs_G, double *buff_A, int rs_A, int cs_A)
 
FLA_Error FLA_Apply_G_rf_opc_var1 (int k_G, int m_A, int n_A, scomplex *buff_G, int rs_G, int cs_G, scomplex *buff_A, int rs_A, int cs_A)
 
FLA_Error FLA_Apply_G_rf_opz_var1 (int k_G, int m_A, int n_A, dcomplex *buff_G, int rs_G, int cs_G, dcomplex *buff_A, int rs_A, int cs_A)
 

Function Documentation

◆ FLA_Apply_G_rf_opc_var1()

FLA_Error FLA_Apply_G_rf_opc_var1 ( int  k_G,
int  m_A,
int  n_A,
scomplex buff_G,
int  rs_G,
int  cs_G,
scomplex buff_A,
int  rs_A,
int  cs_A 
)

References bl1_s0(), bl1_s1(), scomplex::imag, and scomplex::real.

Referenced by FLA_Apply_G_lf_opt_var1(), FLA_Apply_G_rf_opc_var2(), FLA_Apply_G_rf_opc_var3(), FLA_Apply_G_rf_opc_var6(), FLA_Apply_G_rf_opc_var9(), and FLA_Apply_G_rf_opt_var1().

220 {
221  float one = bl1_s1();
222  float zero = bl1_s0();
223  int nG_app = n_A - 1;
224  int l, j;
225  float gamma;
226  float sigma;
227  scomplex* a1;
228  scomplex* a2;
229  scomplex* g1;
230  scomplex* g11;
231 
232  g1 = buff_G;
233 
234  for ( l = 0; l < k_G; ++l )
235  {
236  a1 = buff_A;
237  a2 = buff_A + cs_A;
238  g11 = g1;
239 
240  for ( j = 0; j < nG_app; ++j )
241  {
242  gamma = g11->real;
243  sigma = g11->imag;
244 
245  // Skip the current iteration if the rotation is identity.
246  if ( gamma != one || sigma != zero )
247  {
248  MAC_Apply_G_mx2_opc( m_A,
249  &gamma,
250  &sigma,
251  a1, rs_A,
252  a2, rs_A );
253  }
254 
255  a1 += cs_A;
256  a2 += cs_A;
257  g11 += rs_G;
258  }
259 
260  g1 += cs_G;
261  }
262 
263  return FLA_SUCCESS;
264 }
float real
Definition: blis_type_defs.h:134
float bl1_s1(void)
Definition: bl1_constants.c:47
Definition: blis_type_defs.h:132
float bl1_s0(void)
Definition: bl1_constants.c:111
float imag
Definition: blis_type_defs.h:134

◆ FLA_Apply_G_rf_opd_var1()

FLA_Error FLA_Apply_G_rf_opd_var1 ( int  k_G,
int  m_A,
int  n_A,
dcomplex buff_G,
int  rs_G,
int  cs_G,
double *  buff_A,
int  rs_A,
int  cs_A 
)

References bl1_d0(), bl1_d1(), dcomplex::imag, and dcomplex::real.

Referenced by FLA_Apply_G_lf_opt_var1(), FLA_Apply_G_rf_opd_var2(), FLA_Apply_G_rf_opd_var3(), FLA_Apply_G_rf_opd_var6(), FLA_Apply_G_rf_opd_var9(), and FLA_Apply_G_rf_opt_var1().

169 {
170  double one = bl1_d1();
171  double zero = bl1_d0();
172  int nG_app = n_A - 1;
173  int l, j;
174  double gamma;
175  double sigma;
176  double* a1;
177  double* a2;
178  dcomplex* g1;
179  dcomplex* g11;
180 
181  g1 = buff_G;
182 
183  for ( l = 0; l < k_G; ++l )
184  {
185  a1 = buff_A;
186  a2 = buff_A + cs_A;
187  g11 = g1;
188 
189  for ( j = 0; j < nG_app; ++j )
190  {
191  gamma = g11->real;
192  sigma = g11->imag;
193 
194  // Skip the current iteration if the rotation is identity.
195  if ( gamma != one || sigma != zero )
196  {
197  MAC_Apply_G_mx2_opd( m_A,
198  &gamma,
199  &sigma,
200  a1, rs_A,
201  a2, rs_A );
202  }
203 
204  a1 += cs_A;
205  a2 += cs_A;
206  g11 += rs_G;
207  }
208 
209  g1 += cs_G;
210  }
211 
212  return FLA_SUCCESS;
213 }
double imag
Definition: blis_type_defs.h:139
double bl1_d0(void)
Definition: bl1_constants.c:118
double real
Definition: blis_type_defs.h:139
double bl1_d1(void)
Definition: bl1_constants.c:54
Definition: blis_type_defs.h:137

◆ FLA_Apply_G_rf_ops_var1()

FLA_Error FLA_Apply_G_rf_ops_var1 ( int  k_G,
int  m_A,
int  n_A,
scomplex buff_G,
int  rs_G,
int  cs_G,
float *  buff_A,
int  rs_A,
int  cs_A 
)

References bl1_s0(), bl1_s1(), scomplex::imag, and scomplex::real.

Referenced by FLA_Apply_G_lf_opt_var1(), FLA_Apply_G_rf_ops_var2(), FLA_Apply_G_rf_ops_var3(), FLA_Apply_G_rf_ops_var6(), FLA_Apply_G_rf_ops_var9(), and FLA_Apply_G_rf_opt_var1().

118 {
119  float one = bl1_s1();
120  float zero = bl1_s0();
121  int nG_app = n_A - 1;
122  int l, j;
123  float gamma;
124  float sigma;
125  float* a1;
126  float* a2;
127  scomplex* g1;
128  scomplex* g11;
129 
130  g1 = buff_G;
131 
132  for ( l = 0; l < k_G; ++l )
133  {
134  a1 = buff_A;
135  a2 = buff_A + cs_A;
136  g11 = g1;
137 
138  for ( j = 0; j < nG_app; ++j )
139  {
140  gamma = g11->real;
141  sigma = g11->imag;
142 
143  // Skip the current iteration if the rotation is identity.
144  if ( gamma != one || sigma != zero )
145  {
146  MAC_Apply_G_mx2_ops( m_A,
147  &gamma,
148  &sigma,
149  a1, rs_A,
150  a2, rs_A );
151  }
152 
153  a1 += cs_A;
154  a2 += cs_A;
155  g11 += rs_G;
156  }
157 
158  g1 += cs_G;
159  }
160 
161  return FLA_SUCCESS;
162 }
float real
Definition: blis_type_defs.h:134
float bl1_s1(void)
Definition: bl1_constants.c:47
Definition: blis_type_defs.h:132
float bl1_s0(void)
Definition: bl1_constants.c:111
float imag
Definition: blis_type_defs.h:134

◆ FLA_Apply_G_rf_opt_var1()

FLA_Error FLA_Apply_G_rf_opt_var1 ( FLA_Obj  G,
FLA_Obj  A 
)

References FLA_Apply_G_rf_opc_var1(), FLA_Apply_G_rf_opd_var1(), FLA_Apply_G_rf_ops_var1(), FLA_Apply_G_rf_opz_var1(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), and FLA_Obj_width().

Referenced by FLA_Apply_G_internal().

32 {
33  FLA_Datatype datatype;
34  int k_G, m_A, n_A;
35  int rs_G, cs_G;
36  int rs_A, cs_A;
37 
38  datatype = FLA_Obj_datatype( A );
39 
40  k_G = FLA_Obj_width( G );
41  m_A = FLA_Obj_length( A );
42  n_A = FLA_Obj_width( A );
43 
44  rs_G = FLA_Obj_row_stride( G );
45  cs_G = FLA_Obj_col_stride( G );
46 
47  rs_A = FLA_Obj_row_stride( A );
48  cs_A = FLA_Obj_col_stride( A );
49 
50  switch ( datatype )
51  {
52  case FLA_FLOAT:
53  {
54  scomplex* buff_G = ( scomplex* ) FLA_COMPLEX_PTR( G );
55  float* buff_A = ( float* ) FLA_FLOAT_PTR( A );
56 
58  m_A,
59  n_A,
60  buff_G, rs_G, cs_G,
61  buff_A, rs_A, cs_A );
62 
63  break;
64  }
65 
66  case FLA_DOUBLE:
67  {
68  dcomplex* buff_G = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( G );
69  double* buff_A = ( double* ) FLA_DOUBLE_PTR( A );
70 
72  m_A,
73  n_A,
74  buff_G, rs_G, cs_G,
75  buff_A, rs_A, cs_A );
76 
77  break;
78  }
79 
80  case FLA_COMPLEX:
81  {
82  scomplex* buff_G = ( scomplex* ) FLA_COMPLEX_PTR( G );
83  scomplex* buff_A = ( scomplex* ) FLA_COMPLEX_PTR( A );
84 
86  m_A,
87  n_A,
88  buff_G, rs_G, cs_G,
89  buff_A, rs_A, cs_A );
90 
91  break;
92  }
93 
94  case FLA_DOUBLE_COMPLEX:
95  {
96  dcomplex* buff_G = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( G );
97  dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
98 
100  m_A,
101  n_A,
102  buff_G, rs_G, cs_G,
103  buff_A, rs_A, cs_A );
104 
105  break;
106  }
107  }
108 
109  return FLA_SUCCESS;
110 }
FLA_Error FLA_Apply_G_rf_opz_var1(int k_G, int m_A, int n_A, dcomplex *buff_G, int rs_G, int cs_G, dcomplex *buff_A, int rs_A, int cs_A)
Definition: FLA_Apply_G_rf_opt_var1.c:267
dim_t FLA_Obj_row_stride(FLA_Obj obj)
Definition: FLA_Query.c:167
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Error FLA_Apply_G_rf_opd_var1(int k_G, int m_A, int n_A, dcomplex *buff_G, int rs_G, int cs_G, double *buff_A, int rs_A, int cs_A)
Definition: FLA_Apply_G_rf_opt_var1.c:164
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Apply_G_rf_opc_var1(int k_G, int m_A, int n_A, scomplex *buff_G, int rs_G, int cs_G, scomplex *buff_A, int rs_A, int cs_A)
Definition: FLA_Apply_G_rf_opt_var1.c:215
Definition: blis_type_defs.h:132
int FLA_Datatype
Definition: FLA_type_defs.h:49
FLA_Error FLA_Apply_G_rf_ops_var1(int k_G, int m_A, int n_A, scomplex *buff_G, int rs_G, int cs_G, float *buff_A, int rs_A, int cs_A)
Definition: FLA_Apply_G_rf_opt_var1.c:113
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_Apply_G_rf_opz_var1()

FLA_Error FLA_Apply_G_rf_opz_var1 ( int  k_G,
int  m_A,
int  n_A,
dcomplex buff_G,
int  rs_G,
int  cs_G,
dcomplex buff_A,
int  rs_A,
int  cs_A 
)

References bl1_d0(), bl1_d1(), dcomplex::imag, and dcomplex::real.

Referenced by FLA_Apply_G_lf_opt_var1(), FLA_Apply_G_rf_opt_var1(), FLA_Apply_G_rf_opz_var2(), FLA_Apply_G_rf_opz_var3(), FLA_Apply_G_rf_opz_var6(), and FLA_Apply_G_rf_opz_var9().

272 {
273  double one = bl1_d1();
274  double zero = bl1_d0();
275  int nG_app = n_A - 1;
276  int l, j;
277  double gamma;
278  double sigma;
279  dcomplex* a1;
280  dcomplex* a2;
281  dcomplex* g1;
282  dcomplex* g11;
283 
284  g1 = buff_G;
285 
286  for ( l = 0; l < k_G; ++l )
287  {
288  a1 = buff_A;
289  a2 = buff_A + cs_A;
290  g11 = g1;
291 
292  for ( j = 0; j < nG_app; ++j )
293  {
294  gamma = g11->real;
295  sigma = g11->imag;
296 
297  // Skip the current iteration if the rotation is identity.
298  if ( gamma != one || sigma != zero )
299  {
300  MAC_Apply_G_mx2_opz( m_A,
301  &gamma,
302  &sigma,
303  a1, rs_A,
304  a2, rs_A );
305  }
306 
307  a1 += cs_A;
308  a2 += cs_A;
309  g11 += rs_G;
310  }
311 
312  g1 += cs_G;
313  }
314 
315  return FLA_SUCCESS;
316 }
double imag
Definition: blis_type_defs.h:139
double bl1_d0(void)
Definition: bl1_constants.c:118
double real
Definition: blis_type_defs.h:139
double bl1_d1(void)
Definition: bl1_constants.c:54
Definition: blis_type_defs.h:137