X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3718b81f92488f30d14590c0b69b13c3843604d5..adbdcbddadcbd685b72259874d1ebfd9cbbcc497:/src/smpi/include/smpi_win.hpp diff --git a/src/smpi/include/smpi_win.hpp b/src/smpi/include/smpi_win.hpp index b3994e443c..436bd279a7 100644 --- a/src/smpi/include/smpi_win.hpp +++ b/src/smpi/include/smpi_win.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2021. The SimGrid Team. +/* Copyright (c) 2010-2023. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -16,8 +16,7 @@ #include #include -namespace simgrid{ -namespace smpi{ +namespace simgrid::smpi { class Win : public F2C, public Keyval { void* base_; @@ -28,7 +27,7 @@ class Win : public F2C, public Keyval { MPI_Comm comm_; std::vector requests_; s4u::MutexPtr mut_ = s4u::Mutex::create(); - s4u::Barrier* bar_ = nullptr; + s4u::BarrierPtr bar_; std::vector connected_wins_; std::string name_; int opened_ = 0; @@ -53,11 +52,11 @@ public: Win(MPI_Info info, MPI_Comm comm) : Win(MPI_BOTTOM, 0, 1, info, comm, false, true){}; Win(const Win&) = delete; Win& operator=(const Win&) = delete; - ~Win() override; + static int del(Win* win); int attach (void *base, MPI_Aint size); int detach (const void *base); void get_name(char* name, int* length) const; - std::string name() const override {return name_.empty() ? std::string("MPI_Win") : name_;} + std::string name() const override { return name_.empty() ? "MPI_Win" : name_; } void get_group( MPI_Group* group); void set_name(const char* name); int rank() const; @@ -102,8 +101,6 @@ public: void set_errhandler( MPI_Errhandler errhandler); }; - -} -} +} // namespace simgrid::smpi #endif