Grappa  r3821, hash 22cd626d567a91ead5b23302066d1e9469f45c66
Grappa::GlobalHashSet< K > Class Template Reference

#include <GlobalHashSet.hpp>

Classes

struct  Cell
 
struct  Entry
 
struct  Proxy
 
struct  ResultEntry
 

Public Member Functions

void destroy ()
 
bool lookup (K key)
 
void insert (K key)
 
template<typename F >
void insert_async (K key, F sync)
 Inserts the key if not already in the set. More...
 
void sync_all_cores ()
 
template<GlobalCompletionEvent * GCE = &impl::local_gce, typename F = decltype(nullptr)>
void forall_keys (F visit)
 
size_t size ()
 

Static Public Member Functions

static GlobalAddress< GlobalHashSetcreate (size_t total_capacity)
 

Protected Member Functions

uint64_t computeIndex (K key)
 
 GlobalHashSet (GlobalAddress< GlobalHashSet > self, GlobalAddress< Cell > base, size_t capacity)
 

Protected Attributes

struct Grappa::GlobalHashSet::Cell GRAPPA_BLOCK_ALIGNED
 
GlobalAddress< GlobalHashSetself
 
GlobalAddress< Cellbase
 
size_t capacity
 
size_t count
 
FlatCombiner< Proxyproxy
 

Detailed Description

template<typename K>
class Grappa::GlobalHashSet< K >

Definition at line 60 of file GlobalHashSet.hpp.

Constructor & Destructor Documentation

template<typename K >
Grappa::GlobalHashSet< K >::GlobalHashSet ( GlobalAddress< GlobalHashSet< K > >  self,
GlobalAddress< Cell base,
size_t  capacity 
)
inlineprotected

Definition at line 160 of file GlobalHashSet.hpp.

Member Function Documentation

template<typename K >
uint64_t Grappa::GlobalHashSet< K >::computeIndex ( key)
inlineprotected

Definition at line 154 of file GlobalHashSet.hpp.

template<typename K >
static GlobalAddress<GlobalHashSet> Grappa::GlobalHashSet< K >::create ( size_t  total_capacity)
inlinestatic

Definition at line 167 of file GlobalHashSet.hpp.

template<typename K >
void Grappa::GlobalHashSet< K >::destroy ( )
inline

Definition at line 177 of file GlobalHashSet.hpp.

template<typename K >
template<GlobalCompletionEvent * GCE = &impl::local_gce, typename F = decltype(nullptr)>
void Grappa::GlobalHashSet< K >::forall_keys ( visit)
inline

Definition at line 267 of file GlobalHashSet.hpp.

template<typename K >
void Grappa::GlobalHashSet< K >::insert ( key)
inline

Definition at line 220 of file GlobalHashSet.hpp.

template<typename K >
template<typename F >
void Grappa::GlobalHashSet< K >::insert_async ( key,
sync 
)
inline

Inserts the key if not already in the set.

Note
To guarantee completion, user must call 'sync_all_cores()' if any async operations have been done.

asynchronous operation

TODO: detect if async's were used without calling 'sync'.

Definition at line 245 of file GlobalHashSet.hpp.

template<typename K >
bool Grappa::GlobalHashSet< K >::lookup ( key)
inline

Definition at line 185 of file GlobalHashSet.hpp.

template<typename K >
size_t Grappa::GlobalHashSet< K >::size ( )
inline

Definition at line 275 of file GlobalHashSet.hpp.

template<typename K >
void Grappa::GlobalHashSet< K >::sync_all_cores ( )
inline

Definition at line 259 of file GlobalHashSet.hpp.

Member Data Documentation

template<typename K >
GlobalAddress< Cell > Grappa::GlobalHashSet< K >::base
protected

Definition at line 147 of file GlobalHashSet.hpp.

template<typename K >
size_t Grappa::GlobalHashSet< K >::capacity
protected

Definition at line 148 of file GlobalHashSet.hpp.

template<typename K >
size_t Grappa::GlobalHashSet< K >::count
protected

Definition at line 150 of file GlobalHashSet.hpp.

template<typename K >
struct Grappa::GlobalHashSet::Cell Grappa::GlobalHashSet< K >::GRAPPA_BLOCK_ALIGNED
protected
template<typename K >
FlatCombiner<Proxy> Grappa::GlobalHashSet< K >::proxy
protected

Definition at line 152 of file GlobalHashSet.hpp.

template<typename K >
GlobalAddress<GlobalHashSet> Grappa::GlobalHashSet< K >::self
protected

Definition at line 146 of file GlobalHashSet.hpp.


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