From 10100b218196c466d103baa5c77d133aee5a4443 Mon Sep 17 00:00:00 2001 From: HiraokaTakuya Date: Tue, 24 Nov 2015 18:32:44 +0900 Subject: [PATCH] =?UTF-8?q?Windows=E7=89=88=E3=83=90=E3=82=A4=E3=83=8A?= =?UTF-8?q?=E3=83=AA=E9=85=8D=E5=B8=83=E7=94=A8=E8=A8=AD=E5=AE=9A=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit boost無しでビルド可能にもしておく。 --- src/common.hpp | 7 ++++--- src/evaluate.hpp | 4 ++-- src/usi.cpp | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/common.hpp b/src/common.hpp index 2902646..05a7ac8 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -30,7 +30,7 @@ #include #include #include -#include +//#include #if defined HAVE_BMI2 #include @@ -251,7 +251,7 @@ using Key = u64; template struct HashTable { HashTable() { - entries_ = (T*)(boost::alignment::aligned_alloc(sizeof(T), sizeof(T)*Size)); + //entries_ = (T*)(boost::alignment::aligned_alloc(sizeof(T), sizeof(T)*Size)); clear(); } T* operator [] (const Key k) { return entries_ + (static_cast(k) & (Size-1)); } @@ -260,7 +260,8 @@ struct HashTable { static_assert((Size & (Size-1)) == 0, ""); private: - T* entries_; + //T* entries_; + T entries_[Size]; }; // ミリ秒単位の時間を表すクラス diff --git a/src/evaluate.hpp b/src/evaluate.hpp index 656d09a..bf35b7c 100644 --- a/src/evaluate.hpp +++ b/src/evaluate.hpp @@ -1143,8 +1143,8 @@ class Position; struct SearchStack; #if defined USE_EHASH -//const size_t EvaluateTableSize = 0x400000; // 134MB -const size_t EvaluateTableSize = 0x10000000; // 8GB +const size_t EvaluateTableSize = 0x400000; // 134MB +//const size_t EvaluateTableSize = 0x10000000; // 8GB //const size_t EvaluateTableSize = 0x20000000; // 17GB using EvaluateHashEntry = EvalSum; diff --git a/src/usi.cpp b/src/usi.cpp index 5fb4699..53c45a7 100644 --- a/src/usi.cpp +++ b/src/usi.cpp @@ -68,7 +68,7 @@ namespace { } void OptionsMap::init(Searcher* s) { - (*this)["USI_Hash"] = USIOption(32, 1, 65536, onHashSize, s); + (*this)["USI_Hash"] = USIOption(256, 1, 65536, onHashSize, s); (*this)["Clear_Hash"] = USIOption(onClearHash, s); (*this)["Book_File"] = USIOption("book/20150503/book.bin"); (*this)["Best_Book_Move"] = USIOption(false);