1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 11:39:15 +00:00
BadFish/src/nnue
syzygy1 72dc7a5c54 Assume network file is in little-endian byte order
This patch fixes the byte order when reading 16- and 32-bit values from the network file on a big-endian machine.

Bytes are ordered in read_le() using unsigned arithmetic, which doesn't need tricks to determine the endianness of the machine. Unfortunately the compiler doesn't seem to be able to optimise the ordering operation, but reading in the weights is not a time-critical operation and the extra time it takes should not be noticeable.

Big endian systems are still untested with NNUE.

fixes #3007

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

No functional change.
2020-08-16 21:10:26 +02:00
..
architectures Add NNUE evaluation 2020-08-06 16:37:45 +02:00
features Add NNUE evaluation 2020-08-06 16:37:45 +02:00
layers Assume network file is in little-endian byte order 2020-08-16 21:10:26 +02:00
evaluate_nnue.cpp Assume network file is in little-endian byte order 2020-08-16 21:10:26 +02:00
evaluate_nnue.h Add NNUE evaluation 2020-08-06 16:37:45 +02:00
nnue_accumulator.h Cleanup and optimize SSE/AVX code 2020-08-10 14:38:17 +02:00
nnue_architecture.h Add NNUE evaluation 2020-08-06 16:37:45 +02:00
nnue_common.h Assume network file is in little-endian byte order 2020-08-16 21:10:26 +02:00
nnue_feature_transformer.h Assume network file is in little-endian byte order 2020-08-16 21:10:26 +02:00