Skip to content

Commit

Permalink
Make twsearch default to the thread count on the machine.
Browse files Browse the repository at this point in the history
  • Loading branch information
rokicki committed Oct 7, 2023
1 parent 305857c commit 38e0310
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cpp/twsearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <iostream>
#include <math.h>
#include <sstream>
#include <thread>
#include <vector>
using namespace std;
int checkbeforesolve;
Expand Down Expand Up @@ -136,7 +137,7 @@ void reseteverything() {
didprepass = 0;
scramblemoves = 1;
#ifdef USE_PTHREADS
numthreads = 4;
numthreads = min((unsigned int)MAXTHREADS, thread::hardware_concurrency());
#else
numthreads = 1;
#endif
Expand Down

0 comments on commit 38e0310

Please sign in to comment.