X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=121575f554525c6a2b13b52140a7d4d6fa2f86b6;hp=5a4b56ba45ae2383bed345969d93432db8442f98;hb=efeb37c33f15a903dbe5706529a7a26511e9ca58;hpb=c28b9ef182b4a0c3d0483654ebc2b2aca4fc731c diff --git a/src/search.cpp b/src/search.cpp index 5a4b56ba..121575f5 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -59,6 +59,10 @@ namespace { // Used for debugging SMP code. const bool FakeSplit = false; + // Fast lookup table of sliding pieces indexed by Piece + const bool Slidings[18] = { 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1 }; + inline bool piece_is_slider(Piece p) { return Slidings[p]; } + // ThreadsManager class is used to handle all the threads related stuff in search, // init, starting, parking and, the most important, launching a slave thread at a // split point are what this class does. All the access to shared thread data is @@ -1932,7 +1936,7 @@ split_point_start: // At split points actual search starts from here int t = current_search_time(); // Poll for input - if (Bioskey()) + if (data_available()) { // We are line oriented, don't read single chars std::string command; @@ -2320,7 +2324,7 @@ split_point_start: // At split points actual search starts from here if (!ok) { cout << "Failed to create thread number " << i << endl; - Application::exit_with_failure(); + exit(EXIT_FAILURE); } // Wait until the thread has finished launching and is gone to sleep