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 pcher2k_( 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;
278 char DirA, OpC, OpR, TopC, TopR, TranOp, UploC, ctop, ctopsave,
280 int Ai, Aj, Bi, Bj, ChooseABC, Ci, Cj, ForceTop, ctxt, info,
281 mycol, myrow, nb, notran, npcol, nprow, upper;
282 double ABCest, ABest, tmp1, tmp2, tmp3, tmp4;
302 if( !( info = ( ( nprow == -1 ) ? -( 901 +
CTXT_ ) : 0 ) ) )
304 if( ( !upper ) && ( UploC !=
CLOWER ) )
306 PB_Cwarn( ctxt, __LINE__,
"PCHER2K",
"Illegal UPLO = %c\n", UploC );
309 else if( ( !notran ) && ( TranOp !=
CCOTRAN ) )
311 PB_Cwarn( ctxt, __LINE__,
"PCHER2K",
"Illegal TRANS = %c\n", TranOp );
316 PB_Cchkmat( ctxt,
"PCHER2K",
"A", *N, 3, *K, 4, Ai, Aj, Ad, 9,
318 PB_Cchkmat( ctxt,
"PCHER2K",
"B", *N, 3, *K, 4, Bi, Bj, Bd, 13,
323 PB_Cchkmat( ctxt,
"PCHER2K",
"A", *K, 4, *N, 3, Ai, Aj, Ad, 9,
325 PB_Cchkmat( ctxt,
"PCHER2K",
"B", *K, 4, *N, 3, Bi, Bj, Bd, 13,
328 PB_Cchkmat( ctxt,
"PCHER2K",
"C", *N, 3, *N, 3, Ci, Cj, Cd, 18,
331 if( info ) {
PB_Cabort( ctxt,
"PCHER2K", info );
return; }
354 ((
char *) C), Ci, Cj, Cd );
359 ((
char *) C), Ci, Cj, Cd );
380 ABCest = (double)(*N) *
381 ( ( ( ( Ad[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO : tmp3 ) +
382 ( ( ( Bd[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO : tmp4 ) +
383 ( ( ( ( Ad[
CSRC_] == -1 ) && ( Bd[
CSRC_] == -1 ) ) ||
387 ABest = (double)(*K) *
388 ( ( ( ( Ad[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO : tmp1 ) +
389 ( ( ( Bd[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO : tmp1 ) +
390 TWO * ( nprow == 1 ?
ZERO : tmp2 ) +
391 MAX( tmp2, tmp3 ) +
MAX( tmp2, tmp4 ) );
397 ABCest = (double)(*N) *
398 ( ( ( ( Ad[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO : tmp3 ) +
399 ( ( ( Bd[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO : tmp4 ) +
400 ( ( ( ( Ad[
RSRC_] == -1 ) && ( Bd[
RSRC_] == -1 ) ) ||
404 ABest = (double)(*K) *
405 ( ( ( ( Ad[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO : tmp2 ) +
406 ( ( ( Bd[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO : tmp2 ) +
407 TWO * ( npcol == 1 ?
ZERO : tmp1 ) +
408 MAX( tmp1, tmp3 ) +
MAX( tmp1, tmp4 ) );
413 ChooseABC = ( ( 1.4 * ABCest ) <= ABest );
420 ForceTop = ( ( *N > nb ) && ( *K > nb ) );
480 *N, *K, ((
char *)ALPHA), ((
char *)A), Ai, Aj, Ad,
481 ((
char *)B), Bi, Bj, Bd, ((
char *)BETA), ((
char *)C), Ci,
540 *N, *K, ((
char *)ALPHA), ((
char *)A), Ai, Aj, Ad,
541 ((
char *)B), Bi, Bj, Bd, ((
char *)BETA), ((
char *)C), Ci, Cj,
549 rtopsave = *
PB_Ctop( &ctxt, &OpR,
ROW, &rtopsave );