mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 01:27:16 +08:00
Allow a slave to 'late join' another splitpoint
Instead of waiting to be allocated, actively search for another split point to join when finishes its search. Also modify split conditions. This patch has been tested with 7 threads SMP and passed both STC: LLR: 2.97 (-2.94,2.94) [-1.50,4.50] Total: 2885 W: 519 L: 410 D: 1956 And a reduced-LTC at 25+0.05 LLR: 2.95 (-2.94,2.94) [0.00,6.00] Total: 4401 W: 684 L: 566 D: 3151 Was then retested against regression in 3 thread case at standard LTC of 60+0.05: LLR: 2.96 (-2.94,2.94) [-4.00,0.00] Total: 40809 W: 5446 L: 5406 D: 29957 bench: 8802105
This commit is contained in:
committed by
Marco Costalba
parent
8f6a494ad7
commit
f6e98a924a
@@ -77,6 +77,7 @@ struct SplitPoint {
|
||||
// Shared data
|
||||
Mutex mutex;
|
||||
std::bitset<MAX_THREADS> slavesMask;
|
||||
volatile bool allowLatejoin;
|
||||
volatile uint64_t nodes;
|
||||
volatile Value alpha;
|
||||
volatile Value bestValue;
|
||||
@@ -113,8 +114,9 @@ struct Thread : public ThreadBase {
|
||||
|
||||
Thread();
|
||||
virtual void idle_loop();
|
||||
bool attempt_to_latejoin();
|
||||
bool cutoff_occurred() const;
|
||||
bool available_to(const Thread* master) const;
|
||||
bool available_to(const Thread* master, bool latejoin) const;
|
||||
|
||||
template <bool Fake>
|
||||
void split(Position& pos, const Search::Stack* ss, Value alpha, Value beta, Value* bestValue, Move* bestMove,
|
||||
|
||||
Reference in New Issue
Block a user