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 pcgemv_( 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;
252 char TrA, Yroc, * tbeta, top;
253 int Acol, Ai, Aii, Aimb1, Ainb1, Aj, Ajj, Ald, Amb, Amp, Anb,
254 Anq, Arow, XAfr, Xi, Xj, YAfr, YApbY, YAsum, Ycol, Yi, Yii,
255 Yj, Yjj, Yld, Ynp, Ynq, Yrow, ctxt, info, ione=1, mycol,
256 myrow, nota, npcol, nprow;
263 char * XA = NULL, * YA = NULL;
277 if( !( info = ( ( nprow == -1 ) ? -( 801 +
CTXT_ ) : 0 ) ) )
279 if( ( !nota ) && ( TrA !=
CTRAN ) && ( TrA !=
CCOTRAN ) )
281 PB_Cwarn( ctxt, __LINE__,
"PCGEMV",
"Illegal TRANS=%c\n", TrA );
284 PB_Cchkmat( ctxt,
"PCGEMV",
"A", *M, 2, *N, 3, Ai, Aj, Ad, 8,
288 PB_Cchkvec( ctxt,
"PCGEMV",
"X", *N, 3, Xi, Xj, Xd, *INCX, 12,
290 PB_Cchkvec( ctxt,
"PCGEMV",
"Y", *M, 2, Yi, Yj, Yd, *INCY, 18,
295 PB_Cchkvec( ctxt,
"PCGEMV",
"X", *M, 2, Xi, Xj, Xd, *INCX, 12,
297 PB_Cchkvec( ctxt,
"PCGEMV",
"Y", *N, 3, Yi, Yj, Yd, *INCY, 18,
301 if( info ) {
PB_Cabort( ctxt,
"PCGEMV", info );
return; }
306 if( ( *M == 0 ) || ( *N == 0 ) ||
328 PB_Cinfog2l( Yi, Yj, Yd, nprow, npcol, myrow, mycol, &Yii, &Yjj,
331 if( *INCY == Yd[
M_] )
336 if( ( myrow == Yrow ) || ( Yrow < 0 ) )
348 cset_( &Ynq, ((
char *) BETA),
Mptr( ((
char *) Y), Yii,
349 Yjj, Yld, type->
size ), &Yld );
353 cscal_( &Ynq, ((
char *) BETA),
Mptr( ((
char *) Y), Yii,
354 Yjj, Yld, type->
size ), &Yld );
364 if( ( mycol == Ycol ) || ( Ycol < 0 ) )
375 cset_( &Ynp, ((
char *) BETA),
Mptr( ((
char *) Y), Yii,
376 Yjj, Yd[
LLD_], type->
size ), INCY );
380 cscal_( &Ynp, ((
char *) BETA),
Mptr( ((
char *) Y), Yii,
381 Yjj, Yd[
LLD_], type->
size ), INCY );
391 PB_Cdescribe( *M, *N, Ai, Aj, Ad, nprow, npcol, myrow, mycol, &Aii, &Ajj,
392 &Ald, &Aimb1, &Ainb1, &Amb, &Anb, &Arow, &Acol, Ad0 );
402 Yi, Yj, Yd, &Yroc, &tbeta, &YA, YAd, &YAfr, &YAsum, &YApbY );
406 PB_CInV( type,
NOCONJG,
ROW, *M, *N, Ad0, 1, ((
char *) X), Xi, Xj, Xd,
407 ( *INCX == Xd[
M_] ?
ROW :
COLUMN ), &XA, XAd, &XAfr );
413 if( ( Amp > 0 ) && ( Anq > 0 ) )
415 cgemv_( TRANS, &Amp, &Anq, ((
char *) ALPHA),
Mptr( ((
char *)A),
416 Aii, Ajj, Ald, type->
size ), &Ald, XA, &XAd[
LLD_], tbeta,
419 if( XAfr ) free( XA );
423 if( YAsum && ( Amp > 0 ) )
434 PB_Cpaxpby( type,
NOCONJG, *M, 1, type->
one, YA, 0, 0, YAd,
COLUMN,
435 ((
char *) BETA), ((
char *) Y), Yi, Yj, Yd, &Yroc );
443 PB_CInOutV( type,
ROW, *M, *N, Ad0, 1, ((
char *) BETA), ((
char *) Y), Yi,
444 Yj, Yd, &Yroc, &tbeta, &YA, YAd, &YAfr, &YAsum, &YApbY );
448 PB_CInV( type,
NOCONJG,
COLUMN, *M, *N, Ad0, 1, ((
char *) X), Xi, Xj, Xd,
449 ( *INCX == Xd[
M_] ?
ROW :
COLUMN ), &XA, XAd, &XAfr );
455 if( ( Amp > 0 ) && ( Anq > 0 ) )
457 cgemv_( TRANS, &Amp, &Anq, ((
char *) ALPHA),
Mptr( ((
char *)A),
458 Aii, Ajj, Ald, type->
size ), &Ald, XA, &ione, tbeta,
461 if( XAfr ) free( XA );
465 if( YAsum && ( Anq > 0 ) )
476 PB_Cpaxpby( type,
NOCONJG, 1, *N, type->
one, YA, 0, 0, YAd,
ROW,
477 ((
char *) BETA), ((
char *) Y), Yi, Yj, Yd, &Yroc );
480 if( YAfr ) free( YA );