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 pcsyr2k_( 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;
272 char DirA, OpC, OpR, TopC, TopR, TranOp, UploC, ctop, ctopsave,
274 int Ai, Aj, Bi, Bj, ChooseABC, Ci, Cj, ForceTop, ctxt, info,
275 mycol, myrow, nb, notran, npcol, nprow, upper;
276 double ABCest, ABest, tmp1, tmp2, tmp3, tmp4;
296 if( !( info = ( ( nprow == -1 ) ? -( 901 +
CTXT_ ) : 0 ) ) )
298 if( ( !upper ) && ( UploC !=
CLOWER ) )
300 PB_Cwarn( ctxt, __LINE__,
"PCSYR2K",
"Illegal UPLO = %c\n", UploC );
303 else if( ( !notran ) && ( TranOp !=
CTRAN ) )
305 PB_Cwarn( ctxt, __LINE__,
"PCSYR2K",
"Illegal TRANS = %c\n", TranOp );
310 PB_Cchkmat( ctxt,
"PCSYR2K",
"A", *N, 3, *K, 4, Ai, Aj, Ad, 9,
312 PB_Cchkmat( ctxt,
"PCSYR2K",
"B", *N, 3, *K, 4, Bi, Bj, Bd, 13,
317 PB_Cchkmat( ctxt,
"PCSYR2K",
"A", *K, 4, *N, 3, Ai, Aj, Ad, 9,
319 PB_Cchkmat( ctxt,
"PCSYR2K",
"B", *K, 4, *N, 3, Bi, Bj, Bd, 13,
322 PB_Cchkmat( ctxt,
"PCSYR2K",
"C", *N, 3, *N, 3, Ci, Cj, Cd, 18,
325 if( info ) {
PB_Cabort( ctxt,
"PCSYR2K", info );
return; }
348 ((
char *) C), Ci, Cj, Cd );
353 ((
char *) C), Ci, Cj, Cd );
374 ABCest = (double)(*N) *
375 ( ( ( ( Ad[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO : tmp3 ) +
376 ( ( ( Bd[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO : tmp4 ) +
377 ( ( ( ( Ad[
CSRC_] == -1 ) && ( Bd[
CSRC_] == -1 ) ) ||
381 ABest = (double)(*K) *
382 ( ( ( ( Ad[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO : tmp1 ) +
383 ( ( ( Bd[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO : tmp1 ) +
384 TWO * ( nprow == 1 ?
ZERO : tmp2 ) +
385 MAX( tmp2, tmp3 ) +
MAX( tmp2, tmp4 ) );
391 ABCest = (double)(*N) *
392 ( ( ( ( Ad[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO : tmp3 ) +
393 ( ( ( Bd[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO : tmp4 ) +
394 ( ( ( ( Ad[
RSRC_] == -1 ) && ( Bd[
RSRC_] == -1 ) ) ||
398 ABest = (double)(*K) *
399 ( ( ( ( Ad[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO : tmp2 ) +
400 ( ( ( Bd[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO : tmp2 ) +
401 TWO * ( npcol == 1 ?
ZERO : tmp1 ) +
402 MAX( tmp1, tmp3 ) +
MAX( tmp1, tmp4 ) );
407 ChooseABC = ( ( 1.4 * ABCest ) <= ABest );
414 ForceTop = ( ( *N > nb ) && ( *K > nb ) );
474 *N, *K, ((
char *)ALPHA), ((
char *)A), Ai, Aj, Ad,
475 ((
char *)B), Bi, Bj, Bd, ((
char *)BETA), ((
char *)C), Ci,
534 *K, ((
char *)ALPHA), ((
char *)A), Ai, Aj, Ad, ((
char *)B),
535 Bi, Bj, Bd, ((
char *)BETA), ((
char *)C), Ci, Cj, Cd );
542 rtopsave = *
PB_Ctop( &ctxt, &OpR,
ROW, &rtopsave );