22 float * A,
int * IA,
int * JA,
int * DESCA,
23 float * B,
int * IB,
int * JB,
int * DESCB,
25 float * C,
int * IC,
int * JC,
int * DESCC )
27 void pssyr2k_( UPLO, TRANS, N, K, ALPHA, A, IA, JA, DESCA,
28 B, IB, JB, DESCB, BETA, C, IC, JC, DESCC )
33 int * IA, * IB, * IC, * JA, * JB, * JC, * K, * N;
34 float * ALPHA, * BETA;
38 int * DESCA, * DESCB, * DESCC;
277 char DirA, OpC, OpR, TopC, TopR, TranOp, UploC, ctop, ctopsave,
279 int Ai, Aj, Bi, Bj, ChooseABC, Ci, Cj, ForceTop, ctxt, info,
280 mycol, myrow, nb, notran, npcol, nprow, upper;
281 double ABCest, ABest, tmp1, tmp2, tmp3, tmp4;
301 if( !( info = ( ( nprow == -1 ) ? -( 901 +
CTXT_ ) : 0 ) ) )
303 if( ( !upper ) && ( UploC !=
CLOWER ) )
305 PB_Cwarn( ctxt, __LINE__,
"PSSYR2K",
"Illegal UPLO = %c\n", UploC );
308 else if( ( !notran ) && ( TranOp !=
CTRAN ) && ( TranOp !=
CCOTRAN ) )
310 PB_Cwarn( ctxt, __LINE__,
"PSSYR2K",
"Illegal TRANS = %c\n", TranOp );
315 PB_Cchkmat( ctxt,
"PSSYR2K",
"A", *N, 3, *K, 4, Ai, Aj, Ad, 9,
317 PB_Cchkmat( ctxt,
"PSSYR2K",
"B", *N, 3, *K, 4, Bi, Bj, Bd, 13,
322 PB_Cchkmat( ctxt,
"PSSYR2K",
"A", *K, 4, *N, 3, Ai, Aj, Ad, 9,
324 PB_Cchkmat( ctxt,
"PSSYR2K",
"B", *K, 4, *N, 3, Bi, Bj, Bd, 13,
327 PB_Cchkmat( ctxt,
"PSSYR2K",
"C", *N, 3, *N, 3, Ci, Cj, Cd, 18,
330 if( info ) {
PB_Cabort( ctxt,
"PSSYR2K", info );
return; }
351 ((
char *) C), Ci, Cj, Cd );
356 ((
char *) C), Ci, Cj, Cd );
377 ABCest = (double)(*N) *
378 ( ( ( ( Ad[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO : tmp3 ) +
379 ( ( ( Bd[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO : tmp4 ) +
380 ( ( ( ( Ad[
CSRC_] == -1 ) && ( Bd[
CSRC_] == -1 ) ) ||
384 ABest = (double)(*K) *
385 ( ( ( ( Ad[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO : tmp1 ) +
386 ( ( ( Bd[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO : tmp1 ) +
387 TWO * ( nprow == 1 ?
ZERO : tmp2 ) +
388 MAX( tmp2, tmp3 ) +
MAX( tmp2, tmp4 ) );
394 ABCest = (double)(*N) *
395 ( ( ( ( Ad[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO : tmp3 ) +
396 ( ( ( Bd[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO : tmp4 ) +
397 ( ( ( ( Ad[
RSRC_] == -1 ) && ( Bd[
RSRC_] == -1 ) ) ||
401 ABest = (double)(*K) *
402 ( ( ( ( Ad[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO : tmp2 ) +
403 ( ( ( Bd[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO : tmp2 ) +
404 TWO * ( npcol == 1 ?
ZERO : tmp1 ) +
405 MAX( tmp1, tmp3 ) +
MAX( tmp1, tmp4 ) );
410 ChooseABC = ( ( 1.4 * ABCest ) <= ABest );
417 ForceTop = ( ( *N > nb ) && ( *K > nb ) );
477 *N, *K, ((
char *)ALPHA), ((
char *)A), Ai, Aj, Ad,
478 ((
char *)B), Bi, Bj, Bd, ((
char *)BETA), ((
char *)C), Ci,
537 *K, ((
char *)ALPHA), ((
char *)A), Ai, Aj, Ad, ((
char *)B),
538 Bi, Bj, Bd, ((
char *)BETA), ((
char *)C), Ci, Cj, Cd );
545 rtopsave = *
PB_Ctop( &ctxt, &OpR,
ROW, &rtopsave );