1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 19:49:14 +00:00

Remove redundant const qualifiers

The const qualifiers are already implied by the constexpr qualifiers.

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

No functional change
This commit is contained in:
Sebastian Buchwald 2023-01-25 22:04:02 +01:00 committed by Joost VandeVondele
parent 2167942b6e
commit 2f67409506

View file

@ -179,33 +179,33 @@ namespace Stockfish::Eval::NNUE::Layers {
static_assert(PaddedInputDimensions >= LargeInputSize, "Something went wrong. This specialization should not have been chosen."); static_assert(PaddedInputDimensions >= LargeInputSize, "Something went wrong. This specialization should not have been chosen.");
#if defined (USE_AVX512) #if defined (USE_AVX512)
static constexpr const IndexType InputSimdWidth = 64; static constexpr IndexType InputSimdWidth = 64;
static constexpr const IndexType MaxNumOutputRegs = 16; static constexpr IndexType MaxNumOutputRegs = 16;
#elif defined (USE_AVX2) #elif defined (USE_AVX2)
static constexpr const IndexType InputSimdWidth = 32; static constexpr IndexType InputSimdWidth = 32;
static constexpr const IndexType MaxNumOutputRegs = 8; static constexpr IndexType MaxNumOutputRegs = 8;
#elif defined (USE_SSSE3) #elif defined (USE_SSSE3)
static constexpr const IndexType InputSimdWidth = 16; static constexpr IndexType InputSimdWidth = 16;
static constexpr const IndexType MaxNumOutputRegs = 8; static constexpr IndexType MaxNumOutputRegs = 8;
#elif defined (USE_NEON) #elif defined (USE_NEON)
static constexpr const IndexType InputSimdWidth = 8; static constexpr IndexType InputSimdWidth = 8;
static constexpr const IndexType MaxNumOutputRegs = 8; static constexpr IndexType MaxNumOutputRegs = 8;
#else #else
// The fallback implementation will not have permuted weights. // The fallback implementation will not have permuted weights.
// We define these to avoid a lot of ifdefs later. // We define these to avoid a lot of ifdefs later.
static constexpr const IndexType InputSimdWidth = 1; static constexpr IndexType InputSimdWidth = 1;
static constexpr const IndexType MaxNumOutputRegs = 1; static constexpr IndexType MaxNumOutputRegs = 1;
#endif #endif
// A big block is a region in the weight matrix of the size [PaddedInputDimensions, NumOutputRegs]. // A big block is a region in the weight matrix of the size [PaddedInputDimensions, NumOutputRegs].
// A small block is a region of size [InputSimdWidth, 1] // A small block is a region of size [InputSimdWidth, 1]
static constexpr const IndexType NumOutputRegs = std::min(MaxNumOutputRegs, OutputDimensions); static constexpr IndexType NumOutputRegs = std::min(MaxNumOutputRegs, OutputDimensions);
static constexpr const IndexType SmallBlockSize = InputSimdWidth; static constexpr IndexType SmallBlockSize = InputSimdWidth;
static constexpr const IndexType BigBlockSize = NumOutputRegs * PaddedInputDimensions; static constexpr IndexType BigBlockSize = NumOutputRegs * PaddedInputDimensions;
static constexpr const IndexType NumSmallBlocksInBigBlock = BigBlockSize / SmallBlockSize; static constexpr IndexType NumSmallBlocksInBigBlock = BigBlockSize / SmallBlockSize;
static constexpr const IndexType NumSmallBlocksPerOutput = PaddedInputDimensions / SmallBlockSize; static constexpr IndexType NumSmallBlocksPerOutput = PaddedInputDimensions / SmallBlockSize;
static constexpr const IndexType NumBigBlocks = OutputDimensions / NumOutputRegs; static constexpr IndexType NumBigBlocks = OutputDimensions / NumOutputRegs;
static_assert(OutputDimensions % NumOutputRegs == 0); static_assert(OutputDimensions % NumOutputRegs == 0);
@ -396,8 +396,8 @@ namespace Stockfish::Eval::NNUE::Layers {
static_assert(PaddedInputDimensions < LargeInputSize, "Something went wrong. This specialization should not have been chosen."); static_assert(PaddedInputDimensions < LargeInputSize, "Something went wrong. This specialization should not have been chosen.");
#if defined (USE_SSSE3) #if defined (USE_SSSE3)
static constexpr const IndexType OutputSimdWidth = SimdWidth / 4; static constexpr IndexType OutputSimdWidth = SimdWidth / 4;
static constexpr const IndexType InputSimdWidth = SimdWidth; static constexpr IndexType InputSimdWidth = SimdWidth;
#endif #endif
// Hash value embedded in the evaluation file // Hash value embedded in the evaluation file