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

Function rmatrixsyrk

src/ablas.cpp:1295–1372  ·  view source on GitHub ↗

Same as CMatrixSYRK, but for real matrices OpType may be only 0 or 1. -- ALGLIB routine -- 16.12.2009 Bochkanov Sergey *************************************************************************/

Source from the content-addressed store, hash-verified

1293 Bochkanov Sergey
1294*************************************************************************/
1295void rmatrixsyrk(int n,
1296 int k,
1297 double alpha,
1298 const ap::real_2d_array& a,
1299 int ia,
1300 int ja,
1301 int optypea,
1302 double beta,
1303 ap::real_2d_array& c,
1304 int ic,
1305 int jc,
1306 bool isupper)
1307{
1308 int s1;
1309 int s2;
1310 int bs;
1311
1312 bs = ablasblocksize(a);
1313 if( n<=bs&&k<=bs )
1314 {
1315 rmatrixsyrk2(n, k, alpha, a, ia, ja, optypea, beta, c, ic, jc, isupper);
1316 return;
1317 }
1318 if( k>=n )
1319 {
1320
1321 //
1322 // Split K
1323 //
1324 ablassplitlength(a, k, s1, s2);
1325 if( optypea==0 )
1326 {
1327 rmatrixsyrk(n, s1, alpha, a, ia, ja, optypea, beta, c, ic, jc, isupper);
1328 rmatrixsyrk(n, s2, alpha, a, ia, ja+s1, optypea, 1.0, c, ic, jc, isupper);
1329 }
1330 else
1331 {
1332 rmatrixsyrk(n, s1, alpha, a, ia, ja, optypea, beta, c, ic, jc, isupper);
1333 rmatrixsyrk(n, s2, alpha, a, ia+s1, ja, optypea, 1.0, c, ic, jc, isupper);
1334 }
1335 }
1336 else
1337 {
1338
1339 //
1340 // Split N
1341 //
1342 ablassplitlength(a, n, s1, s2);
1343 if( optypea==0&&isupper )
1344 {
1345 rmatrixsyrk(s1, k, alpha, a, ia, ja, optypea, beta, c, ic, jc, isupper);
1346 rmatrixgemm(s1, s2, k, alpha, a, ia, ja, 0, a, ia+s1, ja, 1, beta, c, ic, jc+s1);
1347 rmatrixsyrk(s2, k, alpha, a, ia+s1, ja, optypea, beta, c, ic+s1, jc+s1, isupper);
1348 return;
1349 }
1350 if( optypea==0&&!isupper )
1351 {
1352 rmatrixsyrk(s1, k, alpha, a, ia, ja, optypea, beta, c, ic, jc, isupper);

Callers

nothing calls this directly

Calls 4

ablasblocksizeFunction · 0.85
rmatrixsyrk2Function · 0.85
ablassplitlengthFunction · 0.85
rmatrixgemmFunction · 0.85

Tested by

no test coverage detected