X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fthread.h;h=f530913cf22017f21fa49a2ca812dc6861b5439c;hp=949f87ad28ae086fe75e0577b98e859029cfc4ed;hb=9369f4963d9376820cb5ca4bad66b86e67b0a010;hpb=d65f75c1532536f11a2dfbc0263c55e1beb88c2b diff --git a/src/thread.h b/src/thread.h index 949f87ad..f530913c 100644 --- a/src/thread.h +++ b/src/thread.h @@ -31,9 +31,9 @@ struct Thread; -const int MAX_THREADS = 128; -const int MAX_SPLITPOINTS_PER_THREAD = 8; -const int MAX_SLAVES_PER_SPLITPOINT = 4; +const size_t MAX_THREADS = 128; +const size_t MAX_SPLITPOINTS_PER_THREAD = 8; +const size_t MAX_SLAVES_PER_SPLITPOINT = 4; /// Mutex and ConditionVariable struct are wrappers of the low level locking /// machinery and are modeled after the corresponding C++11 classes. @@ -72,8 +72,7 @@ struct SplitPoint { // Const data after split point has been setup const Position* pos; Search::Stack* ss; - Thread* masterThread; - int spLevel; + Thread* master; Depth depth; Value beta; int nodeType; @@ -86,7 +85,6 @@ struct SplitPoint { // Shared variable data Mutex mutex; std::bitset slavesMask; - int slavesCount; volatile bool allSlavesSearching; volatile uint64_t nodes; volatile Value alpha; @@ -138,7 +136,7 @@ struct Thread : public ThreadBase { size_t idx; int maxPly; SplitPoint* volatile activeSplitPoint; - volatile int splitPointsSize; + volatile size_t splitPointsSize; volatile bool searching; };