Grappa  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
< GlobalHashSet
create (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 49 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 149 of file GlobalHashSet.hpp.

Member Function Documentation

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

Definition at line 143 of file GlobalHashSet.hpp.

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

Definition at line 156 of file GlobalHashSet.hpp.

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

Definition at line 166 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 256 of file GlobalHashSet.hpp.

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

Definition at line 209 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 234 of file GlobalHashSet.hpp.

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

Definition at line 174 of file GlobalHashSet.hpp.

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

Definition at line 264 of file GlobalHashSet.hpp.

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

Definition at line 248 of file GlobalHashSet.hpp.

Member Data Documentation

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

Definition at line 136 of file GlobalHashSet.hpp.

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

Definition at line 137 of file GlobalHashSet.hpp.

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

Definition at line 139 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 141 of file GlobalHashSet.hpp.

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

Definition at line 135 of file GlobalHashSet.hpp.


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