Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Mark some remote pointers as such
[simgrid.git] / src / mc / RemotePtr.hpp
index c9a931c..23d0372 100644 (file)
@@ -34,6 +34,11 @@ public:
   RemotePtr(T* address) : address_((std::uintptr_t)address) {}
   std::uint64_t address() const { return address_; }
 
+  /** Turn into a local pointer
+   *
+   (if the remote process is not, in fact, remote) */
+  T* local() { return (T*) address_; }
+
   operator bool() const
   {
     return address_;