X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fthread.cpp;h=ec62c3ff760d21f90dddfcedb8882856733bc0c5;hp=c858817a7f1e011e4e4df26b9735bfb1ef9593fd;hb=f35e52f030af837ed8a89eecd67a6f746ee2e897;hpb=1c50d8cbf554733c0db6ab423b413d75cc0c1928 diff --git a/src/thread.cpp b/src/thread.cpp index c858817a..ec62c3ff 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -2,7 +2,7 @@ Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad - Copyright (C) 2015-2017 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad + Copyright (C) 2015-2018 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -62,9 +62,9 @@ void Thread::clear() { for (auto& to : contHistory) for (auto& h : to) - h.fill(0); + h.get()->fill(0); - contHistory[NO_PIECE][0].fill(Search::CounterMovePruneThreshold - 1); + contHistory[NO_PIECE][0].get()->fill(Search::CounterMovePruneThreshold - 1); } /// Thread::start_searching() wakes up the thread that will start the search @@ -147,7 +147,7 @@ void ThreadPool::clear() { main()->callsCnt = 0; main()->previousScore = VALUE_INFINITE; - main()->previousTimeReduction = 1; + main()->previousTimeReduction = 1.0; } /// ThreadPool::start_thinking() wakes up main thread waiting in idle_loop() and @@ -187,12 +187,10 @@ void ThreadPool::start_thinking(Position& pos, StateListPtr& states, for (Thread* th : *this) { - th->nodes = th->tbHits = 0; + th->nodes = th->tbHits = th->nmp_ply = th->nmp_odd = 0; th->rootDepth = th->completedDepth = DEPTH_ZERO; th->rootMoves = rootMoves; th->rootPos.set(pos.fen(), pos.is_chess960(), &setupStates->back(), th); - th->nmp_ply = 0; - th->pair = -1; } setupStates->back() = tmp;