All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
osl::checkmate::DfpnTable Class Reference

詰探索局面表 -- 並列でも共有する部分 More...

#include <dfpn.h>

List of all members.

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 ()

Private Member Functions

template<Player Attack>
Listfind (const HashKey &key, int subindex)
template<Player Attack>
const Listfind (const HashKey &key, int subindex) const
const Listfind (const HashKey &key, int subindex) const

Static Private Member Functions

static int keyToIndex (const HashKey &key)

Private Attributes

boost::scoped_array< Tabletable
size_t total_size
int dfpn_max_depth
size_t growth_limit
size_t gc_threshold

Static Private Attributes

static const int DIVSIZE = 1

Detailed Description

詰探索局面表 -- 並列でも共有する部分

Definition at line 34 of file dfpn.h.


Constructor & Destructor Documentation

Definition at line 933 of file dfpn.cc.

References setAttack().

Definition at line 942 of file dfpn.cc.

Definition at line 947 of file dfpn.cc.


Member Function Documentation

void osl::checkmate::DfpnTable::addDag ( const HashKey &  key,
DfpnRecord value 
)

Definition at line 989 of file dfpn.cc.

Definition at line 1196 of file dfpn.cc.

References SCOPED_LOCK.

size_t osl::checkmate::DfpnTable::estimateNodeCount ( const HashKey &  key,
bool  dominance_max = false 
) const
template<osl::Player Attack>
osl::checkmate::DfpnTable::List * osl::checkmate::DfpnTable::find ( const HashKey &  key,
int  subindex 
) [private]

Definition at line 997 of file dfpn.cc.

References osl::find().

template<osl::Player Attack>
const osl::checkmate::DfpnTable::List * osl::checkmate::DfpnTable::find ( const HashKey &  key,
int  subindex 
) const [private]

Definition at line 1016 of file dfpn.cc.

References osl::find().

const List* osl::checkmate::DfpnTable::find ( const HashKey &  key,
int  subindex 
) const [private]
template<osl::Player Attack>
const osl::checkmate::DfpnRecord osl::checkmate::DfpnTable::findProofOracle ( const HashKey &  key,
PieceStand  white,
Move  last_move = Move() 
) const

Definition at line 1063 of file dfpn.cc.

References osl::checkmate::DfpnTable::List::findProofOracle(), and SCOPED_LOCK.

const DfpnRecord osl::checkmate::DfpnTable::findProofOracle ( const HashKey &  key,
PieceStand  white,
Move  last_move = Move() 
) const
size_t osl::checkmate::DfpnTable::growthLimit ( ) const [inline]

Definition at line 78 of file dfpn.h.

References growth_limit.

static int osl::checkmate::DfpnTable::keyToIndex ( const HashKey &  key) [inline, static, private]

Definition at line 95 of file dfpn.h.

References DIVSIZE.

void osl::checkmate::DfpnTable::leaveWorking ( const HashKey &  key,
int  thread_id 
)

Definition at line 1179 of file dfpn.cc.

References osl::checkmate::DfpnTable::List::leaveWorking(), and SCOPED_LOCK.

Definition at line 975 of file dfpn.cc.

Referenced by osl::checkmate::ProofTreeDepthDfpn::Table::maxDepth().

template<osl::Player Attack>
const osl::checkmate::DfpnRecord osl::checkmate::DfpnTable::probe ( const HashKey &  key,
PieceStand  white 
) const

Definition at line 1041 of file dfpn.cc.

References osl::checkmate::DfpnTable::List::probe(), and SCOPED_LOCK.

Referenced by analyzeCheckmate().

const DfpnRecord osl::checkmate::DfpnTable::probe ( const HashKey &  key,
PieceStand  white 
) const

Definition at line 1256 of file dfpn.cc.

References osl::OslConfig::memoryUseRatio().

Definition at line 981 of file dfpn.cc.

Referenced by DfpnTable(), and osl::checkmate::DualDfpn::Local::Local().

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 952 of file dfpn.cc.

Referenced by search().

void osl::checkmate::DfpnTable::setMaxDepth ( int  new_depth)

Definition at line 970 of file dfpn.cc.

Referenced by osl::checkmate::Dfpn::setTable().

void osl::checkmate::DfpnTable::setWorking ( const HashKey &  key,
const DfpnRecord value,
int  thread_id 
)
template<osl::Player Attack>
void osl::checkmate::DfpnTable::showProofOracles ( const HashKey &  key,
PieceStand  white,
Move  last_move = Move() 
) const

Definition at line 1086 of file dfpn.cc.

References SCOPED_LOCK, and osl::checkmate::DfpnTable::List::showProofOracles().

Definition at line 960 of file dfpn.cc.

Definition at line 1290 of file dfpn.cc.

size_t osl::checkmate::DfpnTable::smallTreeGC ( size_t  threshold = 10)

Definition at line 1230 of file dfpn.cc.

References SCOPED_LOCK.

void osl::checkmate::DfpnTable::store ( const HashKey &  key,
DfpnRecord value,
int  leaving_thread_id = -1 
)

Definition at line 1208 of file dfpn.cc.

References SCOPED_LOCK.

Definition at line 68 of file dfpn.h.

References total_size.


Member Data Documentation

Definition at line 40 of file dfpn.h.

const int osl::checkmate::DfpnTable::DIVSIZE = 1 [static, private]

Definition at line 93 of file dfpn.h.

Referenced by keyToIndex().

Definition at line 41 of file dfpn.h.

Definition at line 41 of file dfpn.h.

Referenced by growthLimit().

boost::scoped_array<Table> osl::checkmate::DfpnTable::table [private]

Definition at line 37 of file dfpn.h.

Referenced by osl::checkmate::DualDfpn::table().

Definition at line 39 of file dfpn.h.

Referenced by totalSize().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines