Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'toufic' of github.com:Takishipp/simgrid
[simgrid.git] / src / smpi / smpi_op.hpp
1 /* Copyright (c) 2009-2010, 2012-2017. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef SMPI_OP_HPP
8 #define SMPI_OP_HPP
9
10 #include <xbt/base.h>
11
12 #include "private.h"
13
14 namespace simgrid{
15 namespace smpi{
16
17 class Op : public F2C{
18   private:
19     MPI_User_function *func_;
20     bool is_commutative_;
21     bool is_fortran_op_;
22   public:
23
24     Op(MPI_User_function * function, bool commutative);
25     bool is_commutative();
26     bool is_fortran_op();
27     void set_fortran_op();
28     void apply(void *invec, void *inoutvec, int *len, MPI_Datatype datatype);
29     static Op* f2c(int id);
30 };
31
32 }
33 }
34
35 #endif