X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3ac0bae5c2a2349ec8c42e6c8b14265e74741b69..dbfe89d3374d21b871e1114e7650717fd6b826d4:/src/smpi/include/smpi_op.hpp diff --git a/src/smpi/include/smpi_op.hpp b/src/smpi/include/smpi_op.hpp index edf2042b47..bfb1e7d8c9 100644 --- a/src/smpi/include/smpi_op.hpp +++ b/src/smpi/include/smpi_op.hpp @@ -18,12 +18,14 @@ class Op : public F2C{ bool is_fortran_op_ = false; int refcount_ = 1; bool is_predefined_; + int types_; //bitmask of the allowed datatypes flags public: - Op(MPI_User_function* function, bool commutative, bool predefined=false) : func_(function), is_commutative_(commutative), is_predefined_(predefined) {if(not predefined) this->add_f();} + Op(MPI_User_function* function, bool commutative, bool predefined=false, int types=0) : func_(function), is_commutative_(commutative), is_predefined_(predefined), types_(types) {if(not predefined) this->add_f();} bool is_commutative() const { return is_commutative_; } bool is_predefined() const { return is_predefined_; } bool is_fortran_op() const { return is_fortran_op_; } + int allowed_types() const { return types_; } // tell that we were created from fortran, so we need to translate the type to fortran when called void set_fortran_op() { is_fortran_op_ = true; } void apply(const void* invec, void* inoutvec, const int* len, MPI_Datatype datatype) const;