source:
CIVL/examples/messagePassing/mp_proc.cvh@
f2ab81f
| Last change on this file since f2ab81f was 2fa36af, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 405 bytes | |
| Line | |
|---|---|
| 1 | void send(void *buf, int count, int dest, int tag) { |
| 2 | $atomic{ |
| 3 | $message out = $message_pack(rank, dest, tag, buf, count*sizeof(double)); |
| 4 | $comm_enqueue(&MPI_COMM_WORLD, out);} |
| 5 | } |
| 6 | |
| 7 | void recv(void *buf, int count, int source, int tag) { |
| 8 | $atomic{ |
| 9 | $message in = $comm_dequeue(&MPI_COMM_WORLD, source, rank, tag); |
| 10 | $message_unpack(in, buf, count*sizeof(double));} |
| 11 | } |
| 12 | |
| 13 | $when (__start); |
Note:
See TracBrowser
for help on using the repository browser.
