mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-26 12:06:22 +08:00
Avoid unnecessary string copies
closes https://github.com/official-stockfish/Stockfish/pull/4326 also fixes typo, closes https://github.com/official-stockfish/Stockfish/pull/4332 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
e9e7a7b83f
commit
4f4e652eca
@@ -106,7 +106,7 @@ namespace Stockfish::Eval::NNUE::Layers {
|
||||
|
||||
for (IndexType i = Start; i < InputDimensions; ++i) {
|
||||
output[i] = static_cast<OutputType>(
|
||||
// realy should be /127 but we need to make it fast
|
||||
// really should be /127 but we need to make it fast
|
||||
// needs to be accounted for in the trainer
|
||||
std::max(0ll, std::min(127ll, (((long long)input[i] * input[i]) >> (2 * WeightScaleBits)) / 128)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user