Template Class OnePerLocality

Inheritance Relationships

Base Type

Class Documentation

template <typename T>
class OnePerLocality : public shad::AbstractDataStructure<OnePerLocality<T>>

Wrapper that instantiate one object per Locality in the system.

This Wrapper triggers the instantiation of one object per Locality in the system.

Warning
Writes are not propagated across the system.
Template Parameters
  • T: The typen of the objects that will be instantiated.

Public Types

template<>
using ObjectID = typename AbstractDataStructure::ObjectID
template<>
using SharedPtr = typename AbstractDataStructure::SharedPtr

Public Functions

ObjectID GetGlobalID() const

Create method.

Creates instances of a T object on each locality.

Return
A shared pointer to the local OnePerlocality instance. Retieve the Global Identifier.
Return
The global identifier associated with the array instance.
Template Parameters
  • Args: The list of types needed to build an instance of type T
Parameters
  • args: The parameter pack to be forwarded to T’ constructor.

T *const operator->()

Access the local instance.

Return
A pointer to the local instance.

OnePerLocality<T> &operator=(const T &rhs)

Assign the an instance of T to the local object.

Template Parameters
  • T: the type of the allocated.
Parameters
  • rhs: The right-hand side of the assignment.

operator T() const

Retrieve a copy of the local instance.

Protected Functions

template <typename... Args>
OnePerLocality(ObjectID oid, Args... args)

Constructor.