tudocomp
– The TU Dortmund Compression Framework
tdc::SizeManagerDirect Struct Reference

#include <Hash.hpp>

Inheritance diagram for tdc::SizeManagerDirect:
tdc::Algorithm

Public Member Functions

 SizeManagerDirect (Env &&env)
 
void resize (const len_t)
 
len_t mod_tablesize (const size_t, const len_t tablesize, const size_t key, const size_t probe)
 Compute index % tablesize Since tablesize is a power of two, a bitwise-AND is equivalent and faster from http://www.idryman.org/blog/2017/05/03/writing-a-damn-fast-hash-table-with-tiny-memory-footprints/. More...
 
- Public Member Functions inherited from tdc::Algorithm
virtual ~Algorithm ()=default
 
 Algorithm (Algorithm const &)=default
 
 Algorithm (Algorithm &&)=default
 
Algorithmoperator= (Algorithm const &)=default
 
Algorithmoperator= (Algorithm &&)=default
 
 Algorithm (Env &&env)
 Instantiates an algorithm in the specified environment. More...
 
Envenv ()
 Provides access to the environment that the algorithm works in. More...
 
const Envenv () const
 

Static Public Member Functions

static Meta meta ()
 
static len_t get_min_size (const len_t &hint)
 The lowest possible size larger than hint. More...
 

Detailed Description

Definition at line 105 of file Hash.hpp.

Constructor & Destructor Documentation

◆ SizeManagerDirect()

tdc::SizeManagerDirect::SizeManagerDirect ( Env &&  env)
inline

Definition at line 110 of file Hash.hpp.

Member Function Documentation

◆ get_min_size()

static len_t tdc::SizeManagerDirect::get_min_size ( const len_t hint)
inlinestatic

The lowest possible size larger than hint.

Definition at line 114 of file Hash.hpp.

◆ meta()

static Meta tdc::SizeManagerDirect::meta ( )
inlinestatic

Definition at line 106 of file Hash.hpp.

◆ mod_tablesize()

len_t tdc::SizeManagerDirect::mod_tablesize ( const size_t  ,
const len_t  tablesize,
const size_t  key,
const size_t  probe 
)
inline

Compute index % tablesize Since tablesize is a power of two, a bitwise-AND is equivalent and faster from http://www.idryman.org/blog/2017/05/03/writing-a-damn-fast-hash-table-with-tiny-memory-footprints/.

Definition at line 125 of file Hash.hpp.

◆ resize()

void tdc::SizeManagerDirect::resize ( const len_t  )
inline

Definition at line 117 of file Hash.hpp.


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