Itoyori  v0.0.1
mpi.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "ityr/common/util.hpp"
7 
8 namespace ityr::common::rma {
9 
10 class mpi {
11 public:
13 
14  win create_win(void* baseptr, std::size_t bytes) {
15  return win(topology::mpicomm(), baseptr, bytes);
16  }
17 
18  void get_nb(const win&,
19  std::byte* origin_addr,
20  std::size_t bytes,
21  const win& target_win,
22  int target_rank,
23  std::size_t target_disp) {
24  mpi_get_nb(origin_addr, bytes, target_rank, target_disp, target_win.win());
25  }
26 
27  void get_nb(std::byte* origin_addr,
28  std::size_t bytes,
29  const win& target_win,
30  int target_rank,
31  std::size_t target_disp) {
32  mpi_get_nb(origin_addr, bytes, target_rank, target_disp, target_win.win());
33  }
34 
35  void put_nb(const win&,
36  const std::byte* origin_addr,
37  std::size_t bytes,
38  const win& target_win,
39  int target_rank,
40  std::size_t target_disp) {
41  mpi_put_nb(origin_addr, bytes, target_rank, target_disp, target_win.win());
42  }
43 
44  void put_nb(const std::byte* origin_addr,
45  std::size_t bytes,
46  const win& target_win,
47  int target_rank,
48  std::size_t target_disp) {
49  mpi_put_nb(origin_addr, bytes, target_rank, target_disp, target_win.win());
50  }
51 
52  void flush(const win& win) {
54  }
55 };
56 
57 }
Definition: mpi_rma.hpp:297
MPI_Win win() const
Definition: mpi_rma.hpp:344
Definition: mpi.hpp:10
mpi_win_manager< void > win
Definition: mpi.hpp:12
void put_nb(const std::byte *origin_addr, std::size_t bytes, const win &target_win, int target_rank, std::size_t target_disp)
Definition: mpi.hpp:44
void flush(const win &win)
Definition: mpi.hpp:52
void get_nb(const win &, std::byte *origin_addr, std::size_t bytes, const win &target_win, int target_rank, std::size_t target_disp)
Definition: mpi.hpp:18
void get_nb(std::byte *origin_addr, std::size_t bytes, const win &target_win, int target_rank, std::size_t target_disp)
Definition: mpi.hpp:27
void put_nb(const win &, const std::byte *origin_addr, std::size_t bytes, const win &target_win, int target_rank, std::size_t target_disp)
Definition: mpi.hpp:35
win create_win(void *baseptr, std::size_t bytes)
Definition: mpi.hpp:14
Definition: mpi.hpp:8
MPI_Comm mpicomm()
Definition: topology.hpp:206
void mpi_win_flush_all(MPI_Win win)
Definition: mpi_rma.hpp:31
void mpi_get_nb(T *origin, std::size_t count, int target_rank, std::size_t target_disp, MPI_Win win)
Definition: mpi_rma.hpp:48
void mpi_put_nb(const T *origin, std::size_t count, int target_rank, std::size_t target_disp, MPI_Win win)
Definition: mpi_rma.hpp:111