mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 19:16:49 +08:00
fix annoying warning
This commit is contained in:
@@ -323,17 +323,23 @@ namespace Eval::NNUE {
|
||||
const IndexType output_offset = kOutputDimensions * b;
|
||||
|
||||
IndexType i = 0;
|
||||
for (; i < Offset; ++i) {
|
||||
gradients_[input_offset + i] = static_cast<LearnFloatType>(0.0);
|
||||
if constexpr (Offset > 0)
|
||||
{
|
||||
for (; i < Offset; ++i) {
|
||||
gradients_[input_offset + i] = static_cast<LearnFloatType>(0.0);
|
||||
}
|
||||
}
|
||||
|
||||
for (; i < Offset + kOutputDimensions; ++i) {
|
||||
gradients_[input_offset + i] = gradients[output_offset + i - Offset];
|
||||
}
|
||||
|
||||
for (; i < kInputDimensions; ++i)
|
||||
if constexpr (Offset + kOutputDimensions < kInputDimensions)
|
||||
{
|
||||
gradients_[input_offset + i] = static_cast<LearnFloatType>(0.0);
|
||||
for (; i < kInputDimensions; ++i)
|
||||
{
|
||||
gradients_[input_offset + i] = static_cast<LearnFloatType>(0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user