NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET > Class Template Reference

#include <libcuckoo_bucket_container.hh>

Classes

class  bucket
 

Public Types

using key_type = Key
 
using mapped_type = T
 
using value_type = std::pair< const Key, T >
 
using allocator_type = typename traits_::allocator_type
 
using partial_t = Partial
 
using size_type = typename traits_::size_type
 
using reference = value_type &
 
using const_reference = const value_type &
 
using pointer = typename traits_::pointer
 
using const_pointer = typename traits_::const_pointer
 

Public Member Functions

 libcuckoo_bucket_container (size_type hp, const allocator_type &allocator)
 
 ~libcuckoo_bucket_container () noexcept
 
 libcuckoo_bucket_container (const libcuckoo_bucket_container &bc)
 
 libcuckoo_bucket_container (const libcuckoo_bucket_container &bc, const allocator_type &a)
 
 libcuckoo_bucket_container (libcuckoo_bucket_container &&bc) noexcept
 
 libcuckoo_bucket_container (libcuckoo_bucket_container &&bc, const allocator_type &a)
 
libcuckoo_bucket_containeroperator= (const libcuckoo_bucket_container &bc)
 
libcuckoo_bucket_containeroperator= (libcuckoo_bucket_container &&bc) noexcept
 
void swap (libcuckoo_bucket_container &bc) noexcept
 
size_type hashpower () const
 
void hashpower (size_type val)
 
size_type size () const
 
allocator_type get_allocator () const
 
bucketoperator[] (size_type i)
 
const bucketoperator[] (size_type i) const
 
template<typename K , typename... Args>
void setKV (size_type ind, size_type slot, partial_t p, K &&k, Args &&... args)
 
void eraseKV (size_type ind, size_type slot)
 
void clear () noexcept
 
void clear_and_deallocate () noexcept
 

Friends

template<typename ThisKey , typename ThisT >
std::enable_if< std::is_trivial< ThisKey >::value &&std::is_trivial< ThisT >::value, std::ostream & >::type operator<< (std::ostream &os, const libcuckoo_bucket_container< ThisKey, ThisT, Allocator, Partial, SLOT_PER_BUCKET > &bc)
 
template<typename ThisKey , typename ThisT >
std::enable_if< std::is_trivial< ThisKey >::value &&std::is_trivial< ThisT >::value, std::istream & >::type operator>> (std::istream &is, libcuckoo_bucket_container< ThisKey, ThisT, Allocator, Partial, SLOT_PER_BUCKET > &bc)
 

Detailed Description

template<class Key, class T, class Allocator, class Partial, std::size_t SLOT_PER_BUCKET>
class libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >

libcuckoo_bucket_container manages storage of key-value pairs for the table. It stores the items inline in uninitialized memory, and keeps track of which slots have live data and which do not. It also stores a partial hash for each live key. It is sized by powers of two.

Template Parameters
Keytype of keys in the table
Ttype of values in the table
Allocatortype of key-value pair allocator
Partialtype of partial keys
SLOT_PER_BUCKETnumber of slots for each bucket in the table

Member Typedef Documentation

◆ allocator_type

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
using libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::allocator_type = typename traits_::allocator_type

◆ const_pointer

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
using libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::const_pointer = typename traits_::const_pointer

◆ const_reference

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
using libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::const_reference = const value_type &

◆ key_type

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
using libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::key_type = Key

◆ mapped_type

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
using libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::mapped_type = T

◆ partial_t

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
using libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::partial_t = Partial

◆ pointer

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
using libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::pointer = typename traits_::pointer

◆ reference

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
using libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::reference = value_type &

◆ size_type

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
using libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::size_type = typename traits_::size_type

◆ value_type

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
using libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::value_type = std::pair<const Key, T>

Constructor & Destructor Documentation

◆ libcuckoo_bucket_container() [1/5]

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::libcuckoo_bucket_container ( size_type  hp,
const allocator_type allocator 
)
inline

References libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::size(), and magic_enum::detail::value().

Here is the call graph for this function:

◆ ~libcuckoo_bucket_container()

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::~libcuckoo_bucket_container ( )
inlinenoexcept

◆ libcuckoo_bucket_container() [2/5]

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::libcuckoo_bucket_container ( const libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET > &  bc)
inline

◆ libcuckoo_bucket_container() [3/5]

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::libcuckoo_bucket_container ( const libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET > &  bc,
const allocator_type a 
)
inline

◆ libcuckoo_bucket_container() [4/5]

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::libcuckoo_bucket_container ( libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET > &&  bc)
inlinenoexcept

◆ libcuckoo_bucket_container() [5/5]

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::libcuckoo_bucket_container ( libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET > &&  bc,
const allocator_type a 
)
inline

Member Function Documentation

◆ clear()

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
void libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::clear ( )
inlinenoexcept

◆ clear_and_deallocate()

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
void libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::clear_and_deallocate ( )
inlinenoexcept

◆ eraseKV()

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
void libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::eraseKV ( size_type  ind,
size_type  slot 
)
inline

References libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::bucket::occupied().

Referenced by libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::clear().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_allocator()

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
allocator_type libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::get_allocator ( ) const
inline

Referenced by cuckoohash_map< Key, T, Hash, KeyEqual, Allocator, SLOT_PER_BUCKET >::get_allocator().

Here is the caller graph for this function:

◆ hashpower() [1/2]

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
size_type libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::hashpower ( ) const
inline

◆ hashpower() [2/2]

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
void libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::hashpower ( size_type  val)
inline

◆ operator=() [1/2]

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
libcuckoo_bucket_container& libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::operator= ( const libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET > &  bc)
inline

References libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::hashpower().

Here is the call graph for this function:

◆ operator=() [2/2]

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
libcuckoo_bucket_container& libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::operator= ( libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET > &&  bc)
inlinenoexcept

◆ operator[]() [1/2]

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
bucket& libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::operator[] ( size_type  i)
inline

◆ operator[]() [2/2]

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
const bucket& libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::operator[] ( size_type  i) const
inline

◆ setKV()

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
template<typename K , typename... Args>
void libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::setKV ( size_type  ind,
size_type  slot,
partial_t  p,
K &&  k,
Args &&...  args 
)
inline

References libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::bucket::occupied(), and libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::bucket::partial().

Here is the call graph for this function:

◆ size()

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
size_type libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::size ( ) const
inline

References libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::hashpower().

Referenced by cuckoohash_map< Key, T, Hash, KeyEqual, Allocator, SLOT_PER_BUCKET >::bucket_count(), libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::clear(), cuckoohash_map< Key, T, Hash, KeyEqual, Allocator, SLOT_PER_BUCKET >::locked_table::const_iterator::end_pos(), and libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::libcuckoo_bucket_container().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ swap()

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
void libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::swap ( libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET > &  bc)
inlinenoexcept

References libcuckoo_bucket_container< Key, T, Allocator, Partial, SLOT_PER_BUCKET >::hashpower(), and std::swap().

Referenced by cuckoohash_map< Key, T, Hash, KeyEqual, Allocator, SLOT_PER_BUCKET >::swap().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
template<typename ThisKey , typename ThisT >
std::enable_if<std::is_trivial<ThisKey>::value && std::is_trivial<ThisT>::value, std::ostream &>::type operator<< ( std::ostream &  os,
const libcuckoo_bucket_container< ThisKey, ThisT, Allocator, Partial, SLOT_PER_BUCKET > &  bc 
)
friend

◆ operator>>

template<class Key , class T , class Allocator , class Partial , std::size_t SLOT_PER_BUCKET>
template<typename ThisKey , typename ThisT >
std::enable_if<std::is_trivial<ThisKey>::value && std::is_trivial<ThisT>::value, std::istream &>::type operator>> ( std::istream &  is,
libcuckoo_bucket_container< ThisKey, ThisT, Allocator, Partial, SLOT_PER_BUCKET > &  bc 
)
friend

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