/[escript]/trunk-mpi-branch/paso/src/Paso_MPI.c
ViewVC logotype

Diff of /trunk-mpi-branch/paso/src/Paso_MPI.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1248 by gross, Fri Aug 3 02:40:39 2007 UTC revision 1249 by ksteube, Thu Aug 16 00:47:44 2007 UTC
# Line 46  Paso_MPIInfo *Paso_MPIInfo_getReference( Line 46  Paso_MPIInfo *Paso_MPIInfo_getReference(
46        
47    return in;    return in;
48  }  }
49    /* N = #CPUs, k is a CPU number but out of range or even negative. Return a CPU number in 0...n-1. */
50  index_t Paso_MPIInfo_mod(index_t n, index_t k)  index_t Paso_MPIInfo_mod(index_t n, index_t k)
51  {  {
52      index_t q, out=0;      index_t q, out=0;
53      if (n>0) {      if (n>1) {
54          q=k/n;          q=k/n;
55          if (k>0) {          if (k>0) {
56             out=k-n*q;             out=k-n*q;

Legend:
Removed from v.1248  
changed lines
  Added in v.1249

  ViewVC Help
Powered by ViewVC 1.1.26