22 double * A,
int * IA,
int * JA,
int * DESCA,
23 double * B,
int * IB,
int * JB,
int * DESCB,
25 double * C,
int * IC,
int * JC,
int * DESCC )
27 void pzhemm_( SIDE, UPLO, M, N, ALPHA, A, IA, JA, DESCA,
28 B, IB, JB, DESCB, BETA, C, IC, JC, DESCC )
33 int * IA, * IB, * IC, * JA, * JB, * JC, * M, * N;
34 double * ALPHA, * BETA;
38 int * DESCA, * DESCB, * DESCC;
265 char DirAB, SideOp, UploA, cbtop, cbtopsave, cctop, cctopsave,
266 rbtop, rbtopsave, rctop, rctopsave;
267 int Ai, Aj, Bi, Bj, ChooseABC, Ci, Cj, ForceTop, ctxt, info,
268 lside, mycol, myrow, nb, npcol, nprow, upper;
269 double ABCest, BCest, tmp1, tmp2, tmp3, tmp4;
289 if( !( info = ( ( nprow == -1 ) ? -( 901 +
CTXT_ ) : 0 ) ) )
291 if( ( !lside ) && ( SideOp !=
CRIGHT ) )
293 PB_Cwarn( ctxt, __LINE__,
"PZHEMM",
"Illegal SIDE = %c\n", SideOp );
296 else if( ( !upper ) && ( UploA !=
CLOWER ) )
298 PB_Cwarn( ctxt, __LINE__,
"PZHEMM",
"Illegal UPLO = %c\n", UploA );
303 PB_Cchkmat( ctxt,
"PZHEMM",
"A", *M, 3, *M, 3, Ai, Aj, Ad, 9,
305 PB_Cchkmat( ctxt,
"PZHEMM",
"B", *M, 3, *N, 4, Bi, Bj, Bd, 13,
310 PB_Cchkmat( ctxt,
"PZHEMM",
"A", *N, 4, *N, 4, Ai, Aj, Ad, 9,
312 PB_Cchkmat( ctxt,
"PZHEMM",
"B", *M, 3, *N, 4, Bi, Bj, Bd, 13,
315 PB_Cchkmat( ctxt,
"PZHEMM",
"C", *M, 3, *N, 4, Ci, Cj, Cd, 18,
318 if( info ) {
PB_Cabort( ctxt,
"PZHEMM", info );
return; }
323 if( ( *M == 0 ) || ( *N == 0 ) ||
339 ((
char *) C), Ci, Cj, Cd );
364 ABCest = (double)(*M) *
365 ( ( ( ( Ad[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO : tmp1 /
TWO ) +
366 ( ( ( Bd[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO :
370 BCest = (double)(*N) *
372 ( nprow == 1 ?
ZERO : tmp2 ) +
MAX( tmp2, tmp3 ) +
373 ( ( ( Bd[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO : tmp1 ) +
379 ABCest = (double)(*N) *
380 ( ( ( ( Ad[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO : tmp1 /
TWO ) +
381 ( ( ( Bd[
CSRC_] == -1 ) || ( npcol == 1 ) ) ?
ZERO :
385 BCest = (double)(*M) *
386 ( ( npcol == 1 ?
ZERO : tmp1 ) +
MAX( tmp1, tmp3 ) +
388 ( ( ( Bd[
RSRC_] == -1 ) || ( nprow == 1 ) ) ?
ZERO : tmp2 ) +
394 ChooseABC = ( ( 1.5 * ABCest ) <= BCest );
401 ForceTop = ( ( *M > nb ) && ( *N > nb ) );
412 rbtopsave = rbtop; rctopsave = rctop;
413 cbtopsave = cbtop; cctopsave = cctop;
425 ( cbtop !=
CTOP_SRING ) ) || ( cbtop != cctop ) )
447 ( rbtop !=
CTOP_SRING ) ) || ( rbtop != rctop ) )
466 ((
char *)ALPHA), ((
char *)A), Ai, Aj, Ad, ((
char *)B), Bi,
467 Bj, Bd, ((
char *)BETA), ((
char *)C), Ci, Cj, Cd );
473 rbtopsave = rbtop; rctopsave = rctop;
474 cbtopsave = cbtop; cctopsave = cctop;
483 ( rbtop !=
CTOP_SRING ) ) || ( rbtop != rctop ) )
504 ( cbtop !=
CTOP_SRING ) ) || ( cbtop != cctop ) )
527 ((
char *)ALPHA), ((
char *)A), Ai, Aj, Ad, ((
char *)B), Bi,
528 Bj, Bd, ((
char *)BETA), ((
char *)C), Ci, Cj, Cd );