Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Mainly on 32 bits systems, target_disp can be seen as negative in one case.
[simgrid.git] / src / smpi / smpi_win.hpp
index f88eb4f..5beb90c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2013-2015. The SimGrid Team.
+/* Copyright (c) 2010, 2013-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -34,20 +34,28 @@ class Win : public F2C, public Keyval {
   std::list<int> lockers_;
   int rank_; // to identify owner for barriers in MPI_COMM_WORLD
   int mode_; // exclusive or shared lock
+  int allocated_;
+  int dynamic_;
 
 public:
   static std::unordered_map<int, smpi_key_elem> keyvals_;
   static int keyval_id_;
 
-  Win(void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm);
+  Win(void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, int allocated = 0, int dynamic = 0);
+  Win(MPI_Info info, MPI_Comm comm) : Win(MPI_BOTTOM, 0, 1, info, comm, 0, 1) {};
   ~Win();
+  int attach (void *base, MPI_Aint size);
+  int detach (void *base);
   void get_name( char* name, int* length);
   void get_group( MPI_Group* group);
   void set_name( char* name);
   int rank();
+  int dynamic();
   int start(MPI_Group group, int assert);
   int post(MPI_Group group, int assert);
   int complete();
+  MPI_Info info();
+  void set_info( MPI_Info info);
   int wait();
   MPI_Aint size();
   void* base();
@@ -59,6 +67,9 @@ 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);
+  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);
   static Win* f2c(int id);
   int lock(int lock_type, int rank, int assert);
   int unlock(int rank);