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

View File

@@ -63,9 +63,9 @@ namespace Eval::NNUE::Layers {
bool ReadParameters(std::istream& stream) {
if (!previous_layer_.ReadParameters(stream)) return false;
for (std::size_t i = 0; i < kOutputDimensions; ++i)
biases_[i] = read_le<BiasType>(stream);
biases_[i] = read_little_endian<BiasType>(stream);
for (std::size_t i = 0; i < kOutputDimensions * kPaddedInputDimensions; ++i)
weights_[i] = read_le<WeightType>(stream);
weights_[i] = read_little_endian<WeightType>(stream);
return !stream.fail();
}