Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Private Attributes | Static Private Attributes
osl::OslConfig Struct Reference

osl の実行環境に関する指定 More...

#include <oslConfig.h>

List of all members.

Static Public Member Functions

static const std::string & home ()
 compile時に指定されたディレクトリを返す.
static const char * home_c_str ()
static const std::string gpsusiConf ()
static const std::string testPrivate ()
 テストケースのデータ
static const std::string testPublic ()
static const char * testPrivateFile (const std::string &filename)
static const char * testPublicFile (const std::string &filename)
static const char * testCsaFile (const std::string &filename)
static const char * openingBook (const std::string &filenamme="")
 標準の定跡ファイルを返す
static void setVerbose (bool verbose)
static bool verbose ()
static void showOslHome ()
static void setNumCPUs (int ncpu)
static int numCPUs ()
static bool usiMode ()
static void setUsiMode (bool enable=true)
static bool usiModeInSilent ()
static void setUsiSilent (bool silent=true)
static bool searchExactValueInOneReply ()
static void setSearchExactValueInOneReply (bool new_value)
static size_t residentMemoryUse ()
static size_t memoryUseLimit ()
static void setMemoryUseLimit (size_t limit)
static double memoryUseRatio ()
static bool isMemoryLimitEffective ()
static void setMemoryUsePercent (double limit)
static unsigned int evalRandom ()
static void setEvalRandom (unsigned int sigma)
static void setUsiOutputPawnValue (int new_value)
static int usiOutputPawnValue ()
static bool forceRootWindow ()
static std::pair< int, int > rootWindow ()
static void setRootWindow (int alpha, int beta)
static void resetRootWindow ()
static int inUnitTest ()
static bool inUnitTestShort ()
static bool inUnitTestLong ()
static void setInUnitTest (int new_value)
static void setUp ()
 標準の設定で評価関数等を初期化
static bool hasByoyomi ()
static void setHasByoyomi (bool)

Static Public Attributes

static const int MaxThreads = 16
static boost::mutex lock_io

Static Private Member Functions

static const std::string makeHome ()
static const std::string makeTest ()
static const std::string makeTestPublic ()
static bool isGoodDir (const std::string &)
static void trySetDir (std::string &, const std::string &)
static void showOslHome (const std::string &)

Private Attributes

static volatile bool usi_mode_silent = false
static bool has_byoyomi = false
static volatile int root_window_beta = 0

Static Private Attributes

static size_t memory_use_limit = system_memory_use_limit()
static double memory_use_percent = 100.0
static const size_t memory_use_limit_system_max
static unsigned int eval_random = 0
static bool is_verbose = false
static const int default_ncpus = osl::misc::ncores()
static int num_cpu = default_ncpus
static volatile bool usi_mode = false
static int usi_output_pawn_value = 100
static bool search_exact_value_in_one_reply = false
static volatile bool force_root_window = false
static volatile int root_window_alpha = 0
static volatile int in_unit_test = 0

Detailed Description

osl の実行環境に関する指定

Definition at line 15 of file oslConfig.h.


Member Function Documentation

static unsigned int osl::OslConfig::evalRandom ( ) [inline, static]
Returns:
standard deviation of normal distribution

Definition at line 74 of file oslConfig.h.

References eval_random.

Referenced by osl::game_playing::SearchPlayer::setUpTable().

static bool osl::OslConfig::forceRootWindow ( ) [inline, static]
const std::string osl::OslConfig::gpsusiConf ( ) [static]

Definition at line 245 of file oslConfig.cc.

bool osl::OslConfig::hasByoyomi ( ) [static]

Definition at line 173 of file oslConfig.cc.

const std::string & osl::OslConfig::home ( ) [static]
const char * osl::OslConfig::home_c_str ( ) [static]

Definition at line 240 of file oslConfig.cc.

static int osl::OslConfig::inUnitTest ( ) [inline, static]
Returns:
0 not testing, 1 short test, 2 long test

Definition at line 92 of file oslConfig.h.

References in_unit_test.

Referenced by osl::record::csa::InputStream::load().

static bool osl::OslConfig::inUnitTestLong ( ) [inline, static]

Definition at line 94 of file oslConfig.h.

References in_unit_test.

static bool osl::OslConfig::inUnitTestShort ( ) [inline, static]

Definition at line 93 of file oslConfig.h.

References in_unit_test.

bool osl::OslConfig::isGoodDir ( const std::string &  dir) [static, private]

Definition at line 194 of file oslConfig.cc.

static bool osl::OslConfig::isMemoryLimitEffective ( ) [inline, static]

Definition at line 61 of file oslConfig.h.

References memory_use_limit, memory_use_limit_system_max, and residentMemoryUse().

Referenced by search().

const std::string osl::OslConfig::makeHome ( ) [static, private]

Definition at line 211 of file oslConfig.cc.

References result, and verbose.

const std::string osl::OslConfig::makeTest ( ) [static, private]

Definition at line 262 of file oslConfig.cc.

References result.

const std::string osl::OslConfig::makeTestPublic ( ) [static, private]

Definition at line 275 of file oslConfig.cc.

References result.

static size_t osl::OslConfig::memoryUseLimit ( ) [inline, static]
static double osl::OslConfig::memoryUseRatio ( ) [inline, static]
int osl::OslConfig::numCPUs ( ) [static]

Definition at line 133 of file oslConfig.cc.

const char * osl::OslConfig::openingBook ( const std::string &  filenamme = "") [static]

標準の定跡ファイルを返す

Parameters:
filenamespecify to use non-standard file (absolute path, or home()/data/filename otherwise)

Definition at line 357 of file oslConfig.cc.

static void osl::OslConfig::resetRootWindow ( ) [inline, static]

Definition at line 90 of file oslConfig.h.

References force_root_window.

size_t osl::OslConfig::residentMemoryUse ( ) [static]

Definition at line 376 of file oslConfig.cc.

Referenced by isMemoryLimitEffective(), main(), and memoryUseRatio().

static std::pair<int,int> osl::OslConfig::rootWindow ( ) [inline, static]
bool osl::OslConfig::searchExactValueInOneReply ( ) [static]

Definition at line 164 of file oslConfig.cc.

Referenced by osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot().

static void osl::OslConfig::setEvalRandom ( unsigned int  sigma) [inline, static]

Definition at line 75 of file oslConfig.h.

References eval_random.

void osl::OslConfig::setHasByoyomi ( bool  value) [static]

Definition at line 178 of file oslConfig.cc.

static void osl::OslConfig::setInUnitTest ( int  new_value) [inline, static]

Definition at line 95 of file oslConfig.h.

References in_unit_test.

static void osl::OslConfig::setMemoryUseLimit ( size_t  limit) [inline, static]

Definition at line 56 of file oslConfig.h.

References limit, and memory_use_limit.

static void osl::OslConfig::setMemoryUsePercent ( double  limit) [inline, static]

Definition at line 66 of file oslConfig.h.

References limit, osl::eval::max(), memory_use_percent, and osl::eval::min().

void osl::OslConfig::setNumCPUs ( int  ncpu) [static]

Definition at line 124 of file oslConfig.cc.

References MaxThreads, and num_cpu.

static void osl::OslConfig::setRootWindow ( int  alpha,
int  beta 
) [inline, static]

Definition at line 84 of file oslConfig.h.

References force_root_window, root_window_alpha, and root_window_beta.

void osl::OslConfig::setSearchExactValueInOneReply ( bool  new_value) [static]

Definition at line 168 of file oslConfig.cc.

void osl::OslConfig::setUp ( ) [static]

標準の設定で評価関数等を初期化

Definition at line 421 of file oslConfig.cc.

References osl::progress::ml::NewProgress::setUp(), and osl::eval::ml::OpenMidEndingEval::setUp().

Referenced by osl_init().

void osl::OslConfig::setUsiMode ( bool  enable = true) [static]

Definition at line 152 of file oslConfig.cc.

static void osl::OslConfig::setUsiOutputPawnValue ( int  new_value) [inline, static]

Definition at line 77 of file oslConfig.h.

References usi_output_pawn_value.

void osl::OslConfig::setUsiSilent ( bool  silent = true) [static]
void osl::OslConfig::setVerbose ( bool  verbose) [static]

Definition at line 138 of file oslConfig.cc.

void osl::OslConfig::showOslHome ( ) [static]

Definition at line 189 of file oslConfig.cc.

void osl::OslConfig::showOslHome ( const std::string &  home) [static, private]

Definition at line 183 of file oslConfig.cc.

References OSL_WORDSIZE.

const char * osl::OslConfig::testCsaFile ( const std::string &  filename) [static]

Definition at line 347 of file oslConfig.cc.

const std::string osl::OslConfig::testPrivate ( ) [static]

テストケースのデータ

Definition at line 288 of file oslConfig.cc.

const char * osl::OslConfig::testPrivateFile ( const std::string &  filename) [static]

Definition at line 327 of file oslConfig.cc.

const std::string osl::OslConfig::testPublic ( ) [static]

Definition at line 294 of file oslConfig.cc.

const char * osl::OslConfig::testPublicFile ( const std::string &  filename) [static]

Definition at line 337 of file oslConfig.cc.

void osl::OslConfig::trySetDir ( std::string &  dir,
const std::string &  candidate 
) [static, private]

Definition at line 200 of file oslConfig.cc.

References verbose.

bool osl::OslConfig::usiMode ( ) [static]
bool osl::OslConfig::usiModeInSilent ( ) [static]

Definition at line 156 of file oslConfig.cc.

static int osl::OslConfig::usiOutputPawnValue ( ) [inline, static]
bool osl::OslConfig::verbose ( ) [static]

Definition at line 143 of file oslConfig.cc.

Referenced by osl::misc::BinaryElementReader< T >::State::tryRead().


Member Data Documentation

const int osl::OslConfig::default_ncpus = osl::misc::ncores() [static, private]

Definition at line 113 of file oslConfig.h.

unsigned int osl::OslConfig::eval_random = 0 [static, private]

Definition at line 111 of file oslConfig.h.

Referenced by evalRandom(), and setEvalRandom().

volatile bool osl::OslConfig::force_root_window = false [static, private]

Definition at line 118 of file oslConfig.h.

Referenced by forceRootWindow(), resetRootWindow(), and setRootWindow().

bool osl::OslConfig::has_byoyomi = false [private]

Definition at line 117 of file oslConfig.h.

volatile int osl::OslConfig::in_unit_test = 0 [static, private]

Definition at line 120 of file oslConfig.h.

Referenced by inUnitTest(), inUnitTestLong(), inUnitTestShort(), and setInUnitTest().

bool osl::OslConfig::is_verbose = false [static, private]

Definition at line 112 of file oslConfig.h.

boost::mutex osl::OslConfig::lock_io [static]
const int osl::OslConfig::MaxThreads = 16 [static]

Definition at line 17 of file oslConfig.h.

Referenced by setNumCPUs().

size_t osl::OslConfig::memory_use_limit = system_memory_use_limit() [static, private]

Definition at line 108 of file oslConfig.h.

Referenced by isMemoryLimitEffective(), memoryUseLimit(), and setMemoryUseLimit().

const size_t osl::OslConfig::memory_use_limit_system_max [static, private]
Initial value:

Definition at line 110 of file oslConfig.h.

Referenced by isMemoryLimitEffective().

double osl::OslConfig::memory_use_percent = 100.0 [static, private]

Definition at line 109 of file oslConfig.h.

Referenced by memoryUseLimit(), and setMemoryUsePercent().

int osl::OslConfig::num_cpu = default_ncpus [static, private]

Definition at line 114 of file oslConfig.h.

Referenced by setNumCPUs().

volatile int osl::OslConfig::root_window_alpha = 0 [static, private]

Definition at line 119 of file oslConfig.h.

Referenced by rootWindow(), and setRootWindow().

volatile int osl::OslConfig::root_window_beta = 0 [private]

Definition at line 119 of file oslConfig.h.

Referenced by rootWindow(), and setRootWindow().

bool osl::OslConfig::search_exact_value_in_one_reply = false [static, private]

Definition at line 117 of file oslConfig.h.

volatile bool osl::OslConfig::usi_mode = false [static, private]

Definition at line 115 of file oslConfig.h.

volatile bool osl::OslConfig::usi_mode_silent = false [private]

Definition at line 115 of file oslConfig.h.

int osl::OslConfig::usi_output_pawn_value = 100 [static, private]

Definition at line 116 of file oslConfig.h.

Referenced by setUsiOutputPawnValue(), and usiOutputPawnValue().


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