X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fnnue%2Fevaluate_nnue.cpp;h=ef6b7e91a606c14056c1de3cd261039bd3832ab4;hb=ec02714b6262e26d6f96c45c4e2527f3d382a9f8;hp=679192d471047a96ea331786a54cbcdc83aa8dbc;hpb=2d0237db3f0e596fb06e3ffbadba84dcc4e018f6;p=stockfish diff --git a/src/nnue/evaluate_nnue.cpp b/src/nnue/evaluate_nnue.cpp index 679192d4..ef6b7e91 100644 --- a/src/nnue/evaluate_nnue.cpp +++ b/src/nnue/evaluate_nnue.cpp @@ -116,7 +116,7 @@ static bool read_header(std::istream& stream, std::uint32_t* hashValue, std::str static bool write_header(std::ostream& stream, std::uint32_t hashValue, const std::string& desc) { write_little_endian(stream, Version); write_little_endian(stream, hashValue); - write_little_endian(stream, (std::uint32_t) desc.size()); + write_little_endian(stream, std::uint32_t(desc.size())); stream.write(&desc[0], desc.size()); return !stream.fail(); } @@ -233,7 +233,7 @@ static NnueEvalTrace trace_evaluate(const Position& pos) { constexpr std::string_view PieceToChar(" PNBRQK pnbrqk"); -// format_cp_compact() converts a Value into (centi)pawns and writes it in a buffer. +// Converts a Value into (centi)pawns and writes it in a buffer. // The buffer must have capacity for at least 5 chars. static void format_cp_compact(Value v, char* buffer) { @@ -270,7 +270,7 @@ static void format_cp_compact(Value v, char* buffer) { } -// format_cp_aligned_dot() converts a Value into pawns, always keeping two decimals +// Converts a Value into pawns, always keeping two decimals static void format_cp_aligned_dot(Value v, std::stringstream& stream) { const double pawns = std::abs(0.01 * UCI::to_cp(v)); @@ -282,7 +282,7 @@ static void format_cp_aligned_dot(Value v, std::stringstream& stream) { } -// trace() returns a string with the value of each piece on a board, +// Returns a string with the value of each piece on a board, // and a table for (PSQT, Layers) values bucket by bucket. std::string trace(Position& pos) { @@ -407,8 +407,8 @@ bool save_eval(const std::optional& filename) { { if (currentEvalFileName != EvalFileDefaultName) { - msg = - "Failed to export a net. A non-embedded net can only be saved if the filename is specified"; + msg = "Failed to export a net. " + "A non-embedded net can only be saved if the filename is specified"; sync_cout << msg << sync_endl; return false;