46 comm->AllReduce(toReduce, oper);
58 py::class_<Comm, std::shared_ptr<Comm>,
59 boost::noncopyable>(
"Comm", py::no_init)
63 py::return_value_policy<py::copy_const_reference>())
64 .def(
"AllReduce", &AllReduce<double>)
65 .def(
"AllReduce", &AllReduce<int>)
66 .def(
"AllReduce", &AllReduce<long>)
#define NEKPY_WRAP_ENUM(ENUMNAME, MAPNAME)
void export_Comm()
Export for Comm communicator.
T AllReduce(CommSharedPtr &comm, T toReduce, ReduceOperator oper)
const std::string & GetType() const
int GetSize() const
Returns number of processes.
const char *const ReduceOperatorMap[]
ReduceOperator
Type of operation to perform in AllReduce.
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
The above copyright notice and this permission notice shall be included.