-/* Copyright (c) 2010-2022. 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
#include <vector>
#include <list>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
class Win : public F2C, public Keyval {
void* base_;
MPI_Comm comm_;
std::vector<MPI_Request> requests_;
s4u::MutexPtr mut_ = s4u::Mutex::create();
+ s4u::BarrierPtr bar_;
std::vector<MPI_Win> connected_wins_;
std::string name_;
int opened_ = 0;
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;
void set_errhandler( MPI_Errhandler errhandler);
};
-
-}
-}
+} // namespace simgrid::smpi
#endif