Container for metadata used when the number of elements (metadata information) is not known at construction. More...
Public Member Functions | |
growable_container (size_t n) | |
growable_container (growable_container const &)=delete | |
growable_container & | operator= (growable_container const &)=delete |
void | push_back_here (MD const &md) |
Adds the given metadata information in to the local storage. | |
local_vec_type & | vec (void) |
iterator | begin () |
Returns an iterator to the beginning of the local base container. More... | |
iterator | end () |
Returns an iterator to the end of the local base container. More... | |
size_t | get_local_vid (size_t index) const |
Returns the global index of the given local index . More... | |
size_t | local_size (void) const |
Returns the number of local elements (number of elements in the base container). More... | |
dimensions_type | local_dimensions (void) const |
container_t::reference | operator[] (typename container_t::gid_type index) |
size_t | size () const |
size_t | dimensions () const |
domain_type | domain () const |
location_type | get_location_element (size_t index) const |
Returns the location where the metadata indexed by index is located. More... | |
void | update () |
Computes the total number of elements (metadata information) and copies the local stored metadata into the distributed container, after using the prefix sum algorithm to determine the correct position for each element in the distributed container. | |
runtime::location_md const & | get_location_md (void) const noexcept |
Returns the location metadata of the location this object registered in. | |
runtime::location_md & | get_location_md (void) noexcept |
Returns the location metadata of the location this object registered in. noexcept More... | |
Distributed Object Management | |
rmi_handle::const_reference const & | get_rmi_handle (void) const noexcept |
Returns the associated rmi_handle. | |
rmi_handle::reference const & | get_rmi_handle (void) noexcept |
Returns the associated rmi_handle. | |
size_type | get_location_id (void) const noexcept |
Returns the location id of the local sub-object. | |
size_type | get_num_locations (void) const noexcept |
Returns the number of locations of the gang of this p_object. | |
void | advance_epoch (void) |
Advances the epoch of the object. More... | |
void | unlock (void) |
Used by lock_guard functionality in method of derived classes to request atomicity with respect to incoming RMIs. More... | |
void | lock (void) |
Used by lock_guard functionality in method of derived classes to request atomicity with respect to incoming RMIs. More... | |
bool | try_lock (void) |
Attempt to maintain atomicity with respect to incoming RMIs. More... | |
Public Types | |
typedef indexed_domain< size_t > | domain_type |
typedef size_t | index_type |
typedef size_t | dimensions_type |
typedef MD | value_type |
typedef container_t::reference | reference |
typedef base_container_type::iterator | iterator |
using | size_type = rmi_handle::size_type |
Container for metadata used when the number of elements (metadata information) is not known at construction.
This metadata container uses a relaxed consistency over insertion. The elements inserted using push_back_here
method are locally stored. When the update
method is invoked the local stored data is copied into the right position into a member pContainer, keeping the data in order guided by the gid order.
MD | Type of the metadata used to store the metadata information. |
iterator stapl::metadata::growable_container< MD >::begin | ( | void | ) |
Returns an iterator to the beginning of the local base container.
This iterator is used to traverse the local data.
iterator stapl::metadata::growable_container< MD >::end | ( | void | ) |
Returns an iterator to the end of the local base container.
This iterator is used to traverse the local data.
size_t stapl::metadata::growable_container< MD >::get_local_vid | ( | size_t | index | ) | const |
Returns the global index of the given local index
.
size_t stapl::metadata::growable_container< MD >::local_size | ( | void | ) | const |
Returns the number of local elements (number of elements in the base container).
location_type stapl::metadata::growable_container< MD >::get_location_element | ( | size_t | index | ) | const |
Returns the location where the metadata indexed by index
is located.
|
noexceptinherited |
Returns the location metadata of the location this object registered in. noexcept
noexcept
|
inherited |
Advances the epoch of the object.
Advancing the epoch will flush any pending RMIs. It will also increase the epoch of the current gang if the object is not a named object.
|
inherited |
Used by lock_guard
functionality in method of derived classes to request atomicity with respect to incoming RMIs.
Mutates counter in the associated runqueue.
|
inherited |
Used by lock_guard
functionality in method of derived classes to request atomicity with respect to incoming RMIs.
Mutates counter in the associated runqueue.
|
inherited |
Attempt to maintain atomicity with respect to incoming RMIs.
Mutates counter in the associated runqueue.
true
if the lock was able to be acquired. false
if it is already locked.