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

This class is used to store directory entries in the container_directory class and subsequently, its base class directory. It models the map concept. More...

Public Member Functions

 static_registry (Home const &home)
 Create a registry with a given manager (home). More...
 
template<typename Partition , typename Mapper >
void reset_home (Partition const &partition, Mapper const &mapper)
 Resets the partition and mapper stored in m_home. More...
 
void clear (void)
 Clears the storage of the registry. As there is no storage, this is effectively a no op.
 
bool empty (void) const
 Returns whether or not the registry is empty. The registry is only empty if there is no data defined by the container.
 
value_type operator[] (key_type const &key) const
 Lookup in the registry on which location a GID resides. More...
 
void insert (std::pair< key_type, value_type > const &)
 Register the locality of a GID. This is not valid for a static registry. More...
 
const_iterator find (key_type const &key) const
 Lookup in the registry on which location a GID resides. More...
 
void erase (key_type const &)
 Erase a mapping of a GID from a location. Erasing from a static registry is not valid. More...
 
const_iterator end (void) const
 Returns a value representing the end of the registry.
 

Public Types

typedef Home::gid_type key_type
 
typedef Home::value_type value_type
 

Detailed Description

template<typename Home>
class stapl::static_registry< Home >

This class is used to store directory entries in the container_directory class and subsequently, its base class directory. It models the map concept.

For static pContainers, this registry will simply mimic the initial distribution of GIDs, which is provided by the Home function object.

Template Parameters
HomeFunction object that provides a (usually) closed-form solution for GID -> location.

Constructor & Destructor Documentation

◆ static_registry()

template<typename Home >
stapl::static_registry< Home >::static_registry ( Home const &  home)
explicit

Create a registry with a given manager (home).

Parameters
homeFunction object to translate keys to values.

Member Function Documentation

◆ reset_home()

template<typename Home >
template<typename Partition , typename Mapper >
void stapl::static_registry< Home >::reset_home ( Partition const &  partition,
Mapper const &  mapper 
)

Resets the partition and mapper stored in m_home.

Parameters
partitionview-based partition of a data distribution.
mapperview-based mapper of a data distribution.

◆ operator[]()

template<typename Home >
value_type stapl::static_registry< Home >::operator[] ( key_type const &  key) const

Lookup in the registry on which location a GID resides.

Parameters
keyKey to look up in the registry.
Returns
The location of the key.

◆ insert()

template<typename Home >
void stapl::static_registry< Home >::insert ( std::pair< key_type, value_type > const &  )

Register the locality of a GID. This is not valid for a static registry.

Parameters
valKey-value pair to insert into the registry

◆ find()

template<typename Home >
const_iterator stapl::static_registry< Home >::find ( key_type const &  key) const

Lookup in the registry on which location a GID resides.

Parameters
keyKey to look up in the registry.
Returns
The location of the key.

◆ erase()

template<typename Home >
void stapl::static_registry< Home >::erase ( key_type const &  )

Erase a mapping of a GID from a location. Erasing from a static registry is not valid.

Parameters
keyKey to remove from the directory.

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