https://github.com/naoki-yoshioka/yampi
Header only library of MPI for C++
https://github.com/naoki-yoshioka/yampi
cpp mpi
Last synced: 4 months ago
JSON representation
Header only library of MPI for C++
- Host: GitHub
- URL: https://github.com/naoki-yoshioka/yampi
- Owner: naoki-yoshioka
- License: mit
- Created: 2016-05-17T10:29:46.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2025-09-25T05:05:16.000Z (9 months ago)
- Last Synced: 2025-09-25T07:06:25.475Z (9 months ago)
- Topics: cpp, mpi
- Language: C++
- Homepage:
- Size: 625 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yampi
**yampi** (Yet Another MPI library) is an open-source thin-wrapper library of MPI (Message Passing Interface) for C++.
## Examples
```cpp
#include
#include
#include
#include
#include
int main(int argc, char* argv[])
{
yampi::environment env{argc, argv};
auto comm = yampi::communicator{yampi::tags::world_communicator};
std::cout << "I am " << comm.rank(env) << " of " << comm.size(env) << std::endl;
// For C++17 or later
// std::cout << "I am " << yampi::world_communicator.rank(env) << " of " << yampi::world_communicator.size(env) << std::endl;
}
```