Skip to content

Commit

Permalink
Remove redundant int cast
Browse files Browse the repository at this point in the history
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 #4961

No functional change
  • Loading branch information
FauziAkram authored and Disservin committed Jan 4, 2024
1 parent b987d4f commit 8b4583b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nnue/nnue_architecture.h
Expand Up @@ -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
// quantized form, but we want 1.0 to be equal to 600*OutputScale
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;

return outputValue;
Expand Down

0 comments on commit 8b4583b

Please sign in to comment.