Xiangiqgame
AI engine for Xiangqi
Loading...
Searching...
No Matches
boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys > Class Template Reference

Removes old entries from TranspositionTableForConcepts to prevent excessive memory use. More...

#include <zobrist_for_concepts.hpp>

Inheritance diagram for boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >:
Inheritance graph
Collaboration diagram for boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >:
Collaboration graph

Public Member Functions

 TranspositionTablePrunerForConcepts (const TranspositionTablePrunerForConcepts &)=delete
 
TranspositionTablePrunerForConceptsoperator= (const TranspositionTablePrunerForConcepts &)=delete
 
 TranspositionTablePrunerForConcepts (TranspositionTableForConcepts< KeyType, NumConfKeys > &tr_table, TranspositionTableGuardForConcepts &tr_table_guard)
 
 ~TranspositionTablePrunerForConcepts ()
 
void Start ()
 
void Stop ()
 

Private Member Functions

void UnsafePruneEntry ()
 
void ThreadSafePruneEntry ()
 
void RepeatedlyPrune ()
 

Private Attributes

TranspositionTableForConcepts< KeyType, NumConfKeys > & tr_table_
 
TranspositionTableGuardForConceptstr_table_guard_
 
std::thread pruning_thread_
 
std::atomic< bool > keep_running_
 

Detailed Description

template<typename KeyType, size_t NumConfKeys>
class boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >

Removes old entries from TranspositionTableForConcepts to prevent excessive memory use.

Definition at line 250 of file zobrist_for_concepts.hpp.

Constructor & Destructor Documentation

◆ TranspositionTablePrunerForConcepts() [1/2]

template<typename KeyType , size_t NumConfKeys>
boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >::TranspositionTablePrunerForConcepts ( const TranspositionTablePrunerForConcepts< KeyType, NumConfKeys > &  )
delete

◆ TranspositionTablePrunerForConcepts() [2/2]

template<typename KeyType , size_t NumConfKeys>
boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >::TranspositionTablePrunerForConcepts ( TranspositionTableForConcepts< KeyType, NumConfKeys > &  tr_table,
TranspositionTableGuardForConcepts tr_table_guard 
)
inline

Definition at line 262 of file zobrist_for_concepts.hpp.

◆ ~TranspositionTablePrunerForConcepts()

template<typename KeyType , size_t NumConfKeys>
boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >::~TranspositionTablePrunerForConcepts ( )
inline

Definition at line 271 of file zobrist_for_concepts.hpp.

Member Function Documentation

◆ operator=()

template<typename KeyType , size_t NumConfKeys>
TranspositionTablePrunerForConcepts & boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >::operator= ( const TranspositionTablePrunerForConcepts< KeyType, NumConfKeys > &  )
delete

◆ RepeatedlyPrune()

template<typename KeyType , size_t NumConfKeys>
void boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >::RepeatedlyPrune ( )
inlineprivate

Definition at line 298 of file zobrist_for_concepts.hpp.

◆ Start()

template<typename KeyType , size_t NumConfKeys>
void boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >::Start ( )
inline

Definition at line 277 of file zobrist_for_concepts.hpp.

◆ Stop()

template<typename KeyType , size_t NumConfKeys>
void boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >::Stop ( )
inline

Definition at line 282 of file zobrist_for_concepts.hpp.

◆ ThreadSafePruneEntry()

template<typename KeyType , size_t NumConfKeys>
void boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >::ThreadSafePruneEntry ( )
inlineprivate

Definition at line 292 of file zobrist_for_concepts.hpp.

◆ UnsafePruneEntry()

template<typename KeyType , size_t NumConfKeys>
void boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >::UnsafePruneEntry ( )
inlineprivate

Definition at line 287 of file zobrist_for_concepts.hpp.

Member Data Documentation

◆ keep_running_

template<typename KeyType , size_t NumConfKeys>
std::atomic<bool> boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >::keep_running_
private

Definition at line 254 of file zobrist_for_concepts.hpp.

◆ pruning_thread_

template<typename KeyType , size_t NumConfKeys>
std::thread boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >::pruning_thread_
private

Definition at line 253 of file zobrist_for_concepts.hpp.

◆ tr_table_

template<typename KeyType , size_t NumConfKeys>
TranspositionTableForConcepts<KeyType, NumConfKeys>& boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >::tr_table_
private

Definition at line 251 of file zobrist_for_concepts.hpp.

◆ tr_table_guard_

template<typename KeyType , size_t NumConfKeys>
TranspositionTableGuardForConcepts& boardstate::TranspositionTablePrunerForConcepts< KeyType, NumConfKeys >::tr_table_guard_
private

Definition at line 252 of file zobrist_for_concepts.hpp.


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