|
My Project
|
詰探索局面表 – 並列でも共有する部分 More...
#include <dfpn.h>
Classes | |
| struct | List |
| struct | Table |
Public Member Functions | |
| DfpnTable (Player attack) | |
| DfpnTable () | |
| ~DfpnTable () | |
| template<Player Attack> | |
| const DfpnRecord | probe (const HashKey &key, PieceStand white) const |
| const DfpnRecord | probe (const HashKey &key, PieceStand white) const |
| size_t | estimateNodeCount (const HashKey &key, bool dominance_max=false) const |
| template<Player Attack> | |
| const DfpnRecord | findProofOracle (const HashKey &key, PieceStand white, Move last_move=Move()) const |
| const DfpnRecord | findProofOracle (const HashKey &key, PieceStand white, Move last_move=Move()) const |
| template<Player Attack> | |
| void | showProofOracles (const HashKey &key, PieceStand white, Move last_move=Move()) const |
| size_t | size () const |
| void | showStats () const |
| void | setAttack (Player) |
| void | setWorking (const HashKey &key, const DfpnRecord &value, int thread_id) |
| void | leaveWorking (const HashKey &key, int thread_id) |
| void | store (const HashKey &key, DfpnRecord &value, int leaving_thread_id=-1) |
| void | addDag (const HashKey &key, DfpnRecord &value) |
| void | clear () |
| size_t | totalSize () |
| Player | attack () const |
| void | setMaxDepth (int) |
| int | maxDepth () const |
| void | testTable () |
| size_t | smallTreeGC (size_t threshold=10) |
| void | setGrowthLimit (size_t new_limit) |
| set the maximum size of table (otherwise infinity). | |
| size_t | growthLimit () const |
| bool | runGC () |
| template<osl::Player Attack> | |
| osl::checkmate::DfpnTable::List * | find (const HashKey &key, int subindex) |
| template<osl::Player Attack> | |
| const osl::checkmate::DfpnTable::List * | find (const HashKey &key, int subindex) const |
| template<osl::Player Attack> | |
| const osl::checkmate::DfpnRecord | probe (const HashKey &key, PieceStand white_stand) const |
| template<osl::Player Attack> | |
| const osl::checkmate::DfpnRecord | findProofOracle (const HashKey &key, PieceStand white_stand, Move last_move) const |
Private Member Functions | |
| template<Player Attack> | |
| List * | find (const HashKey &key, int subindex) |
| template<Player Attack> | |
| const List * | find (const HashKey &key, int subindex) const |
| const List * | find (const HashKey &key, int subindex) const |
Static Private Member Functions | |
| static int | keyToIndex (const HashKey &key) |
Private Attributes | |
| boost::scoped_array< Table > | table |
| size_t | total_size |
| int | dfpn_max_depth |
| size_t | growth_limit |
| size_t | gc_threshold |
Static Private Attributes | |
| static const int | DIVSIZE =1 |
| osl::checkmate::DfpnTable::DfpnTable | ( | Player | attack | ) |
Definition at line 892 of file dfpn.cc.
References attack(), dfpn_max_depth, DIVSIZE, gc_threshold, growth_limit, GrowthLimitInfty, setAttack(), table, and total_size.
| osl::checkmate::DfpnTable::DfpnTable | ( | ) |
Definition at line 901 of file dfpn.cc.
References dfpn_max_depth, DIVSIZE, table, and total_size.
| void osl::checkmate::DfpnTable::addDag | ( | const HashKey & | key, |
| DfpnRecord & | value ) |
Definition at line 1097 of file dfpn.cc.
References osl::checkmate::DfpnTable::List::addDag(), osl::BLACK, osl::hash::HashKey128::blackStand(), osl::hash::HashKey128::boardKey(), osl::checkmate::ProofDisproof::isLoopDetection(), keyToIndex(), osl::checkmate::DfpnRecordBase::proof_disproof, SCOPED_LOCK, osl::checkmate::DfpnRecord::stands, and table.
| osl::Player osl::checkmate::DfpnTable::attack | ( | ) | const |
Definition at line 949 of file dfpn.cc.
References table.
Referenced by DfpnTable(), find(), find(), findProofOracle(), probe(), and setAttack().
| void osl::checkmate::DfpnTable::clear | ( | ) |
Definition at line 1156 of file dfpn.cc.
References DIVSIZE, SCOPED_LOCK, table, and total_size.
| size_t osl::checkmate::DfpnTable::estimateNodeCount | ( | const HashKey & | key, |
| bool | dominance_max = false ) const |
Definition at line 1060 of file dfpn.cc.
References osl::checkmate::DfpnTable::List::estimateNodeCount(), find(), keyToIndex(), and SCOPED_LOCK.
| osl::checkmate::DfpnTable::List * osl::checkmate::DfpnTable::find | ( | const HashKey & | key, |
| int | subindex ) |
|
private |
Referenced by estimateNodeCount(), find(), find(), findProofOracle(), probe(), and showProofOracles().
| const osl::checkmate::DfpnTable::List * osl::checkmate::DfpnTable::find | ( | const HashKey & | key, |
| int | subindex ) const |
|
private |
Definition at line 984 of file dfpn.cc.
References osl::hash::HashKey128::boardKey(), find(), and table.
|
private |
| const osl::checkmate::DfpnRecord osl::checkmate::DfpnTable::findProofOracle | ( | const HashKey & | key, |
| PieceStand | white, | ||
| Move | last_move = Move() ) const |
Definition at line 1035 of file dfpn.cc.
References attack(), osl::BLACK, findProofOracle(), and table.
| const DfpnRecord osl::checkmate::DfpnTable::findProofOracle | ( | const HashKey & | key, |
| PieceStand | white, | ||
| Move | last_move = Move() ) const |
Referenced by findProofOracle().
| const osl::checkmate::DfpnRecord osl::checkmate::DfpnTable::findProofOracle | ( | const HashKey & | key, |
| PieceStand | white_stand, | ||
| Move | last_move ) const |
Definition at line 1023 of file dfpn.cc.
References osl::hash::HashKey128::blackStand(), find(), osl::checkmate::DfpnTable::List::findProofOracle(), keyToIndex(), and SCOPED_LOCK.
|
inline |
Definition at line 73 of file dfpn.h.
References growth_limit.
|
inlinestaticprivate |
Definition at line 90 of file dfpn.h.
References DIVSIZE, and osl::hash::HashKey128::signature().
Referenced by addDag(), estimateNodeCount(), findProofOracle(), leaveWorking(), probe(), setWorking(), showProofOracles(), and store().
| void osl::checkmate::DfpnTable::leaveWorking | ( | const HashKey & | key, |
| int | thread_id ) |
Definition at line 1139 of file dfpn.cc.
References osl::hash::HashKey128::blackStand(), osl::hash::HashKey128::boardKey(), keyToIndex(), osl::checkmate::DfpnTable::List::leaveWorking(), SCOPED_LOCK, and table.
| int osl::checkmate::DfpnTable::maxDepth | ( | ) | const |
Definition at line 935 of file dfpn.cc.
References dfpn_max_depth.
| const osl::checkmate::DfpnRecord osl::checkmate::DfpnTable::probe | ( | const HashKey & | key, |
| PieceStand | white ) const |
| const DfpnRecord osl::checkmate::DfpnTable::probe | ( | const HashKey & | key, |
| PieceStand | white ) const |
Referenced by probe().
| const osl::checkmate::DfpnRecord osl::checkmate::DfpnTable::probe | ( | const HashKey & | key, |
| PieceStand | white_stand ) const |
Definition at line 1001 of file dfpn.cc.
References osl::hash::HashKey128::blackStand(), find(), keyToIndex(), osl::checkmate::DfpnTable::List::probe(), and SCOPED_LOCK.
| bool osl::checkmate::DfpnTable::runGC | ( | ) |
Definition at line 1216 of file dfpn.cc.
References gc_threshold, growth_limit, osl::OslConfig::memoryUseRatio(), smallTreeGC(), and total_size.
| void osl::checkmate::DfpnTable::setAttack | ( | Player | a | ) |
| void osl::checkmate::DfpnTable::setGrowthLimit | ( | size_t | new_limit | ) |
set the maximum size of table (otherwise infinity).
this is one of preconditions to enable GC inside dfpn.
Definition at line 911 of file dfpn.cc.
References DIVSIZE, growth_limit, and table.
| void osl::checkmate::DfpnTable::setMaxDepth | ( | int | new_depth | ) |
Definition at line 930 of file dfpn.cc.
References dfpn_max_depth.
| void osl::checkmate::DfpnTable::setWorking | ( | const HashKey & | key, |
| const DfpnRecord & | value, | ||
| int | thread_id ) |
Definition at line 1116 of file dfpn.cc.
References osl::BLACK, osl::hash::HashKey128::blackStand(), osl::hash::HashKey128::boardKey(), keyToIndex(), SCOPED_LOCK, osl::checkmate::DfpnTable::List::setWorking(), osl::checkmate::DfpnRecord::stands, table, and total_size.
| void osl::checkmate::DfpnTable::showProofOracles | ( | const HashKey & | key, |
| PieceStand | white, | ||
| Move | last_move = Move() ) const |
Definition at line 1046 of file dfpn.cc.
References find(), keyToIndex(), SCOPED_LOCK, and osl::checkmate::DfpnTable::List::showProofOracles().
| void osl::checkmate::DfpnTable::showStats | ( | ) | const |
| size_t osl::checkmate::DfpnTable::size | ( | ) | const |
Definition at line 1250 of file dfpn.cc.
References total_size.
Referenced by setAttack(), and showStats().
| size_t osl::checkmate::DfpnTable::smallTreeGC | ( | size_t | threshold = 10 | ) |
Definition at line 1190 of file dfpn.cc.
References DIVSIZE, SCOPED_LOCK, table, threshold, and total_size.
Referenced by runGC().
| void osl::checkmate::DfpnTable::store | ( | const HashKey & | key, |
| DfpnRecord & | value, | ||
| int | leaving_thread_id = -1 ) |
Definition at line 1073 of file dfpn.cc.
References osl::BLACK, osl::hash::HashKey128::blackStand(), osl::hash::HashKey128::boardKey(), osl::checkmate::ProofDisproof::isLoopDetection(), keyToIndex(), osl::checkmate::DfpnRecordBase::proof_disproof, SCOPED_LOCK, osl::checkmate::DfpnRecord::stands, osl::checkmate::DfpnTable::List::store(), table, and total_size.
| void osl::checkmate::DfpnTable::testTable | ( | ) |
Definition at line 1168 of file dfpn.cc.
References DIVSIZE, SCOPED_LOCK, and table.
|
inline |
Definition at line 63 of file dfpn.h.
References total_size.
|
private |
Definition at line 35 of file dfpn.h.
Referenced by DfpnTable(), DfpnTable(), maxDepth(), and setMaxDepth().
|
staticprivate |
Definition at line 88 of file dfpn.h.
Referenced by clear(), DfpnTable(), DfpnTable(), keyToIndex(), setAttack(), setGrowthLimit(), showStats(), smallTreeGC(), and testTable().
|
private |
Definition at line 36 of file dfpn.h.
Referenced by DfpnTable(), and runGC().
|
private |
Definition at line 36 of file dfpn.h.
Referenced by DfpnTable(), growthLimit(), runGC(), and setGrowthLimit().
|
private |
Definition at line 33 of file dfpn.h.
Referenced by addDag(), attack(), clear(), DfpnTable(), DfpnTable(), find(), find(), findProofOracle(), leaveWorking(), probe(), setAttack(), setGrowthLimit(), setWorking(), showStats(), smallTreeGC(), store(), and testTable().
|
private |
Definition at line 34 of file dfpn.h.
Referenced by clear(), DfpnTable(), DfpnTable(), runGC(), setWorking(), showStats(), size(), smallTreeGC(), store(), and totalSize().