8namespace py = pybind11;
15 if (py_buffer_contains_T<real>(info))
17 else if (py_buffer_contains_T<index>(info))
19 else if (py_buffer_contains_T<int8_t>(info))
21 else if (py_buffer_contains_T<uint8_t>(info))
23 else if (py_buffer_contains_T<int32_t>(info))
25 else if (py_buffer_contains_T<uint32_t>(info))
27 else if (py_buffer_contains_T<int64_t>(info))
29 else if (py_buffer_contains_T<uint64_t>(info))
31 else if (py_buffer_contains_T<float>(info))
33 else if (py_buffer_contains_T<int16_t>(info))
35 else if (py_buffer_contains_T<uint16_t>(info))
38 DNDS_assert_info(
false,
"MPI datatype not found for info.format == " + info.format);
40 return MPI_DATATYPE_NULL;
45 MPI_Op mpi_op = MPI_OP_NULL;
48 else if (op ==
"MPI_MAX")
50 else if (op ==
"MPI_MIN")
52 else if (op ==
"MPI_LXOR")
54 else if (op ==
"MPI_BXOR")
Shared pybind11 plumbing used by every *_bind.hpp in DNDS (buffer-protocol type check,...
#define DNDS_assert_info(expr, info)
Debug-only assertion with an extra std::string info message.
MPI wrappers: MPIInfo, collective operations, type mapping, CommStrategy.
void pybind11_Debug(py::module_ &m)
void pybind11_Init_thread(py::module_ &m)
void pybind11_MPI_Operations(py::module_ &m)
the host side operators are provided as implemented
MPI_Op py_get_simple_mpi_op_by_name(const std::string &op)
const MPI_Datatype DNDS_MPI_INDEX
MPI datatype matching index (= MPI_INT64_T).
void pybind11_MPIInfo(py::module_ &m)
MPI_Datatype py_get_buffer_basic_mpi_datatype(const py::buffer_info &info)
void pybind11_bind_MPI_All(py::module_ &m)
const MPI_Datatype DNDS_MPI_REAL
MPI datatype matching real (= MPI_REAL8).