27 MPI::Op::Op(
const MPI::Op& o) : pmpi_op(o.pmpi_op) { }
30 MPI::Op::Op(
MPI_Op o) : pmpi_op(o) { }
36 MPI::Op& MPI::Op::operator=(
const MPI::Op& op) {
37 pmpi_op = op.pmpi_op;
return *
this;
42 MPI::Op::operator== (
const MPI::Op &a) {
43 return (
bool)(pmpi_op == a.pmpi_op);
47 MPI::Op::operator!= (
const MPI::Op &a) {
48 return (
bool)!(*
this == a);
53 MPI::Op::operator= (
const MPI_Op &i) { pmpi_op = i;
return *
this; }
56 MPI::Op::operator
MPI_Op ()
const {
return pmpi_op; }
62 #else // ============= NO PROFILING ===================================
66 MPI::Op::Op() : mpi_op(MPI_OP_NULL) { }
69 MPI::Op::Op(
MPI_Op i) : mpi_op(i) { }
72 MPI::Op::Op(
const MPI::Op& op)
73 : mpi_op(op.mpi_op) { }
85 MPI::Op::operator=(
const MPI::Op& op) {
92 MPI::Op::operator== (
const MPI::Op &a) {
return (
bool)(mpi_op == a.mpi_op); }
95 MPI::Op::operator!= (
const MPI::Op &a) {
return (
bool)!(*
this == a); }
99 MPI::Op::operator= (
const MPI_Op &i) { mpi_op = i;
return *
this; }
102 MPI::Op::operator
MPI_Op ()
const {
return mpi_op; }
119 MPI::Op::Init(MPI::User_function *func,
bool commute)
121 (void)MPI_Op_create((MPI_User_function*) ompi_mpi_cxx_op_intercept,
122 (int) commute, &mpi_op);
130 (void)MPI_Op_free(&mpi_op);
135 MPI::Op::Reduce_local(
const void *inbuf,
void *inoutbuf,
int count,
136 const MPI::Datatype& datatype)
const
138 (void)MPI_Reduce_local(const_cast<void*>(inbuf), inoutbuf, count,
144 MPI::Op::Is_commutative(
void)
const
147 (void)MPI_Op_commutative(mpi_op, &commute);
148 return (
bool) commute;
OMPI_DECLSPEC void ompi_op_set_cxx_callback(ompi_op_t *op, MPI_User_function *fn)
Mark an MPI_Op as holding a C++ callback function, and cache that function in the MPI_Op...
Definition: op.c:307
Back-end type of MPI_Op.
Definition: op.h:100