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

Per-thread accumulator for timing and counters. More...

Public Member Functions

void reset ()
 Resets all timers and counters to zero.
 

Public Attributes

size_t runnerStateAdvance
 Time spent advancing the runner state with an input.
 
size_t runnerStateLoad
 Time spent loading states into the runner.
 
size_t runnerStateSave
 Time spent saving runner states into the state database.
 
size_t calculateHash
 Time spent computing state hashes.
 
size_t checkHash
 Time spent checking hashes against the hash database.
 
size_t ruleChecking
 Time spent evaluating rules and determining state type.
 
size_t getFreeState
 Time spent acquiring free state slots.
 
size_t returnFreeState
 Time spent returning state slots to the free queue.
 
size_t calculateReward
 Time spent computing state rewards.
 
size_t getAllowedInputs
 Time spent querying the runner's allowed inputs.
 
size_t getCandidateInputs
 Time spent querying the runner's candidate inputs.
 
size_t popBaseStateDb
 Time spent popping base-state batches from the state database.
 
size_t baseStatesProcessed
 Number of base states this thread expanded.
 
size_t newStatesProcessed
 Number of new states this thread produced via inputs.
 
size_t normalStates
 Number of normal states produced.
 
size_t repeatedStates
 Number of states dropped as repeated.
 
size_t failedStates
 Number of states classified as failures.
 
size_t winStates
 Number of win states produced.
 
size_t droppedStatesNoStorage
 Number of states dropped for lack of free storage.
 
size_t droppedStatesFailedSerialization
 Number of states dropped due to failed serialization.
 
size_t droppedStatesCheckpoint
 Number of states dropped for not meeting the checkpoint.
 

Detailed Description

Per-thread accumulator for timing and counters.

All hot-loop work writes only into its own thread's instance (plain, non-atomic adds), and the engine reduces these into the shared totals once per step. This removes the per-input atomic contention that previously serialized high core counts.

Aligned (and implicitly sized) to a cache-line multiple so that adjacent threads' accumulators never share a cache line (no false sharing).

Definition at line 740 of file engine.hpp.

Member Function Documentation

◆ reset()

void jaffarPlus::Engine::threadAccumulator_t::reset ( )
inline

Resets all timers and counters to zero.

Definition at line 768 of file engine.hpp.

Member Data Documentation

◆ baseStatesProcessed

size_t jaffarPlus::Engine::threadAccumulator_t::baseStatesProcessed

Number of base states this thread expanded.

Definition at line 757 of file engine.hpp.

◆ calculateHash

size_t jaffarPlus::Engine::threadAccumulator_t::calculateHash

Time spent computing state hashes.

Definition at line 746 of file engine.hpp.

◆ calculateReward

size_t jaffarPlus::Engine::threadAccumulator_t::calculateReward

Time spent computing state rewards.

Definition at line 751 of file engine.hpp.

◆ checkHash

size_t jaffarPlus::Engine::threadAccumulator_t::checkHash

Time spent checking hashes against the hash database.

Definition at line 747 of file engine.hpp.

◆ droppedStatesCheckpoint

size_t jaffarPlus::Engine::threadAccumulator_t::droppedStatesCheckpoint

Number of states dropped for not meeting the checkpoint.

Definition at line 765 of file engine.hpp.

◆ droppedStatesFailedSerialization

size_t jaffarPlus::Engine::threadAccumulator_t::droppedStatesFailedSerialization

Number of states dropped due to failed serialization.

Definition at line 764 of file engine.hpp.

◆ droppedStatesNoStorage

size_t jaffarPlus::Engine::threadAccumulator_t::droppedStatesNoStorage

Number of states dropped for lack of free storage.

Definition at line 763 of file engine.hpp.

◆ failedStates

size_t jaffarPlus::Engine::threadAccumulator_t::failedStates

Number of states classified as failures.

Definition at line 761 of file engine.hpp.

◆ getAllowedInputs

size_t jaffarPlus::Engine::threadAccumulator_t::getAllowedInputs

Time spent querying the runner's allowed inputs.

Definition at line 752 of file engine.hpp.

◆ getCandidateInputs

size_t jaffarPlus::Engine::threadAccumulator_t::getCandidateInputs

Time spent querying the runner's candidate inputs.

Definition at line 753 of file engine.hpp.

◆ getFreeState

size_t jaffarPlus::Engine::threadAccumulator_t::getFreeState

Time spent acquiring free state slots.

Definition at line 749 of file engine.hpp.

◆ newStatesProcessed

size_t jaffarPlus::Engine::threadAccumulator_t::newStatesProcessed

Number of new states this thread produced via inputs.

Definition at line 758 of file engine.hpp.

◆ normalStates

size_t jaffarPlus::Engine::threadAccumulator_t::normalStates

Number of normal states produced.

Definition at line 759 of file engine.hpp.

◆ popBaseStateDb

size_t jaffarPlus::Engine::threadAccumulator_t::popBaseStateDb

Time spent popping base-state batches from the state database.

Definition at line 754 of file engine.hpp.

◆ repeatedStates

size_t jaffarPlus::Engine::threadAccumulator_t::repeatedStates

Number of states dropped as repeated.

Definition at line 760 of file engine.hpp.

◆ returnFreeState

size_t jaffarPlus::Engine::threadAccumulator_t::returnFreeState

Time spent returning state slots to the free queue.

Definition at line 750 of file engine.hpp.

◆ ruleChecking

size_t jaffarPlus::Engine::threadAccumulator_t::ruleChecking

Time spent evaluating rules and determining state type.

Definition at line 748 of file engine.hpp.

◆ runnerStateAdvance

size_t jaffarPlus::Engine::threadAccumulator_t::runnerStateAdvance

Time spent advancing the runner state with an input.

Definition at line 743 of file engine.hpp.

◆ runnerStateLoad

size_t jaffarPlus::Engine::threadAccumulator_t::runnerStateLoad

Time spent loading states into the runner.

Definition at line 744 of file engine.hpp.

◆ runnerStateSave

size_t jaffarPlus::Engine::threadAccumulator_t::runnerStateSave

Time spent saving runner states into the state database.

Definition at line 745 of file engine.hpp.

◆ winStates

size_t jaffarPlus::Engine::threadAccumulator_t::winStates

Number of win states produced.

Definition at line 762 of file engine.hpp.


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