X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bb1ec3ebdc8aad0b788cfded0ca9bf7b071a6721..c5a48995c0e24c9ae38c3d14203388523c565a5b:/src/smpi/smpi_win.hpp diff --git a/src/smpi/smpi_win.hpp b/src/smpi/smpi_win.hpp index 85ed320355..fbf009dc90 100644 --- a/src/smpi/smpi_win.hpp +++ b/src/smpi/smpi_win.hpp @@ -9,11 +9,12 @@ #include "private.h" #include +#include namespace simgrid{ namespace smpi{ -class Win { +class Win : public F2C, public Keyval { private : void* base_; MPI_Aint size_; @@ -29,17 +30,27 @@ class Win { int opened_; MPI_Group group_; int count_; //for ordering the accs + xbt_mutex_t lock_mut_; + std::list lockers_; + int rank_; // to identify owner for barriers in MPI_COMM_WORLD public: + static std::unordered_map keyvals_; + static int keyval_id_; + Win(void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm); ~Win(); void get_name( char* name, int* length); void get_group( MPI_Group* group); void set_name( char* name); + int rank(); int start(MPI_Group group, int assert); int post(MPI_Group group, int assert); int complete(); int wait(); + MPI_Aint size(); + void* base(); + int disp_unit(); int fence(int assert); int put( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype); @@ -47,6 +58,10 @@ public: MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype); int accumulate( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op); + static Win* f2c(int id); + int lock(int lock_type, int rank, int assert); + int unlock(int rank); + int finish_comms(); };