An open API service indexing awesome lists of open source software.

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++

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;
}
```