Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
324227f22ad80691117ec1b37691624da045327e
[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 "private.h"
11 #include "src/smpi/smpi_info.hpp"
12
13 namespace simgrid{
14 namespace smpi{
15
16 class Op : public F2C{
17   private:
18     MPI_User_function *func_;
19     bool is_commutative_;
20     bool is_fortran_op_;
21   public:
22
23     Op(MPI_User_function * function, bool commutative);
24     bool is_commutative();
25     bool is_fortran_op();
26     void set_fortran_op();
27     void apply(void *invec, void *inoutvec, int *len, MPI_Datatype datatype);
28     static Op* f2c(int id);
29 };
30
31 }
32 }
33
34 #endif