1#ifndef __IMPL_ASYNC_MPI_HPP__
2#define __IMPL_ASYNC_MPI_HPP__
4#include <common/common.hpp>
5#include <common/execinfo.hpp>
9#include <mpi_w/message_t.hpp>
10#include <mpi_w/mpi_types.hpp>
20 inline MPI_Status
wait(MPI_Request& request)
23 MPI_Wait(&request, &status);
27 template <POD_t DataType>
42 template <POD_t DataType>
43 int send(MPI_Request& request, DataType data,
size_t dest,
size_t tag)
48 template <POD_t DataType>
50 std::span<const DataType> data,
53 bool send_size)
noexcept
55 int send_status = MPI_SUCCESS;
59 send_status =
send<size_t>(request, data.size(), dest, tag);
62 if (send_status == MPI_SUCCESS)
64 send_status =
_send_unsafe(request, data.data(), data.size(), dest, tag);
70 template <POD_t DataType>
72 std::span<DataType> buf,
76 return MPI_Irecv(buf.data(),
Definition impl_async.hpp:18
int send_v(MPI_Request &request, std::span< const DataType > data, size_t dest, size_t tag, bool send_size) noexcept
Definition impl_async.hpp:49
int recv_span(MPI_Request &request, std::span< DataType > buf, size_t src, size_t tag) noexcept
Definition impl_async.hpp:71
static int _send_unsafe(MPI_Request &request, DataType *buf, size_t buf_size, size_t dest, size_t tag) noexcept
Definition impl_async.hpp:28
MPI_Status wait(MPI_Request &request)
Definition impl_async.hpp:20
int send(MPI_Request &request, DataType data, size_t dest, size_t tag)
Definition impl_async.hpp:43
constexpr MPI_Datatype get_type() noexcept
Definition mpi_types.hpp:11