5#ifndef IPPL_MPI_STATUS_H
6#define IPPL_MPI_STATUS_H
24 int source()
const noexcept {
return status_m.MPI_SOURCE; }
26 int tag()
const noexcept {
return status_m.MPI_TAG; }
28 int error()
const noexcept {
return status_m.MPI_ERROR; }
31 std::optional<int> count();
34 operator MPI_Status*()
noexcept {
return &status_m; }
36 operator const MPI_Status*()
const noexcept {
return &status_m; }
44 std::optional<int> Status::count() {
49 int count = MPI_UNDEFINED;
50 MPI_Datatype datatype = get_mpi_datatype<T>(T());
51 MPI_Get_count(&status_m, datatype, &count);
53 if (count == MPI_UNDEFINED) {
54 return std::optional<int>();