MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / cmatrixsyrk2

Function cmatrixsyrk2

src/ablas.cpp:2412–2541  ·  view source on GitHub ↗

Level 2 subroutine *************************************************************************/

Source from the content-addressed store, hash-verified

2410Level 2 subroutine
2411*************************************************************************/
2412static void cmatrixsyrk2(int n,
2413 int k,
2414 double alpha,
2415 const ap::complex_2d_array& a,
2416 int ia,
2417 int ja,
2418 int optypea,
2419 double beta,
2420 ap::complex_2d_array& c,
2421 int ic,
2422 int jc,
2423 bool isupper)
2424{
2425 int i;
2426 int j;
2427 int j1;
2428 int j2;
2429 ap::complex v;
2430
2431
2432 //
2433 // Fast exit (nothing to be done)
2434 //
2435 if( (ap::fp_eq(alpha,0)||k==0)&&ap::fp_eq(beta,1) )
2436 {
2437 return;
2438 }
2439
2440 //
2441 // Try to call fast SYRK
2442 //
2443 if( cmatrixsyrkf(n, k, alpha, a, ia, ja, optypea, beta, c, ic, jc, isupper) )
2444 {
2445 return;
2446 }
2447
2448 //
2449 // SYRK
2450 //
2451 if( optypea==0 )
2452 {
2453
2454 //
2455 // C=alpha*A*A^H+beta*C
2456 //
2457 for(i = 0; i <= n-1; i++)
2458 {
2459 if( isupper )
2460 {
2461 j1 = i;
2462 j2 = n-1;
2463 }
2464 else
2465 {
2466 j1 = 0;
2467 j2 = i;
2468 }
2469 for(j = j1; j <= j2; j++)

Callers 1

cmatrixsyrkFunction · 0.85

Calls 4

cmatrixsyrkfFunction · 0.85
vdotproductFunction · 0.85
vmulFunction · 0.85
vaddFunction · 0.85

Tested by

no test coverage detected