From 07b3797c3c6312d7a57f31ce1fe35386b0c25311 Mon Sep 17 00:00:00 2001 From: bhalimi <benjamin.halimi@cea.fr> Date: Tue, 29 Apr 2025 14:59:56 +0000 Subject: [PATCH] use INFINITY instead of (inputValue + 1) --- include/aidge/backend/cpu/operator/RoundImpl_kernels.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/aidge/backend/cpu/operator/RoundImpl_kernels.hpp b/include/aidge/backend/cpu/operator/RoundImpl_kernels.hpp index 50c83f4c..6abf4575 100644 --- a/include/aidge/backend/cpu/operator/RoundImpl_kernels.hpp +++ b/include/aidge/backend/cpu/operator/RoundImpl_kernels.hpp @@ -41,7 +41,7 @@ void RoundImpl_cpu_forward_kernel( output[i] = static_cast<O>(std::round(inputValue)); } else if (mode == Round_Op::HalfwayRounding::NextInteger) { - output[i] = static_cast<O>(std::round(std::nextafter(inputValue, inputValue + 1))); + output[i] = static_cast<O>(std::round(std::nextafter(inputValue, +INFINITY))); } } } -- GitLab