main () { if (foo) { bar (33); grop (); } return -1; }
main () { if (foo) { bar (33); grop (); } else foo (); return -1; }
main () { var1 = 33; while (grop ()) { foob (); turds (); } exit (); }
static PetscErrorCode gs_gop_vec_tree_plus( gs_id *gs, PetscScalar *vals, PetscInt step) { PetscInt size, *in, *out; PetscScalar *buf, *work; PetscInt op[] = {GL_ADD,0}; PetscBLASInt i1 = 1; PetscFunctionBegin; /* copy over to local variables */ in = gs->tree_map_in; out = gs->tree_map_out; buf = gs->tree_buf; work = gs->tree_work; size = gs->tree_nel*step; /* zero out collection buffer */ rvec_zero(buf,size); /* copy over my contributions */ while (*in >= 0) { PetscBLASInt dstep = PetscBLASIntCast(step); BLAScopy_(&dstep,vals + *in++*step,&i1,buf + *out++*step,&i1); } /* perform fan in/out on full buffer */ /* must change grop to handle the blas */ grop(buf,work,size,op); /* reset */ in = gs->tree_map_in; out = gs->tree_map_out; /* get the portion of the results I need */ while (*in >= 0) { PetscBLASInt dstep = PetscBLASIntCast(step); BLAScopy_(&dstep,buf + *out++*step,&i1,vals + *in++*step,&i1); } PetscFunctionReturn(0); }