Blender  V3.3
Public Member Functions | List of all members
blender::QuadraticProbingStrategy Class Reference

#include <BLI_probing_strategies.hh>

Public Member Functions

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

Detailed Description

A slightly adapted quadratic probing strategy. The distance to the original slot increases quadratically. This method also leads to clustering. Another disadvantage is that not all bits of the original hash are used.

The distance i * i is not used, because it does not guarantee, that every slot is hit. Instead (i * i + i) / 2 is used, which has this desired property.

In the first few steps, this strategy can have good cache performance. It largely depends on how many keys fit into a cache line in the hash table.

Definition at line 87 of file BLI_probing_strategies.hh.

Constructor & Destructor Documentation

◆ QuadraticProbingStrategy()

blender::QuadraticProbingStrategy::QuadraticProbingStrategy ( const uint64_t  hash)
inline

Definition at line 94 of file BLI_probing_strategies.hh.

Member Function Documentation

◆ get()

uint64_t blender::QuadraticProbingStrategy::get ( ) const
inline

Definition at line 105 of file BLI_probing_strategies.hh.

◆ linear_steps()

int64_t blender::QuadraticProbingStrategy::linear_steps ( ) const
inline

Definition at line 110 of file BLI_probing_strategies.hh.

◆ next()

void blender::QuadraticProbingStrategy::next ( )
inline

Definition at line 99 of file BLI_probing_strategies.hh.


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