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

Class for computing the metadata of static containers that use container_manager_static that inherits from the base-container, and thus, is the base-container itself. This type of container manager has only one component per location. More...

Public Member Functions

std::size_t num_entries (Distribution *dist) const
 Return the number of metadata entries that should be stored. More...
 
index_type index_of (Distribution *, cid_type const &cid) const
 Return the index in the metadata container that a base container should be stored at. More...
 
cid_type cid_of (Distribution *, index_type const &idx) const
 Return the CID for the metadata entry at a given index. More...
 
md_collection_type local_entries (distribution_type *dist) const
 Create a collection of metadata entries for all of the entries on this location. More...
 
return_type operator() (proxy< Container, Accessor > *proxy_cont) const
 Return the metadata of a reference to a container. More...
 
return_type operator() (container_type *cont) const
 Return the metadata of the specified container. More...
 
return_type operator() (distribution_type *dist) const
 Return the metadata of the specified distribution. More...
 

Public Types

using distribution_type = typename extractor_traits< static_container_extractor< Distribution > >::distribution_type
 
using md_collection_type = std::vector< std::pair< index_type, md_entry_type > >
 
using return_type = std::pair< bool, md_container_type *>
 

Detailed Description

template<typename Distribution>
class stapl::metadata::static_container_extractor< Distribution >

Class for computing the metadata of static containers that use container_manager_static that inherits from the base-container, and thus, is the base-container itself. This type of container manager has only one component per location.

Template Parameters
DistributionType of the Distribution.
Note
this is different from the static_array_metadata primarily due to the metadata used. This class uses the metadata::flat_container whereas the static_array_metadata uses the metadata_container_wrapper.

Member Function Documentation

◆ num_entries()

template<typename Distribution >
std::size_t stapl::metadata::static_container_extractor< Distribution >::num_entries ( Distribution *  dist) const

Return the number of metadata entries that should be stored.

Parameters
distThe distribution of the container

◆ index_of()

template<typename Distribution >
index_type stapl::metadata::static_container_extractor< Distribution >::index_of ( Distribution *  ,
cid_type const &  cid 
) const

Return the index in the metadata container that a base container should be stored at.

Parameters
distThe distribution of the container
bcThe base container of the metadata entry

◆ cid_of()

template<typename Distribution >
cid_type stapl::metadata::static_container_extractor< Distribution >::cid_of ( Distribution *  ,
index_type const &  idx 
) const

Return the CID for the metadata entry at a given index.

Parameters
distThe distribution of the container
bcThe index of the entry

◆ local_entries()

md_collection_type stapl::metadata::container_extractor_base< static_container_extractor< Distribution > >::local_entries ( distribution_type *  dist) const
inherited

Create a collection of metadata entries for all of the entries on this location.

Parameters
distThe distribution for the container that the extraction process is for
Returns
A collection of pairs, where the first element is the index of an entry and the second element is the entry itself

◆ operator()() [1/3]

return_type stapl::metadata::container_extractor_base< static_container_extractor< Distribution > >::operator() ( proxy< Container, Accessor > *  proxy_cont) const
inherited

Return the metadata of a reference to a container.

See also
metadata_entry.
Parameters
contA pointer to the container.

Calls the operator on the distribution of the provided container.

◆ operator()() [2/3]

return_type stapl::metadata::container_extractor_base< static_container_extractor< Distribution > >::operator() ( container_type *  cont) const
inherited

Return the metadata of the specified container.

See also
metadata_entry.
Parameters
contA pointer to the container.

Calls the operator on the distribution of the provided container.

◆ operator()() [3/3]

return_type stapl::metadata::container_extractor_base< static_container_extractor< Distribution > >::operator() ( distribution_type *  dist) const
inherited

Return the metadata of the specified distribution.

See also
metadata_entry.
Parameters
distA pointer to the distribution.

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