21 float * A,
int * IA,
int * JA,
int * DESCA,
22 float * X,
int * IX,
int * JX,
int * DESCX,
int * INCX,
24 float * Y,
int * IY,
int * JY,
int * DESCY,
int * INCY )
26 void pcagemv_( TRANS, M, N, ALPHA, A, IA, JA, DESCA, X, IX, JX, DESCX,
27 INCX, BETA, Y, IY, JY, DESCY, INCY )
32 int * IA, * INCX, * INCY, * IX, * IY, * JA, * JX, * JY,
34 float * ALPHA, * BETA;
38 int * DESCA, * DESCX, * DESCY;
261 char TrA, Yroc, * one, * tbeta, top;
262 int Acol, Ai, Aii, Aimb1, Ainb1, Aj, Ajj, Ald, Amb, Amp, Anb,
263 Anq, Arow, XAfr, Xi, Xj, YAfr, YApbY, YAsum, Ycol, Yi, Yii,
264 Yj, Yjj, Yld, Ynp, Ynq, Yrow, ctxt, info, ione=1, mycol,
265 myrow, nota, npcol, nprow;
272 char * XA = NULL, * YA = NULL;
286 if( !( info = ( ( nprow == -1 ) ? -( 801 +
CTXT_ ) : 0 ) ) )
288 if( ( !nota ) && ( TrA !=
CTRAN ) && ( TrA !=
CCOTRAN ) )
290 PB_Cwarn( ctxt, __LINE__,
"PCAGEMV",
"Illegal TRANS=%c\n", TrA );
293 PB_Cchkmat( ctxt,
"PCAGEMV",
"A", *M, 2, *N, 3, Ai, Aj, Ad, 8,
297 PB_Cchkvec( ctxt,
"PCAGEMV",
"X", *N, 3, Xi, Xj, Xd, *INCX, 12,
299 PB_Cchkvec( ctxt,
"PCAGEMV",
"Y", *M, 2, Yi, Yj, Yd, *INCY, 18,
304 PB_Cchkvec( ctxt,
"PCAGEMV",
"X", *M, 2, Xi, Xj, Xd, *INCX, 12,
306 PB_Cchkvec( ctxt,
"PCAGEMV",
"Y", *N, 3, Yi, Yj, Yd, *INCY, 18,
310 if( info ) {
PB_Cabort( ctxt,
"PCAGEMV", info );
return; }
315 if( ( *M == 0 ) || ( *N == 0 ) ||
337 PB_Cinfog2l( Yi, Yj, Yd, nprow, npcol, myrow, mycol, &Yii, &Yjj,
340 if( *INCY == Yd[
M_] )
345 if( ( myrow == Yrow ) || ( Yrow < 0 ) )
355 sascal_( &Ynq, ((
char *) BETA),
Mptr( ((
char *) Y), Yii,
356 Yjj, Yld, utyp->
size ), &Yld );
365 if( ( mycol == Ycol ) || ( Ycol < 0 ) )
374 sascal_( &Ynp, ((
char *) BETA),
Mptr( ((
char *) Y), Yii,
375 Yjj, Yd[
LLD_], utyp->
size ), INCY );
384 PB_Cdescribe( *M, *N, Ai, Aj, Ad, nprow, npcol, myrow, mycol, &Aii, &Ajj,
385 &Ald, &Aimb1, &Ainb1, &Amb, &Anb, &Arow, &Acol, Ad0 );
395 Yi, Yj, Yd, &Yroc, &tbeta, &YA, YAd, &YAfr, &YAsum, &YApbY );
399 PB_CInV( type,
NOCONJG,
ROW, *M, *N, Ad0, 1, ((
char *) X), Xi, Xj, Xd,
400 ( *INCX == Xd[
M_] ?
ROW :
COLUMN ), &XA, XAd, &XAfr );
406 if( ( Amp > 0 ) && ( Anq > 0 ) )
408 cagemv_( TRANS, &Amp, &Anq, ((
char *) ALPHA),
Mptr( ((
char *) A),
409 Aii, Ajj, Ald, type->
size), &Ald, XA, &XAd[
LLD_], tbeta,
412 if( XAfr ) free( XA );
416 if( YAsum && ( Amp > 0 ) )
428 PB_CInOutV( utyp,
ROW, *M, *N, Ad0, 1, ((
char *) BETA), ((
char *) Y), Yi,
429 Yj, Yd, &Yroc, &tbeta, &YA, YAd, &YAfr, &YAsum, &YApbY );
433 PB_CInV( type,
NOCONJG,
COLUMN, *M, *N, Ad0, 1, ((
char *) X), Xi, Xj, Xd,
434 ( *INCX == Xd[
M_] ?
ROW :
COLUMN ), &XA, XAd, &XAfr );
440 if( ( Amp > 0 ) && ( Anq > 0 ) )
442 cagemv_( TRANS, &Amp, &Anq, ((
char *) ALPHA),
Mptr( ((
char *) A),
443 Aii, Ajj, Ald, type->
size ), &Ald, XA, &ione, tbeta, YA,
446 if( XAfr ) free( XA );
450 if( YAsum && ( Anq > 0 ) )
465 PB_Cinfog2l( Yi, Yj, Yd, nprow, npcol, myrow, mycol, &Yii, &Yjj, &Yrow,
468 if( *INCY == Yd[
M_] )
473 if( ( myrow == Yrow ) || ( Yrow < 0 ) )
483 sascal_( &Ynq, ((
char *) BETA),
Mptr( ((
char *) Y), Yii,
484 Yjj, Yld, utyp->
size ), &Yld );
493 if( ( mycol == Ycol ) || ( Ycol < 0 ) )
502 sascal_( &Ynp, ((
char *) BETA),
Mptr( ((
char *) Y), Yii,
503 Yjj, Yd[
LLD_], utyp->
size ), INCY );
512 PB_Cpaxpby( utyp,
NOCONJG, *M, 1, one, YA, 0, 0, YAd,
COLUMN, one,
513 ((
char *) Y), Yi, Yj, Yd, &Yroc );
517 PB_Cpaxpby( utyp,
NOCONJG, 1, *N, one, YA, 0, 0, YAd,
ROW, one,
518 ((
char *) Y), Yi, Yj, Yd, &Yroc );
521 if( YAfr ) free( YA );