STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Protected Member Functions
stapl::detail::edge_storage Class Reference

Manages storage of edges of the edge_container. More...

Public Member Functions

edge_storageoperator= (edge_storage const &)=delete
 
 edge_storage (edge_storage const &)=delete
 
edge_entry_tlookup_ptr (index_type tid) const
 Search for entry with key tid. If found, return a pointer else return a nullptr.
 
edge_entry_tlookup_expect (index_type tid)
 Search for entry with key tid. The entry is expected to exist; assert if it is not found. Return a reference to the entry.
 
bool contains (index_type tid) const
 Returns true if there is an entry for task tid in the value cache.
 
bool empty (void) const
 
void erase (edge_entry_t &entry_ref) const
 
void clear (void)
 
bool insert (edge_entry_t &entry_ref)
 
template<typename EntryFactory >
edge_entry_tlookup_or_insert (const index_type tid, EntryFactory factory)
 Check if entry exists for given task id and create one if it doesn't. Returns a reference to the entry.
 
template<typename Functor >
void for_each (Functor f) const
 Apply functor on all entries in the value cache.
 

Public Types

using index_type = std::size_t
 The task identifier type used by the PARAGRAPH.
 
using edge_entry_t = detail::edge_entry_base
 The edge entry type held by the value cache.
 

Protected Member Functions

void check_increase_size (void) const
 Called by edge_container methods that increase the number of entries stored in the local cache. If load factor is 1, resize by a power of two.
 

Detailed Description

Manages storage of edges of the edge_container.

Callers know the intrusive nature of entries (i.e., they are responsible for allocation and deallocation of entries), but the exact storage container (e.g., ordered_set vs unordered_set) is abstracted. Furthermore, the interface of the underlying Boost.Intrusive container is restricted to not allow access via iterators. This allows operations that invalidate iterators such as rehashing to occur without other parts of the stack needing to know.


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