Skip to content
Snippets Groups Projects
Commit b76f5494 authored by Mickael GUIBERT's avatar Mickael GUIBERT Committed by Axel Farrugia
Browse files

[Fix] Suppress constexpr and simplified the choice of rounding

parent b894cce4
No related branches found
No related tags found
No related merge requests found
...@@ -116,11 +116,9 @@ void pooling_forward( ...@@ -116,11 +116,9 @@ void pooling_forward(
} }
} }
if constexpr (std::is_integral<Output_T>::value) { outputs[oOffset + output] = static_cast<Output_T>(
outputs[oOffset + output] = (Output_T) std::round((float)sum / (POOL_HEIGHT * POOL_WIDTH)); std::is_integral<Output_T>::value ? std::round((float)sum / (POOL_HEIGHT * POOL_WIDTH)) : sum / (POOL_HEIGHT * POOL_WIDTH)
} else { );
outputs[oOffset + output] = (Output_T) (sum / (POOL_HEIGHT * POOL_WIDTH));
}
} }
else { else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment