20 void pdzasum_(
int * N,
double * ASUM,
21 double * X,
int * IX,
int * JX,
int * DESCX,
int * INCX )
23 void pdzasum_( N, ASUM, X, IX, JX, DESCX, INCX )
27 int * INCX, * IX, * JX, * N;
177 char * Xptr = NULL, top;
178 int Xcol, Xi, Xii, Xj, Xjj, Xld, Xnp, Xnq, Xrow, ctxt, info,
179 mycol, myrow, npcol, nprow;
195 if( !( info = ( ( nprow == -1 ) ? -( 601 +
CTXT_ ) : 0 ) ) )
196 PB_Cchkvec( ctxt,
"PDZASUM",
"X", *N, 1, Xi, Xj, Xd, *INCX, 6, &info );
197 if( info ) {
PB_Cabort( ctxt,
"PDZASUM", info );
return; }
206 if( *N == 0 )
return;
216 PB_Cinfog2l( Xi, Xj, Xd, nprow, npcol, myrow, mycol, &Xii, &Xjj,
221 if( ( *N == 1 ) && ( *INCX == 1 ) && ( Xd[
M_] == 1 ) )
226 if( ( ( myrow == Xrow ) || ( Xrow < 0 ) ) &&
227 ( ( mycol == Xcol ) || ( Xcol < 0 ) ) )
230 Xptr =
Mptr( ((
char *) X), Xii, Xjj, Xd[
LLD_], type->
size );
236 else if( *INCX == Xd[
M_] )
241 if( ( myrow == Xrow ) || ( Xrow < 0 ) )
251 dzvasum_( &Xnq, ((
char *) ASUM),
Mptr( ((
char *) X), Xii,
252 Xjj, Xld, type->
size ), &Xld );
257 if( ( npcol > 1 ) && ( Xcol >= 0 ) )
264 Cdgsum2d( ctxt,
ROW, &top, 1, 1, ((
char *)ASUM), 1, -1,
275 if( ( mycol == Xcol ) || ( Xcol < 0 ) )
284 dzvasum_( &Xnp, ((
char *) ASUM),
Mptr( ((
char *) X), Xii,
285 Xjj, Xd[
LLD_], type->
size ), INCX );
290 if( ( nprow > 1 ) && ( Xrow >= 0 ) )