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

Public Member Functions

 unordered_registry (void)
 Construct a registry with a stateless home functor.
 
 unordered_registry (Home const &home)
 Construct a registry with a given home function. More...
 
void clear (void)
 Clear all of the currently mapped GIDs in the registry.
 
bool empty (void) const
 Return whether or not this registry has any entries.
 
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 &val)
 Register the locality of a single GID. 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 &key)
 Erase a mapping of a GID from a location. More...
 
const_iterator end (void) const
 Returns a value representing the end of the registry.
 
bool contains (key_type const &key) const
 Returns whether or not a given key is mapped in the registry. More...
 

Public Types

typedef Home::gid_type key_type
 GID type.
 
typedef Home::value_type value_type
 Location type.
 
typedef storage_type::const_iterator const_iterator
 

Detailed Description

template<typename Home, typename Compare = std::less<typename Home::gid_type>>
class stapl::unordered_registry< Home, Compare >

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 most pContainers, it is a safe assumption to expect that most GIDs will be mapped to the home location and that there will be only a small amount of GIDs that differ from this closed-form solution (through migration, etc.)

For this registry, GIDs are mapped to their locations using an unordered map.

Template Parameters
HomeThe manager function object
Theless than comparator used internally in the unordered map.

Constructor & Destructor Documentation

◆ unordered_registry()

template<typename Home , typename Compare = std::less<typename Home::gid_type>>
stapl::unordered_registry< Home, Compare >::unordered_registry ( Home const &  home)
explicit

Construct a registry with a given home function.

Parameters
homeThe manager function object

Member Function Documentation

◆ operator[]()

template<typename Home , typename Compare = std::less<typename Home::gid_type>>
value_type stapl::unordered_registry< Home, Compare >::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 where the key resides.

◆ insert()

template<typename Home , typename Compare = std::less<typename Home::gid_type>>
void stapl::unordered_registry< Home, Compare >::insert ( std::pair< key_type, value_type > const &  val)

Register the locality of a single GID.

Parameters
valKey-value pair to insert into the registry

◆ find()

template<typename Home , typename Compare = std::less<typename Home::gid_type>>
const_iterator stapl::unordered_registry< Home, Compare >::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
An iterator that when dereferenced returns a std::pair with the key and the location of the key.

◆ erase()

template<typename Home , typename Compare = std::less<typename Home::gid_type>>
void stapl::unordered_registry< Home, Compare >::erase ( key_type const &  key)

Erase a mapping of a GID from a location.

Parameters
keyKey to remove from the directory

◆ contains()

template<typename Home , typename Compare = std::less<typename Home::gid_type>>
bool stapl::unordered_registry< Home, Compare >::contains ( key_type const &  key) const

Returns whether or not a given key is mapped in the registry.

Parameters
keyThe key to query
Returns
True if a valid mapping of this key is in the directory

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