mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 08:37:44 +00:00
Remove redundant int cast
Remove a redundant int cast in the calculation of fwdOut. The variable OutputType is already defined as std::int32_t, which is an integer type, making the cast unnecessary. closes https://github.com/official-stockfish/Stockfish/pull/4961 No functional change
This commit is contained in:
@@ -116,7 +116,7 @@ struct Network {
|
|||||||
// buffer.fc_0_out[FC_0_OUTPUTS] is such that 1.0 is equal to 127*(1<<WeightScaleBits) in
|
// buffer.fc_0_out[FC_0_OUTPUTS] is such that 1.0 is equal to 127*(1<<WeightScaleBits) in
|
||||||
// quantized form, but we want 1.0 to be equal to 600*OutputScale
|
// quantized form, but we want 1.0 to be equal to 600*OutputScale
|
||||||
std::int32_t fwdOut =
|
std::int32_t fwdOut =
|
||||||
int(buffer.fc_0_out[FC_0_OUTPUTS]) * (600 * OutputScale) / (127 * (1 << WeightScaleBits));
|
(buffer.fc_0_out[FC_0_OUTPUTS]) * (600 * OutputScale) / (127 * (1 << WeightScaleBits));
|
||||||
std::int32_t outputValue = buffer.fc_2_out[0] + fwdOut;
|
std::int32_t outputValue = buffer.fc_2_out[0] + fwdOut;
|
||||||
|
|
||||||
return outputValue;
|
return outputValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user