diff --git a/src/Native/include/nncase/kernels/stackvm/resize_image.h b/src/Native/include/nncase/kernels/stackvm/resize_image.h index 72ff9a69d9..820a05feca 100644 --- a/src/Native/include/nncase/kernels/stackvm/resize_image.h +++ b/src/Native/include/nncase/kernels/stackvm/resize_image.h @@ -72,7 +72,7 @@ get_nearest_pixel_from_origin(image_resize_nearest_mode_t nearest_mode) { switch (nearest_mode) { case image_resize_nearest_mode_t::round_prefer_ceil: return [](float x_original) { - return static_cast(std::round(x_original)); + return static_cast(roundf(x_original)); }; case image_resize_nearest_mode_t::floor: return [](float x_original) { @@ -88,7 +88,7 @@ get_nearest_pixel_from_origin(image_resize_nearest_mode_t nearest_mode) { if (x_original == static_cast(x_original) + 0.5f) { return static_cast(std::floor(x_original)); } - return static_cast(std::round(x_original)); + return static_cast(roundf(x_original)); }; } } \ No newline at end of file