20 void psasum_(
int * N,
float * ASUM,
21 float * X,
int * IX,
int * JX,
int * DESCX,
int * INCX )
23 void psasum_( N, ASUM, X, IX, JX, DESCX, INCX )
27 int * INCX, * IX, * JX, * N;
178 int Xcol, Xi, Xii, Xj, Xjj, Xld, Xnp, Xnq, Xrow, ctxt, info,
179 mycol, myrow, npcol, nprow;
194 if( !( info = ( ( nprow == -1 ) ? -( 601 +
CTXT_ ) : 0 ) ) )
195 PB_Cchkvec( ctxt,
"PSASUM",
"X", *N, 1, Xi, Xj, Xd, *INCX, 6, &info );
196 if( info ) {
PB_Cabort( ctxt,
"PSASUM", info );
return; }
205 if( *N == 0 )
return;
215 PB_Cinfog2l( Xi, Xj, Xd, nprow, npcol, myrow, mycol, &Xii, &Xjj,
220 if( ( *N == 1 ) && ( *INCX == 1 ) && ( Xd[
M_] == 1 ) )
225 if( ( ( myrow == Xrow ) || ( Xrow < 0 ) ) &&
226 ( ( mycol == Xcol ) || ( Xcol < 0 ) ) )
228 *ASUM =
ABS( X[Xii+Xjj*Xd[
LLD_]] );
232 else if( *INCX == Xd[
M_] )
237 if( ( myrow == Xrow ) || ( Xrow < 0 ) )
246 svasum_( &Xnq, ((
char *) ASUM), ((
char *)( X+(Xii+Xjj*Xld) )),
252 if( ( npcol > 1 ) && ( Xcol >= 0 ) )
259 Csgsum2d( ctxt,
ROW, &top, 1, 1, ((
char *)ASUM), 1, -1,
270 if( ( mycol == Xcol ) || ( Xcol < 0 ) )
278 svasum_( &Xnp, ((
char *) ASUM),
279 ((
char *)( X+(Xii+Xjj*Xd[
LLD_]) )), INCX );
284 if( ( nprow > 1 ) && ( Xrow >= 0 ) )