21 double * A,
int * IA,
int * JA,
int * DESCA,
22 double * X,
int * IX,
int * JX,
int * DESCX,
int * INCX,
24 double * Y,
int * IY,
int * JY,
int * DESCY,
int * INCY )
26 void pdgemv_( 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 double * ALPHA, * BETA;
38 int * DESCA, * DESCX, * DESCY;
250 char TrA, Yroc, * tbeta, top;
251 int Acol, Ai, Aii, Aimb1, Ainb1, Aj, Ajj, Ald, Amb, Amp, Anb,
252 Anq, Arow, XAfr, Xi, Xj, YAfr, YApbY, YAsum, Ycol, Yi, Yii,
253 Yj, Yjj, Yld, Ynp, Ynq, Yrow, ctxt, info, ione=1, mycol,
254 myrow, nota, npcol, nprow;
261 char * XA = NULL, * YA = NULL;
275 if( !( info = ( ( nprow == -1 ) ? -( 801 +
CTXT_ ) : 0 ) ) )
277 if( ( !nota ) && ( TrA !=
CTRAN ) && ( TrA !=
CCOTRAN ) )
279 PB_Cwarn( ctxt, __LINE__,
"PDGEMV",
"Illegal TRANS=%c\n", TrA );
282 PB_Cchkmat( ctxt,
"PDGEMV",
"A", *M, 2, *N, 3, Ai, Aj, Ad, 8,
286 PB_Cchkvec( ctxt,
"PDGEMV",
"X", *N, 3, Xi, Xj, Xd, *INCX, 12,
288 PB_Cchkvec( ctxt,
"PDGEMV",
"Y", *M, 2, Yi, Yj, Yd, *INCY, 18,
293 PB_Cchkvec( ctxt,
"PDGEMV",
"X", *M, 2, Xi, Xj, Xd, *INCX, 12,
295 PB_Cchkvec( ctxt,
"PDGEMV",
"Y", *N, 3, Yi, Yj, Yd, *INCY, 18,
299 if( info ) {
PB_Cabort( ctxt,
"PDGEMV", info );
return; }
304 if( ( *M == 0 ) || ( *N == 0 ) ||
325 PB_Cinfog2l( Yi, Yj, Yd, nprow, npcol, myrow, mycol, &Yii, &Yjj,
328 if( *INCY == Yd[
M_] )
333 if( ( myrow == Yrow ) || ( Yrow < 0 ) )
345 dset_( &Ynq, ((
char *) BETA),
Mptr( ((
char *) Y), Yii,
346 Yjj, Yld, type->
size ), &Yld );
350 dscal_( &Ynq, ((
char *) BETA),
Mptr( ((
char *) Y), Yii,
351 Yjj, Yld, type->
size ), &Yld );
361 if( ( mycol == Ycol ) || ( Ycol < 0 ) )
372 dset_( &Ynp, ((
char *) BETA),
Mptr( ((
char *) Y), Yii,
373 Yjj, Yd[
LLD_], type->
size ), INCY );
377 dscal_( &Ynp, ((
char *) BETA),
Mptr( ((
char *) Y), Yii,
378 Yjj, Yd[
LLD_], type->
size ), INCY );
388 PB_Cdescribe( *M, *N, Ai, Aj, Ad, nprow, npcol, myrow, mycol, &Aii, &Ajj,
389 &Ald, &Aimb1, &Ainb1, &Amb, &Anb, &Arow, &Acol, Ad0 );
399 Yi, Yj, Yd, &Yroc, &tbeta, &YA, YAd, &YAfr, &YAsum, &YApbY );
403 PB_CInV( type,
NOCONJG,
ROW, *M, *N, Ad0, 1, ((
char *) X), Xi, Xj, Xd,
404 ( *INCX == Xd[
M_] ?
ROW :
COLUMN ), &XA, XAd, &XAfr );
410 if( ( Amp > 0 ) && ( Anq > 0 ) )
412 dgemv_( TRANS, &Amp, &Anq, ((
char *) ALPHA),
Mptr( ((
char *)A),
413 Aii, Ajj, Ald, type->
size ), &Ald, XA, &XAd[
LLD_], tbeta,
416 if( XAfr ) free( XA );
420 if( YAsum && ( Amp > 0 ) )
431 PB_Cpaxpby( type,
NOCONJG, *M, 1, type->
one, YA, 0, 0, YAd,
COLUMN,
432 ((
char *) BETA), ((
char *) Y), Yi, Yj, Yd, &Yroc );
440 PB_CInOutV( type,
ROW, *M, *N, Ad0, 1, ((
char *) BETA), ((
char *) Y), Yi,
441 Yj, Yd, &Yroc, &tbeta, &YA, YAd, &YAfr, &YAsum, &YApbY );
445 PB_CInV( type,
NOCONJG,
COLUMN, *M, *N, Ad0, 1, ((
char *) X), Xi, Xj, Xd,
446 ( *INCX == Xd[
M_] ?
ROW :
COLUMN ), &XA, XAd, &XAfr );
452 if( ( Amp > 0 ) && ( Anq > 0 ) )
454 dgemv_( TRANS, &Amp, &Anq, ((
char *) ALPHA),
Mptr( ((
char *)A),
455 Aii, Ajj, Ald, type->
size ), &Ald, XA, &ione, tbeta,
458 if( XAfr ) free( XA );
462 if( YAsum && ( Anq > 0 ) )
473 PB_Cpaxpby( type,
NOCONJG, 1, *N, type->
one, YA, 0, 0, YAd,
ROW,
474 ((
char *) BETA), ((
char *) Y), Yi, Yj, Yd, &Yroc );
477 if( YAfr ) free( YA );