Skip to content

Commit 0b49129

Browse files
author
protonspring
committed
new threads.
1 parent 4b88bea commit 0b49129

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/search.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ namespace {
6161
// Different node types, used as a template parameter
6262
enum NodeType { NonPV, PV };
6363

64-
// Sizes and phases of the skip-blocks, used for distributing search depths across the threads
65-
constexpr int SkipSize[] = { 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4 };
66-
constexpr int SkipPhase[] = { 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7 };
67-
6864
// Razor and futility margins
6965
constexpr int RazorMargin = 600;
7066
Value futility_margin(Depth d, bool improving) {
@@ -353,9 +349,9 @@ void Thread::search() {
353349
// Distribute search depths across the helper threads
354350
if (idx > 0)
355351
{
356-
int i = (idx - 1) % 20;
357-
if (((rootDepth / ONE_PLY + SkipPhase[i]) / SkipSize[i]) % 2)
358-
continue; // Retry with an incremented rootDepth
352+
static int bits = 0x4C70F1CD;
353+
if ((bits >> ((idx + rootDepth / ONE_PLY)%32)) & 1)
354+
continue;
359355
}
360356

361357
// Age out PV variability metric

0 commit comments

Comments
 (0)