OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash > Class Template Reference

Detailed Description

template<typename ValueType, unsigned int NeighborhoodSize, bool StoreHash>
class tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >

Definition at line 406 of file hopscotch_hash.h.

+ Inheritance diagram for tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >:

Public Types

using value_type = ValueType
 
using neighborhood_bitmap = typename smallest_type_for_min_bits< NeighborhoodSize+NB_RESERVED_BITS_IN_NEIGHBORHOOD >::type
 
- Public Types inherited from tsl::detail_hopscotch_hash::hopscotch_bucket_hash< StoreHash >
using hash_type = std::false_type
 

Public Member Functions

 hopscotch_bucket (const hopscotch_bucket &bucket) noexcept(std::is_nothrow_copy_constructible< value_type >::value)
 
 hopscotch_bucket (hopscotch_bucket &&bucket) noexcept(std::is_nothrow_move_constructible< value_type >::value)
 
hopscotch_bucketoperator= (const hopscotch_bucket &bucket) noexcept(std::is_nothrow_copy_constructible< value_type >::value)
 
hopscotch_bucketoperator= (hopscotch_bucket &&)=delete
 
neighborhood_bitmap neighborhood_infos () const noexcept
 
void set_overflow (bool has_overflow) noexcept
 
bool has_overflow () const noexcept
 
bool empty () const noexcept
 
void toggle_neighbor_presence (std::size_t ineighbor) noexcept
 
bool check_neighbor_presence (std::size_t ineighbor) const noexcept
 
value_type & value () noexcept
 
const value_type & value () const noexcept
 
template<typename P >
void set_value_of_empty_bucket (P &&value, std::size_t hash)
 
void swap_value_into_empty_bucket (hopscotch_bucket &empty_bucket)
 
void remove_value () noexcept
 
void clear () noexcept
 
- Public Member Functions inherited from tsl::detail_hopscotch_hash::hopscotch_bucket_hash< StoreHash >
bool bucket_hash_equal (std::size_t) const noexcept
 
std::size_t truncated_bucket_hash () const noexcept
 

Static Public Member Functions

static std::size_t max_size () noexcept
 

Private Types

using bucket_hash = hopscotch_bucket_hash< StoreHash >
 
using storage = typename std::aligned_storage< sizeof(value_type), alignof(value_type)>::type
 

Private Member Functions

void set_empty (bool is_empty) noexcept
 
void destroy_value () noexcept
 

Private Attributes

neighborhood_bitmap m_neighborhood_infos
 
storage m_value
 

Static Private Attributes

static const size_t MIN_NEIGHBORHOOD_SIZE = 4
 
static const size_t MAX_NEIGHBORHOOD_SIZE = SMALLEST_TYPE_MAX_BITS_SUPPORTED - NB_RESERVED_BITS_IN_NEIGHBORHOOD
 

Additional Inherited Members

- Protected Member Functions inherited from tsl::detail_hopscotch_hash::hopscotch_bucket_hash< StoreHash >
void copy_hash (const hopscotch_bucket_hash &) noexcept
 
void set_hash (std::size_t) noexcept
 

Member Typedef Documentation

◆ bucket_hash

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
using tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::bucket_hash = hopscotch_bucket_hash<StoreHash>
private

Definition at line 426 of file hopscotch_hash.h.

◆ neighborhood_bitmap

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
using tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::neighborhood_bitmap = typename smallest_type_for_min_bits<NeighborhoodSize + NB_RESERVED_BITS_IN_NEIGHBORHOOD>::type

Definition at line 430 of file hopscotch_hash.h.

◆ storage

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
using tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::storage = typename std::aligned_storage<sizeof(value_type), alignof(value_type)>::type
private

Definition at line 604 of file hopscotch_hash.h.

◆ value_type

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
using tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::value_type = ValueType

Definition at line 429 of file hopscotch_hash.h.

Constructor & Destructor Documentation

◆ hopscotch_bucket() [1/3]

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::hopscotch_bucket ( )
inlinenoexcept

Definition at line 434 of file hopscotch_hash.h.

◆ hopscotch_bucket() [2/3]

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::hopscotch_bucket ( const hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash > &  bucket)
inlinenoexcept

Definition at line 439 of file hopscotch_hash.h.

◆ hopscotch_bucket() [3/3]

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::hopscotch_bucket ( hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash > &&  bucket)
inlinenoexcept

Definition at line 450 of file hopscotch_hash.h.

◆ ~hopscotch_bucket()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::~hopscotch_bucket ( )
inlinenoexcept

Definition at line 484 of file hopscotch_hash.h.

Member Function Documentation

◆ check_neighbor_presence()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
bool tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::check_neighbor_presence ( std::size_t  ineighbor) const
inlinenoexcept

Definition at line 517 of file hopscotch_hash.h.

◆ clear()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
void tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::clear ( )
inlinenoexcept

Definition at line 564 of file hopscotch_hash.h.

◆ destroy_value()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
void tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::destroy_value ( )
inlineprivatenoexcept

Definition at line 592 of file hopscotch_hash.h.

◆ empty()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
bool tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::empty ( ) const
inlinenoexcept

Definition at line 507 of file hopscotch_hash.h.

◆ has_overflow()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
bool tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::has_overflow ( ) const
inlinenoexcept

Definition at line 503 of file hopscotch_hash.h.

◆ max_size()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
static std::size_t tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::max_size ( )
inlinestaticnoexcept

Definition at line 573 of file hopscotch_hash.h.

◆ neighborhood_infos()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
neighborhood_bitmap tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::neighborhood_infos ( ) const
inlinenoexcept

Definition at line 490 of file hopscotch_hash.h.

◆ operator=()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
hopscotch_bucket & tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::operator= ( const hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash > &  bucket)
inlinenoexcept

Definition at line 461 of file hopscotch_hash.h.

◆ remove_value()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
void tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::remove_value ( )
inlinenoexcept

Definition at line 557 of file hopscotch_hash.h.

◆ set_empty()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
void tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::set_empty ( bool  is_empty)
inlineprivatenoexcept

Definition at line 583 of file hopscotch_hash.h.

◆ set_overflow()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
void tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::set_overflow ( bool  has_overflow)
inlinenoexcept

Definition at line 494 of file hopscotch_hash.h.

◆ set_value_of_empty_bucket()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
template<typename P >
void tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::set_value_of_empty_bucket ( P &&  value,
std::size_t  hash 
)
inline

Definition at line 537 of file hopscotch_hash.h.

◆ swap_value_into_empty_bucket()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
void tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::swap_value_into_empty_bucket ( hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash > &  empty_bucket)
inline

Definition at line 545 of file hopscotch_hash.h.

◆ toggle_neighbor_presence()

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
void tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::toggle_neighbor_presence ( std::size_t  ineighbor)
inlinenoexcept

Definition at line 511 of file hopscotch_hash.h.

◆ value() [1/2]

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
const value_type & tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::value ( ) const
inlinenoexcept

Definition at line 531 of file hopscotch_hash.h.

◆ value() [2/2]

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
value_type & tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::value ( )
inlinenoexcept

Definition at line 526 of file hopscotch_hash.h.

Field Documentation

◆ m_neighborhood_infos

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
neighborhood_bitmap tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::m_neighborhood_infos
private

Definition at line 606 of file hopscotch_hash.h.

◆ m_value

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
storage tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::m_value
private

Definition at line 607 of file hopscotch_hash.h.

◆ MAX_NEIGHBORHOOD_SIZE

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
const size_t tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::MAX_NEIGHBORHOOD_SIZE = SMALLEST_TYPE_MAX_BITS_SUPPORTED - NB_RESERVED_BITS_IN_NEIGHBORHOOD
staticprivate

Definition at line 409 of file hopscotch_hash.h.

◆ MIN_NEIGHBORHOOD_SIZE

template<typename ValueType , unsigned int NeighborhoodSize, bool StoreHash>
const size_t tsl::detail_hopscotch_hash::hopscotch_bucket< ValueType, NeighborhoodSize, StoreHash >::MIN_NEIGHBORHOOD_SIZE = 4
staticprivate

Definition at line 408 of file hopscotch_hash.h.


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