Blender  V3.3
Public Member Functions | List of all members
blender::PythonProbingStrategy< LinearSteps, PreShuffle > Class Template Reference

#include <BLI_probing_strategies.hh>

Public Member Functions

 PythonProbingStrategy (const uint64_t hash)
 
void next ()
 
uint64_t get () const
 
int64_t linear_steps () const
 

Detailed Description

template<uint64_t LinearSteps = 1, bool PreShuffle = false>
class blender::PythonProbingStrategy< LinearSteps, PreShuffle >

This is the probing strategy used by CPython (in 2020).

It is very fast when the original hash value is good. If there are collisions, more bits of the hash value are taken into account.

LinearSteps: Can be set to something larger than 1 for improved cache performance in some cases. PreShuffle: When true, the initial call to next() will be done to the constructor. This can help when the hash function has put little information into the lower bits.

Definition at line 126 of file BLI_probing_strategies.hh.

Constructor & Destructor Documentation

◆ PythonProbingStrategy()

template<uint64_t LinearSteps = 1, bool PreShuffle = false>
blender::PythonProbingStrategy< LinearSteps, PreShuffle >::PythonProbingStrategy ( const uint64_t  hash)
inline

Member Function Documentation

◆ get()

template<uint64_t LinearSteps = 1, bool PreShuffle = false>
uint64_t blender::PythonProbingStrategy< LinearSteps, PreShuffle >::get ( ) const
inline

Definition at line 145 of file BLI_probing_strategies.hh.

◆ linear_steps()

template<uint64_t LinearSteps = 1, bool PreShuffle = false>
int64_t blender::PythonProbingStrategy< LinearSteps, PreShuffle >::linear_steps ( ) const
inline

Definition at line 150 of file BLI_probing_strategies.hh.

◆ next()

template<uint64_t LinearSteps = 1, bool PreShuffle = false>
void blender::PythonProbingStrategy< LinearSteps, PreShuffle >::next ( )
inline

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