JaffarPlus
High-performance best-first search optimizer for tool-assisted speedruns
Loading...
Searching...
No Matches
jaffarPlus::HashDb::NUMAStore_t Struct Reference

A single (L1 or L2) hash store: a rolling window of hashStore_t generations together with its rolling state and per-thread statistics counters. More...

Public Member Functions

size_t getQueryCount () const
 Sums the per-thread query counts.
 
size_t getCollisionCount () const
 Sums the per-thread collision counts.
 
void resetCounts ()
 Resets all per-thread query and collision counters to zero.
 
size_t getTotalQueryCount () const
 Lifetime (since-start) totals = already-rolled generations + the current window.
 
size_t getTotalCollisionCount () const
 Lifetime (since-start) collision total = already-rolled generations + the current window (the collision companion to getTotalQueryCount(), for the normalized aggregate telemetry).
 

Public Attributes

size_t _currentHashStoreId = 0
 Next id to assign to a newly created hash store generation.
 
size_t _currentAge = 0
 Number of steps elapsed since this store began, assigned as the age of newly created generations.
 
std::deque< hashStore_t_hashStores
 The rolling window of hash store generations (oldest at front, current/newest at back).
 
std::vector< paddedCounter_t_threadQueryCount
 Per-thread query counts for the current store, indexed by thread id.
 
std::vector< paddedCounter_t_threadCollisionCount
 Per-thread collision counts for the current store, indexed by thread id.
 
size_t _lifetimeQueryCount = 0
 Lifetime query/collision totals from all ALREADY-ROLLED generations (the per-thread counters above are reset on every roll and the oldest generations are eventually discarded, so these accumulators preserve the since-start totals for normalized, bounded-by-100% telemetry).
 
size_t _lifetimeCollisionCount = 0
 Lifetime collision total; companion to _lifetimeQueryCount (same since-start window).
 

Detailed Description

A single (L1 or L2) hash store: a rolling window of hashStore_t generations together with its rolling state and per-thread statistics counters.

Definition at line 293 of file hashDb.hpp.

Member Function Documentation

◆ getCollisionCount()

size_t jaffarPlus::HashDb::NUMAStore_t::getCollisionCount ( ) const
inline

Sums the per-thread collision counts.

Returns
The total number of collisions accumulated across all threads.

Definition at line 337 of file hashDb.hpp.

◆ getQueryCount()

size_t jaffarPlus::HashDb::NUMAStore_t::getQueryCount ( ) const
inline

Sums the per-thread query counts.

Returns
The total number of queries accumulated across all threads.

Definition at line 327 of file hashDb.hpp.

◆ getTotalCollisionCount()

size_t jaffarPlus::HashDb::NUMAStore_t::getTotalCollisionCount ( ) const
inline

Lifetime (since-start) collision total = already-rolled generations + the current window (the collision companion to getTotalQueryCount(), for the normalized aggregate telemetry).

Definition at line 354 of file hashDb.hpp.

◆ getTotalQueryCount()

size_t jaffarPlus::HashDb::NUMAStore_t::getTotalQueryCount ( ) const
inline

Lifetime (since-start) totals = already-rolled generations + the current window.

Used for the normalized aggregate telemetry, which compares L1 and L2 over the SAME (whole-run) window.

Definition at line 351 of file hashDb.hpp.

◆ resetCounts()

void jaffarPlus::HashDb::NUMAStore_t::resetCounts ( )
inline

Resets all per-thread query and collision counters to zero.

Definition at line 344 of file hashDb.hpp.

Member Data Documentation

◆ _currentAge

size_t jaffarPlus::HashDb::NUMAStore_t::_currentAge = 0

Number of steps elapsed since this store began, assigned as the age of newly created generations.

Definition at line 301 of file hashDb.hpp.

◆ _currentHashStoreId

size_t jaffarPlus::HashDb::NUMAStore_t::_currentHashStoreId = 0

Next id to assign to a newly created hash store generation.

Definition at line 295 of file hashDb.hpp.

◆ _hashStores

std::deque<hashStore_t> jaffarPlus::HashDb::NUMAStore_t::_hashStores

The rolling window of hash store generations (oldest at front, current/newest at back).

The current (newest) generation is read/write: probing it both checks for a collision and inserts the hash. The older generations are read-only and are only consulted for collisions.

Definition at line 309 of file hashDb.hpp.

◆ _lifetimeCollisionCount

size_t jaffarPlus::HashDb::NUMAStore_t::_lifetimeCollisionCount = 0

Lifetime collision total; companion to _lifetimeQueryCount (same since-start window).

Definition at line 319 of file hashDb.hpp.

◆ _lifetimeQueryCount

size_t jaffarPlus::HashDb::NUMAStore_t::_lifetimeQueryCount = 0

Lifetime query/collision totals from all ALREADY-ROLLED generations (the per-thread counters above are reset on every roll and the oldest generations are eventually discarded, so these accumulators preserve the since-start totals for normalized, bounded-by-100% telemetry).

Definition at line 318 of file hashDb.hpp.

◆ _threadCollisionCount

std::vector<paddedCounter_t> jaffarPlus::HashDb::NUMAStore_t::_threadCollisionCount

Per-thread collision counts for the current store, indexed by thread id.

Definition at line 313 of file hashDb.hpp.

◆ _threadQueryCount

std::vector<paddedCounter_t> jaffarPlus::HashDb::NUMAStore_t::_threadQueryCount

Per-thread query counts for the current store, indexed by thread id.

Definition at line 311 of file hashDb.hpp.


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