Changes between Version 16 and Version 17 of MessagePassing


Ignore:
Timestamp:
09/13/13 08:52:39 (13 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MessagePassing

    v16 v17  
    2121* `$comm`
    2222 * an abstract datatype representing a communicator, or set of message channels between every pair of processes in a set of processes
    23 * `$comm $comm_create(int nprocs, $proc[] procs)`
     23* `$comm $comm_create(int nprocs, $proc procs[])`
    2424 * creates a new comm from the given sequence of processes, by allocating memory and copying the process sequence; the new comm has no messages
    2525* `int $comm_nprocs($comm comm)`
    2626 * returns the number of processes associated to the comm
    27 * `$proc[] $comm_procs($comm comm)`
     27* `$proc $comm_getProc($comm comm, int pid)`
    2828 * returns a pointer to the procs array in comm
    2929* `$comm $comm_enqueue($comm comm, $message message)`
     
    6464typedef $comm *MPI_Comm;
    6565$comm MPI_Comm_world_comm;
    66 MPI_Comm *MPI_COMM_WORLD = &_MPI_COMM_WORLD;
     66MPI_Comm *MPI_COMM_WORLD = &MPI_Comm_world_comm;
    6767boolean initialized = $false;
    6868
     
    9494  $message m = $message_pack(pid, dest, tag, buf, sizeofDatatype(type)*count);
    9595
    96   $comm_enqueue(comm, &m);
     96  *comm = $comm_enqueue(*comm, m);
    9797}
    9898
     
    100100  int size = sizeofDatatype(type)*count;
    101101  // the following is a system function with built-in guard:
    102   $message m = $comm_dequeue(comm, source, pid, tag);
     102  $message m = $comm_dequeue(*comm, source, pid, tag);
    103103
    104   status->size = $message_size(&m);
    105   status->source = $message_source(&m);
    106   status->dest = $message_dest(&m);
    107   $message_unpack(&m, buf, size); // will throw exception if message too big
     104  status->size = $message_size(m);
     105  status->source = $message_source(m);
     106  status->dest = $message_dest(m);
     107  $message_unpack(m, buf, size); // will throw exception if message too big
    108108}
    109109
     
    121121}
    122122}}}
    123