Reformat code in little-endian patch

Reformat code and rename the function to "read_little_endian()" in the recent
commit by Ronald de Man for support of big endian systems.

closes https://github.com/official-stockfish/Stockfish/pull/3016

No functional change
-----

Recommended net: https://tests.stockfishchess.org/api/nn/nn-82215d0fd0df.nnue
This commit is contained in:
Stéphane Nicolet
2020-08-16 21:46:54 +02:00
parent 65572de4a7
commit 81d716f5cc
4 changed files with 27 additions and 25 deletions
+2 -2
View File
@@ -56,9 +56,9 @@ namespace Eval::NNUE {
// Read network parameters
bool ReadParameters(std::istream& stream) {
for (std::size_t i = 0; i < kHalfDimensions; ++i)
biases_[i] = read_le<BiasType>(stream);
biases_[i] = read_little_endian<BiasType>(stream);
for (std::size_t i = 0; i < kHalfDimensions * kInputDimensions; ++i)
weights_[i] = read_le<WeightType>(stream);
weights_[i] = read_little_endian<WeightType>(stream);
return !stream.fail();
}