20 void psger_(
int * M,
int * N,
float * ALPHA,
21 float * X,
int * IX,
int * JX,
int * DESCX,
int * INCX,
22 float * Y,
int * IY,
int * JY,
int * DESCY,
int * INCY,
23 float * A,
int * IA,
int * JA,
int * DESCA )
25 void psger_( M, N, ALPHA, X, IX, JX, DESCX, INCX, Y, IY, JY, DESCY,
26 INCY, A, IA, JA, DESCA )
30 int * IA, * INCX, * INCY, * IX, * IY, * JA, * JX, * JY,
36 int * DESCA, * DESCX, * DESCY;
219 int Acol, Ai, Aii, Aimb1, Ainb1, Aj, Ajj, Ald, Amb, Amp, Anb,
220 Anq, Arow, XAfr, Xi, Xj, YAfr, Yi, Yj, ctxt, info, ione=1,
221 mycol, myrow, npcol, nprow;
228 char * XA = NULL, * YA = NULL;
241 if( !( info = ( ( nprow == -1 ) ? -( 701 +
CTXT_ ) : 0 ) ) )
243 PB_Cchkvec( ctxt,
"PSGER",
"X", *M, 1, Xi, Xj, Xd, *INCX, 7, &info );
244 PB_Cchkvec( ctxt,
"PSGER",
"Y", *N, 2, Yi, Yj, Yd, *INCY, 12, &info );
245 PB_Cchkmat( ctxt,
"PSGER",
"A", *M, 1, *N, 2, Ai, Aj, Ad, 17, &info );
247 if( info ) {
PB_Cabort( ctxt,
"PSGER", info );
return; }
252 if( ( *M == 0 ) || ( *N == 0 ) || ( ALPHA[
REAL_PART] ==
ZERO ) )
267 PB_Cdescribe( *M, *N, Ai, Aj, Ad, nprow, npcol, myrow, mycol, &Aii, &Ajj,
268 &Ald, &Aimb1, &Ainb1, &Amb, &Anb, &Arow, &Acol, Ad0 );
273 PB_CInV( type,
NOCONJG,
COLUMN, *M, *N, Ad0, 1, ((
char *) X), Xi, Xj, Xd,
274 ( *INCX == Xd[
M_] ?
ROW :
COLUMN ), &XA, XAd, &XAfr );
278 PB_CInV( type,
NOCONJG,
ROW, *M, *N, Ad0, 1, ((
char *) Y), Yi, Yj, Yd,
279 ( *INCY == Yd[
M_] ?
ROW :
COLUMN ), &YA, YAd, &YAfr );
283 Amp =
PB_Cnumroc( *M, 0, Aimb1, Amb, myrow, Arow, nprow );
284 Anq =
PB_Cnumroc( *N, 0, Ainb1, Anb, mycol, Acol, npcol );
286 if( ( Amp > 0 ) && ( Anq > 0 ) )
288 sger_( &Amp, &Anq, ((
char *) ALPHA), XA, &ione, YA, &YAd[
LLD_],
289 ((
char *) (A+(Aii+Ajj*Ald))), &Ald );
291 if( XAfr ) free( XA );
292 if( YAfr ) free( YA );