X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b65f8c081fd0167701551de334cb84473eebcab9..13fb4af932a02ea0bd4293d1e55ac071de326f80:/src/smpi/smpi_win.hpp diff --git a/src/smpi/smpi_win.hpp b/src/smpi/smpi_win.hpp index 1d36f36c73..e219be5588 100644 --- a/src/smpi/smpi_win.hpp +++ b/src/smpi/smpi_win.hpp @@ -7,7 +7,9 @@ #ifndef SMPI_WIN_HPP_INCLUDED #define SMPI_WIN_HPP_INCLUDED -#include "private.h" +#include "src/smpi/smpi_keyvals.hpp" +#include "xbt/synchro.h" + #include #include @@ -31,6 +33,7 @@ class Win : public F2C, public Keyval { MPI_Group group_; int count_; //for ordering the accs xbt_mutex_t lock_mut_; + xbt_mutex_t atomic_mut_; std::list lockers_; int rank_; // to identify owner for barriers in MPI_COMM_WORLD int mode_; // exclusive or shared lock @@ -62,15 +65,19 @@ public: 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); + MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Request* request=nullptr); int get( 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_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Request* request=nullptr); 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); - int get_accumulate( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, - int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, - MPI_Datatype target_datatype, MPI_Op op); + MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Request* request=nullptr); + int get_accumulate( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, + int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, + MPI_Datatype target_datatype, MPI_Op op, MPI_Request* request=nullptr); + int compare_and_swap(void *origin_addr, void *compare_addr, + void *result_addr, MPI_Datatype datatype, int target_rank, + MPI_Aint target_disp); static Win* f2c(int id); + int lock(int lock_type, int rank, int assert); int unlock(int rank); int lock_all(int assert);