Changes between Version 8 and Version 9 of MessagePassing


Ignore:
Timestamp:
07/12/13 09:32:17 (13 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MessagePassing

    v8 v9  
    11= Message Passing =
    22
    3 First attempt:
     3== First attempt ==
     4
     5Low-level implementation using malloc, linked lists and so on:
    46
    57{{{
     
    154156}}}
    155157
    156 Second attempt: this would be much better if CIVL-C provided some abstract datatypes for message queues and so on.
    157 What should these datatypes be?
     158== Second attempt ==
     159
     160It would be much better if CIVL-C provided some abstract datatypes for message queues and so on.  What should these datatypes be?  Proposal:
    158161
    159162* `$message`
    160163 * an abstract datatype
    161164* `$message $message_create(int source, int dest, int tag, void *data, int size)`
    162  * creates a new message, allocated memory and copying data from the specified buffer
     165 * creates a new message, allocating memory and copying data from the specified buffer
    163166* `int $message_source($message * message)`
    164167 * returns the message source
     
    174177 * an abstract datatype representing a communicator, or set of message channels between every pair of processes in a set of processes
    175178* `$comm $comm_create(int nprocs, $proc * procs)`
    176  * creates a new comm from the given sequence of processes, by allocating memory and copying the process sequences; the new comm has no messages
     179 * creates a new comm from the given sequence of processes, by allocating memory and copying the process sequence; the new comm has no messages
    177180* `void $comm_destroy($comm * comm)`
    178  * destroys the comm, deallocating whatever was allocated in its constructions
     181 * destroys the comm, deallocating whatever was allocated in its creation
    179182* `int $comm_nprocs($comm * comm)`
    180183 * returns the number of processes associated to the comm
     
    188191 * finds the first matching message and returns pointer to it without modifying comm
    189192* `$message * $comm_dequeue($comm * comm, int source, int dest, int tag)`
    190  * find the first matching message, removes it from comm, and returns pointer to message
     193 * finds the first matching message, removes it from comm, and returns pointer to message
    191194* `int $comm_chan_size($comm * comm, int source, int dest)`
    192195 * returns the number of messages from source to dest stored in comm