STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::metadata::growable_container< MD > Class Template Reference

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_containeroperator= (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_mdget_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
 

Detailed Description

template<typename MD>
class stapl::metadata::growable_container< MD >

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.

Template Parameters
MDType of the metadata used to store the metadata information.

Member Function Documentation

◆ begin()

template<typename MD >
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.

Note
There is only one base container per location.

◆ end()

template<typename MD >
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.

Note
There is only one base container per location.

◆ get_local_vid()

template<typename MD >
size_t stapl::metadata::growable_container< MD >::get_local_vid ( size_t  index) const

Returns the global index of the given local index.

◆ local_size()

template<typename MD >
size_t stapl::metadata::growable_container< MD >::local_size ( void  ) const

Returns the number of local elements (number of elements in the base container).

◆ get_location_element()

template<typename MD >
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.

◆ get_location_md()

runtime::location_md& stapl::p_object::get_location_md ( void  )
noexceptinherited

Returns the location metadata of the location this object registered in. noexcept

noexcept

◆ advance_epoch()

void stapl::p_object::advance_epoch ( void  )
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.

◆ unlock()

void stapl::p_object::unlock ( void  )
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.

◆ lock()

void stapl::p_object::lock ( void  )
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.

◆ try_lock()

bool stapl::p_object::try_lock ( void  )
inherited

Attempt to maintain atomicity with respect to incoming RMIs.

Mutates counter in the associated runqueue.

Returns
true if the lock was able to be acquired. false if it is already locked.

The documentation for this class was generated from the following file: