Changes between Version 8 and Version 9 of MessagePassing
- Timestamp:
- 07/12/13 09:32:17 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MessagePassing
v8 v9 1 1 = Message Passing = 2 2 3 First attempt: 3 == First attempt == 4 5 Low-level implementation using malloc, linked lists and so on: 4 6 5 7 {{{ … … 154 156 }}} 155 157 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 160 It would be much better if CIVL-C provided some abstract datatypes for message queues and so on. What should these datatypes be? Proposal: 158 161 159 162 * `$message` 160 163 * an abstract datatype 161 164 * `$message $message_create(int source, int dest, int tag, void *data, int size)` 162 * creates a new message, allocat edmemory and copying data from the specified buffer165 * creates a new message, allocating memory and copying data from the specified buffer 163 166 * `int $message_source($message * message)` 164 167 * returns the message source … … 174 177 * an abstract datatype representing a communicator, or set of message channels between every pair of processes in a set of processes 175 178 * `$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 sequence s; the new comm has no messages179 * creates a new comm from the given sequence of processes, by allocating memory and copying the process sequence; the new comm has no messages 177 180 * `void $comm_destroy($comm * comm)` 178 * destroys the comm, deallocating whatever was allocated in its c onstructions181 * destroys the comm, deallocating whatever was allocated in its creation 179 182 * `int $comm_nprocs($comm * comm)` 180 183 * returns the number of processes associated to the comm … … 188 191 * finds the first matching message and returns pointer to it without modifying comm 189 192 * `$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 message193 * finds the first matching message, removes it from comm, and returns pointer to message 191 194 * `int $comm_chan_size($comm * comm, int source, int dest)` 192 195 * returns the number of messages from source to dest stored in comm
