STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Public Attributes
stapl::view_impl::view_container< View, P, MFG, SVC > Class Template Reference

Define a container of views, specified by a partition function and a mapping function generator. More...

Public Member Functions

 view_container (view_container const &)=delete
 
template<typename Other >
 view_container (view_container_type const *view, Other const &other)
 Copy constructor that replaces the container for a new container. More...
 
 view_container (view_container_type const &view, partition_type const &part, mapfunc_generator_type const &mfg)
 Default constructor, where the underneath container, the partition functor and mapping function generator are specified. More...
 
 view_container (store_in_frame, view_container_type const &view, partition_type const &part, mapfunc_generator_type const &mfg)
 Constructor where the underlying view is constructed in place and whose lifetime is managed by the view_container. More...
 
view_container_type const * get_view (void) const
 
view_container_type * get_view (void)
 
view_container_type const & view (void) const
 
view_view_container_type * get_container (void)
 
view_view_container_type const * get_container (void) const
 
view_view_container_type & container (void)
 
view_view_container_type const & container (void) const
 
partition_type const & partition (void) const
 
mapfunc_generator_type const & mapfunc_generator (void) const
 
view_domain_type view_domain (void) const
 
value_type operator[] (index_type index) const
 
value_type get_element (index_type index) const
 Return the view associated with the position index (linear position) The returned view mapping function is the function composition of top view mapping function and the mapping function generated for the mapping function generator. More...
 
locality_info locality (index_type const &idx) const
 Return the locality information of the segment containing the index provided. More...
 
template<class Functor >
Functor::result_type apply_get (index_type index, Functor const &f) const
 Applies the provided function the the value referenced for the given index returning the resulting value. More...
 
template<class Functor >
Functor::result_type apply_get (index_type index, Functor const &f)
 
size_t size (void) const
 
domain_type domain (void) const
 
dimensions_type dimensions (void) const
 
bool is_in_frame (void) const
 
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...
 
View & managed_container (void)
 
View const & managed_container (void) const
 
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

using index_type = typename P::index_type
 
using view_view_container_type = typename View::view_container_type
 
using container_type = typename View::view_container_type
 
using gid_type = size_t
 
using view_container_type = View
 
using value_type = typename traits_t::value_type
 
using loc_dist_metadata = metadata::segmented_view_extractor< view_container >
 
using reference = value_type
 
using const_reference = const value_type
 
using partition_type = P
 
using mapfunc_generator_type = map_fun_gen_t
 
using domain_type = typename P::domain_type
 
using traversal_type = void
 
using dimensions_type = typename P::index_type
 the type to repesent the size in each dimension
 
using dimension_type = typename dimension_traits< dimensions_type >::type
 integral constant representing the number of dimensions
 
using size_type = rmi_handle::size_type
 

Public Attributes

view_view_container_type * m_container
 
view_map_func_type m_view_map_func
 
view_domain_type m_view_domain
 
View const * m_view
 
bool m_owns_view
 
partition_type m_partitioner
 
map_fun_gen_t m_map_func_gen
 
bool m_is_store_in_frame
 

Detailed Description

template<typename View, typename P, typename MFG, typename SVC>
class stapl::view_impl::view_container< View, P, MFG, SVC >

Define a container of views, specified by a partition function and a mapping function generator.

The partition function defines the domain of each view in the container and the mapping function generator, the mapping function to use by each view.

Template Parameters
Viewwhich every view in the container, reference as underneath container
Ppartition functor type
MFGMapping function generator type
SVCFunctor that creates subviews

Constructor & Destructor Documentation

◆ view_container() [1/3]

template<typename View , typename P , typename MFG , typename SVC >
template<typename Other >
stapl::view_impl::view_container< View, P, MFG, SVC >::view_container ( view_container_type const *  view,
Other const &  other 
)

Copy constructor that replaces the container for a new container.

Note
Constructor used during the fast view transformation.

◆ view_container() [2/3]

template<typename View , typename P , typename MFG , typename SVC >
stapl::view_impl::view_container< View, P, MFG, SVC >::view_container ( view_container_type const &  view,
partition_type const &  part,
mapfunc_generator_type const &  mfg 
)

Default constructor, where the underneath container, the partition functor and mapping function generator are specified.

Parameters
viewis the view from which the subviews are created.
partdomain partition.
mfgmapping function generator.

◆ view_container() [3/3]

template<typename View , typename P , typename MFG , typename SVC >
stapl::view_impl::view_container< View, P, MFG, SVC >::view_container ( store_in_frame  ,
view_container_type const &  view,
partition_type const &  part,
mapfunc_generator_type const &  mfg 
)

Constructor where the underlying view is constructed in place and whose lifetime is managed by the view_container.

Parameters
viewis the view from which the subviews are created.
partdomain partition.
mfgmapping function generator.

Member Function Documentation

◆ get_element()

template<typename View , typename P , typename MFG , typename SVC >
value_type stapl::view_impl::view_container< View, P, MFG, SVC >::get_element ( index_type  index) const

Return the view associated with the position index (linear position) The returned view mapping function is the function composition of top view mapping function and the mapping function generated for the mapping function generator.

Parameters
indexto an element
Returns
the generated subview at position index

◆ locality()

template<typename View , typename P , typename MFG , typename SVC >
locality_info stapl::view_impl::view_container< View, P, MFG, SVC >::locality ( index_type const &  idx) const

Return the locality information of the segment containing the index provided.

Parameters
idxGID of a view element whose locality is being requested
Returns
The locality information of the segment containing the GID.

◆ apply_get()

template<typename View , typename P , typename MFG , typename SVC >
template<class Functor >
Functor::result_type stapl::view_impl::view_container< View, P, MFG, SVC >::apply_get ( index_type  index,
Functor const &  f 
) const

Applies the provided function the the value referenced for the given index returning the resulting value.

Parameters
indexof element to apply the function
ffunction to apply
Returns
result of evaluating the function f on the value referenced for the index

◆ 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 files: