138{
141 double gamma12;
142 double sigma12;
143 double gamma23;
144 double sigma23;
145 double* a1;
146 double* a2;
147 double* a3;
151 int nG, nG_app;
152 int n_iter;
154 int k_minus_1;
155 int n_fuse;
156 int is_ident12, is_ident23;
157 int m_app;
158
159
160 k_minus_1 = k_G - 1;
161 nG = n_A - 1;
162 n_fuse = 2;
163
164
165 if ( nG < k_minus_1 || k_G == 1 )
166 {
168 m_A,
169 n_A,
170 buff_G, rs_G, cs_G,
171 buff_A, rs_A, cs_A );
172 return FLA_SUCCESS;
173 }
174
175
176
177
178 for ( j = 0; j < k_minus_1; ++j )
179 {
180 nG_app = j + 1;
181 n_iter = nG_app / n_fuse;
183
184 for (
i = 0, k = 0, g = nG_app - 1;
i < n_iter; ++
i, k += n_fuse, g -= n_fuse )
185 {
186 g12 = buff_G + (g - 1)*rs_G + (k + 1)*cs_G;
187 g23 = buff_G + (g )*rs_G + (k )*cs_G;
188 a1 = buff_A + (g - 1)*cs_A;
189 a2 = buff_A + (g )*cs_A;
190 a3 = buff_A + (g + 1)*cs_A;
191
196
197 is_ident12 = ( gamma12 == one && sigma12 == zero );
198 is_ident23 = ( gamma23 == one && sigma23 == zero );
199
200 m_app = min( i_k + 2 + j - iTL, m_A );
201 m_app = max( m_app, 0 );
202
203 if ( !is_ident12 && is_ident23 )
204 {
205
206
207 MAC_Apply_G_mx2_asd( m_app,
208 &gamma12,
209 &sigma12,
210 a1, 1,
211 a2, 1 );
212 }
213 else if ( is_ident12 && !is_ident23 )
214 {
215
216
217 MAC_Apply_G_mx2_asd( m_app,
218 &gamma23,
219 &sigma23,
220 a2, 1,
221 a3, 1 );
222 }
223 else if ( !is_ident12 && !is_ident23 )
224 {
225
226
227 MAC_Apply_G_mx3b_asd( m_app,
228 &gamma12,
229 &sigma12,
230 &gamma23,
231 &sigma23,
232 a1, 1,
233 a2, 1,
234 a3, 1 );
235 }
236 }
238 {
239 g23 = buff_G + (g )*rs_G + (k )*cs_G;
240 a2 = buff_A + (g )*cs_A;
241 a3 = buff_A + (g + 1)*cs_A;
242
245
246 is_ident23 = ( gamma23 == one && sigma23 == zero );
247
248 m_app = min( i_k + 2 + j - iTL, m_A );
249 m_app = max( m_app, 0 );
250
251 if ( !is_ident23 )
252 MAC_Apply_G_mx2_asd( m_app,
253 &gamma23,
254 &sigma23,
255 a2, 1,
256 a3, 1 );
257 }
258 }
259
260
261
262 for ( j = k_minus_1; j < nG; ++j )
263 {
264 nG_app = k_G;
265 n_iter = nG_app / n_fuse;
267
268 for (
i = 0, k = 0, g = j;
i < n_iter; ++
i, k += n_fuse, g -= n_fuse )
269 {
270 g12 = buff_G + (g - 1)*rs_G + (k + 1)*cs_G;
271 g23 = buff_G + (g )*rs_G + (k )*cs_G;
272 a1 = buff_A + (g - 1)*cs_A;
273 a2 = buff_A + (g )*cs_A;
274 a3 = buff_A + (g + 1)*cs_A;
275
280
281 is_ident12 = ( gamma12 == one && sigma12 == zero );
282 is_ident23 = ( gamma23 == one && sigma23 == zero );
283
284 m_app = min( i_k + 2 + j - iTL, m_A );
285 m_app = max( m_app, 0 );
286
287 if ( !is_ident12 && is_ident23 )
288 {
289
290
291 MAC_Apply_G_mx2_asd( m_app,
292 &gamma12,
293 &sigma12,
294 a1, 1,
295 a2, 1 );
296 }
297 else if ( is_ident12 && !is_ident23 )
298 {
299
300
301 MAC_Apply_G_mx2_asd( m_app,
302 &gamma23,
303 &sigma23,
304 a2, 1,
305 a3, 1 );
306 }
307 else if ( !is_ident12 && !is_ident23 )
308 {
309
310
311 MAC_Apply_G_mx3b_asd( m_app,
312 &gamma12,
313 &sigma12,
314 &gamma23,
315 &sigma23,
316 a1, 1,
317 a2, 1,
318 a3, 1 );
319 }
320 }
322 {
323 g23 = buff_G + (g )*rs_G + (k )*cs_G;
324 a2 = buff_A + (g )*cs_A;
325 a3 = buff_A + (g + 1)*cs_A;
326
329
330 is_ident23 = ( gamma23 == one && sigma23 == zero );
331
332 m_app = min( i_k + 2 + j - iTL, m_A );
333 m_app = max( m_app, 0 );
334
335 if ( !is_ident23 )
336 MAC_Apply_G_mx2_asd( m_app,
337 &gamma23,
338 &sigma23,
339 a2, 1,
340 a3, 1 );
341 }
342 }
343
344
345
346 for ( j = 1; j < k_G; ++j )
347 {
348 nG_app = k_G - j;
349 n_iter = nG_app / n_fuse;
351
352 for (
i = 0, k = j, g = nG - 1;
i < n_iter; ++
i, k += n_fuse, g -= n_fuse )
353 {
354 g12 = buff_G + (g - 1)*rs_G + (k + 1)*cs_G;
355 g23 = buff_G + (g )*rs_G + (k )*cs_G;
356 a1 = buff_A + (g - 1)*cs_A;
357 a2 = buff_A + (g )*cs_A;
358 a3 = buff_A + (g + 1)*cs_A;
359
364
365 is_ident12 = ( gamma12 == one && sigma12 == zero );
366 is_ident23 = ( gamma23 == one && sigma23 == zero );
367
368 m_app = m_A;
369
370 if ( !is_ident12 && is_ident23 )
371 {
372
373
374 MAC_Apply_G_mx2_asd( m_app,
375 &gamma12,
376 &sigma12,
377 a1, 1,
378 a2, 1 );
379 }
380 else if ( is_ident12 && !is_ident23 )
381 {
382
383
384 MAC_Apply_G_mx2_asd( m_app,
385 &gamma23,
386 &sigma23,
387 a2, 1,
388 a3, 1 );
389 }
390 else if ( !is_ident12 && !is_ident23 )
391 {
392
393
394 MAC_Apply_G_mx3b_asd( m_app,
395 &gamma12,
396 &sigma12,
397 &gamma23,
398 &sigma23,
399 a1, 1,
400 a2, 1,
401 a3, 1 );
402 }
403 }
404
406 {
407 g23 = buff_G + (g )*rs_G + (k )*cs_G;
408 a2 = buff_A + (g )*cs_A;
409 a3 = buff_A + (g + 1)*cs_A;
410
413
414 is_ident23 = ( gamma23 == one && sigma23 == zero );
415
416 m_app = m_A;
417
418 if ( !is_ident23 )
419 MAC_Apply_G_mx2_asd( m_app,
420 &gamma23,
421 &sigma23,
422 a2, 1,
423 a3, 1 );
424 }
425 }
426
427 return FLA_SUCCESS;
428}
FLA_Error FLA_Apply_G_rf_asd_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_asm_var1.c:164
int n_left
Definition bl1_axmyv2.c:149
int i
Definition bl1_axmyv2.c:145
double bl1_d0(void)
Definition bl1_constants.c:118
double bl1_d1(void)
Definition bl1_constants.c:54
Definition blis_type_defs.h:138
double real
Definition blis_type_defs.h:139
double imag
Definition blis_type_defs.h:139