X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cbc68013e8f1008e88a8cefb1e60b7813cf8a409..10ee8f063aa0963534a92ad74c2bf23a9afaa2ae:/src/smpi/include/smpi_f2c.hpp diff --git a/src/smpi/include/smpi_f2c.hpp b/src/smpi/include/smpi_f2c.hpp index 1d965e9aba..0b96ef944f 100644 --- a/src/smpi/include/smpi_f2c.hpp +++ b/src/smpi/include/smpi_f2c.hpp @@ -10,6 +10,7 @@ #define SMPI_F2C_HPP_INCLUDED #include +#include #define KEY_SIZE (sizeof(int) * 2 + 1) @@ -22,18 +23,20 @@ class F2C { // Beware of collisions if id in mpif.h is not unique static std::unordered_map* f2c_lookup_; static int f2c_id_; + int my_f2c_id_ = -1; + protected: static std::unordered_map* f2c_lookup(); static void set_f2c_lookup(std::unordered_map* map); static int f2c_id(); static void f2c_id_increment(); - int my_f2c_id_; + public: char* get_my_key(char* key); static char* get_key(char* key, int id); static void delete_lookup(); static std::unordered_map* lookup(); - F2C() : my_f2c_id_(-1){} + F2C() {} virtual ~F2C() = default; //Override these to handle specific values.