1
0
Fork 0

Small clean-up, Sept 2021

Closes https://github.com/official-stockfish/Stockfish/pull/3485

No functional change
pull/3734/head
xoto10 2021-05-27 16:04:47 +01:00 committed by Stéphane Nicolet
parent 54a989930e
commit f21a66f70d
7 changed files with 15 additions and 15 deletions

View File

@ -21,6 +21,7 @@ Alexander Kure
Alexander Pagel (Lolligerhans)
Alfredo Menezes (lonfom169)
Ali AlZhrani (Cooffe)
Andrei Vetrov (proukornew)
Andrew Grant (AndyGrant)
Andrey Neporada (nepal)
Andy Duplain

View File

@ -88,7 +88,7 @@ endif
# at the end of the line for flag values.
#
# Example of use for these flags:
# make build ARCH=x86-64-avx512 debug=on sanitize="address undefined"
# make build ARCH=x86-64-avx512 debug=yes sanitize="address undefined"
### 2.1. General and architecture defaults
@ -517,7 +517,7 @@ ifeq ($(bits),64)
CXXFLAGS += -DIS_64BIT
endif
### 3.5 prefetch
### 3.5 prefetch and popcount
ifeq ($(prefetch),yes)
ifeq ($(sse),yes)
CXXFLAGS += -msse
@ -526,7 +526,6 @@ else
CXXFLAGS += -DNO_PREFETCH
endif
### 3.6 popcnt
ifeq ($(popcnt),yes)
ifeq ($(arch),$(filter $(arch),ppc64 armv7 armv8 arm64))
CXXFLAGS += -DUSE_POPCNT
@ -537,6 +536,7 @@ ifeq ($(popcnt),yes)
endif
endif
### 3.6 SIMD architectures
ifeq ($(avx2),yes)
CXXFLAGS += -DUSE_AVX2
ifeq ($(comp),$(filter $(comp),gcc clang mingw))

View File

@ -61,7 +61,7 @@ namespace Stockfish {
namespace Eval {
bool useNNUE;
string eval_file_loaded = "None";
string currentEvalFileName = "None";
/// NNUE::init() tries to load a NNUE network at startup time, or when the engine
/// receives a UCI command "setoption name EvalFile value nn-[a-z0-9]{12}.nnue"
@ -90,13 +90,13 @@ namespace Eval {
#endif
for (string directory : dirs)
if (eval_file_loaded != eval_file)
if (currentEvalFileName != eval_file)
{
if (directory != "<internal>")
{
ifstream stream(directory + eval_file, ios::binary);
if (load_eval(eval_file, stream))
eval_file_loaded = eval_file;
currentEvalFileName = eval_file;
}
if (directory == "<internal>" && eval_file == EvalFileDefaultName)
@ -111,7 +111,7 @@ namespace Eval {
istream stream(&buffer);
if (load_eval(eval_file, stream))
eval_file_loaded = eval_file;
currentEvalFileName = eval_file;
}
}
}
@ -123,7 +123,7 @@ namespace Eval {
if (eval_file.empty())
eval_file = EvalFileDefaultName;
if (useNNUE && eval_file_loaded != eval_file)
if (useNNUE && currentEvalFileName != eval_file)
{
string msg1 = "If the UCI option \"Use NNUE\" is set to true, network evaluation parameters compatible with the engine must be available.";
@ -1081,7 +1081,7 @@ Value Eval::evaluate(const Position& pos) {
Value v;
if (!Eval::useNNUE)
if (!useNNUE)
v = Evaluation<NO_TRACE>(pos).value();
else
{

View File

@ -34,7 +34,7 @@ namespace Eval {
Value evaluate(const Position& pos);
extern bool useNNUE;
extern std::string eval_file_loaded;
extern std::string currentEvalFileName;
// The default net name MUST follow the format nn-[SHA256 first 12 digits].nnue
// for the build process (profile-build and fishtest) to work. Do not change the

View File

@ -89,8 +89,8 @@ enum StatsType { NoCaptures, Captures };
typedef Stats<int16_t, 13365, COLOR_NB, int(SQUARE_NB) * int(SQUARE_NB)> ButterflyHistory;
/// At higher depths LowPlyHistory records successful quiet moves near the root
/// and quiet moves which are/were in the PV (ttPv). It is cleared with each new
/// search and filled during iterative deepening.
/// and quiet moves which are/were in the PV (ttPv). LowPlyHistory is populated during
/// iterative deepening and at each new search the data is shifted down by 2 plies
constexpr int MAX_LPH = 4;
typedef Stats<int16_t, 10692, MAX_LPH, int(SQUARE_NB) * int(SQUARE_NB)> LowPlyHistory;

View File

@ -396,7 +396,7 @@ namespace Stockfish::Eval::NNUE {
actualFilename = filename.value();
else
{
if (eval_file_loaded != EvalFileDefaultName)
if (currentEvalFileName != EvalFileDefaultName)
{
msg = "Failed to export a net. A non-embedded net can only be saved if the filename is specified";

View File

@ -790,7 +790,6 @@ namespace {
else
{
// In case of null move search use previous static eval with a different sign
// and addition of two tempos
if ((ss-1)->currentMove != MOVE_NULL)
ss->staticEval = eval = evaluate(pos);
else
@ -1187,6 +1186,7 @@ moves_loop: // When in check, search starts here
{
Depth r = reduction(improving, depth, moveCount, rangeReduction > 2);
// Decrease reduction if on the PV (~1 Elo)
if (PvNode)
r--;
@ -1499,7 +1499,6 @@ moves_loop: // When in check, search starts here
}
else
// In case of null move search use previous static eval with a different sign
// and addition of two tempos
ss->staticEval = bestValue =
(ss-1)->currentMove != MOVE_NULL ? evaluate(pos)
: -(ss-1)->staticEval;