/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2022 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2023 The Stockfish developers (see AUTHORS file)
Stockfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
}
// Forward propagation
- const OutputType* propagate(
+ void propagate(
const InputType* input, OutputType* output) const {
#if defined(USE_AVX2)
output[i] = static_cast<OutputType>(
std::max(0, std::min(127, input[i] >> WeightScaleBits)));
}
-
- // Affine transform layers expect that there is at least
- // ceil_to_multiple(OutputDimensions, 32) initialized values.
- // We cannot do this in the affine transform because it requires
- // preallocating space here.
- for (IndexType i = OutputDimensions; i < PaddedOutputDimensions; ++i) {
- output[i] = 0;
- }
-
- return output;
}
};