Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Declare functions "const" in src/smpi/.
[simgrid.git] / src / smpi / include / smpi_op.hpp
index 403b230..1b45884 100644 (file)
@@ -21,11 +21,11 @@ class Op : public F2C{
 
 public:
   Op(MPI_User_function* function, bool commutative, bool predefined=false) : func_(function), is_commutative_(commutative), predefined_(predefined) {}
-  bool is_commutative() { return is_commutative_; }
-  bool is_fortran_op() { return is_fortran_op_; }
+  bool is_commutative() const { return is_commutative_; }
+  bool is_fortran_op() const { return is_fortran_op_; }
   // 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);
+  void apply(const void* invec, void* inoutvec, const int* len, MPI_Datatype datatype) const;
   static Op* f2c(int id);
   void ref();
   static void unref(MPI_Op* op);