Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
klalumiere committed Feb 5, 2017
1 parent b92e15b commit c38d6de
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,20 @@ std::vector<MyStruct> allGatheredvTwo = mpiWorld().varyingAllGather(vecToSend,
receiveCounts,displacements);
```

Every functions defined for a single [POD](http://en.cppreference.com/w/cpp/concept/PODType) type is also defined for a collection of [POD](http://en.cppreference.com/w/cpp/concept/PODType)s. This collection can either be held in a `std::vector` or in a `std::array`. For instance,

```c++
const int count = 2;
if(mpiWorld().rank() == sourceIndex) {
const std::vector<MyStruct> collection(count,toSend);
mpiWorld().sendAndBlock(collection,destinationIndex);
}
if(mpiWorld().rank() == destinationIndex) {
const std::vector<MyStruct> received =
mpiWorld().receiveAndBlock<std::vector<MyStruct>>(count,sourceIndex);
}
```

# Communicator

## Identical v.s. Congruent communicators
Expand Down

0 comments on commit c38d6de

Please sign in to comment.