Sparse impl of affine_transform_non_ssse3()

deal with the general case

About a 8.6% speedup (for general arch)

Results for 200 tests for each version:

            Base      Test      Diff
    Mean    141741    153998    -12257
    StDev   2990      3042      3742

p-value: 0.999
speedup: 0.086

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

No functional change
This commit is contained in:
mstembera
2023-09-22 19:03:47 +02:00
committed by Joost VandeVondele
parent 0e32287af4
commit 97f706ecc1
4 changed files with 21 additions and 13 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ namespace Stockfish::Eval::NNUE::Layers {
for (IndexType i = Start; i < InputDimensions; ++i) {
output[i] = static_cast<OutputType>(
std::max(0, std::min(127, input[i] >> WeightScaleBits)));
std::clamp(input[i] >> WeightScaleBits, 0, 127));
}
}
};