Skip to content

Commit

Permalink
Fix compile error in xuantie
Browse files Browse the repository at this point in the history
  • Loading branch information
lerenhua committed Aug 31, 2023
1 parent 71efd2c commit cf88e72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Native/include/nncase/kernels/stackvm/resize_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<int64_t>(std::round(x_original));
return static_cast<int64_t>(roundf(x_original));
};
case image_resize_nearest_mode_t::floor:
return [](float x_original) {
Expand All @@ -88,7 +88,7 @@ get_nearest_pixel_from_origin(image_resize_nearest_mode_t nearest_mode) {
if (x_original == static_cast<int64_t>(x_original) + 0.5f) {
return static_cast<int64_t>(std::floor(x_original));
}
return static_cast<int64_t>(std::round(x_original));
return static_cast<int64_t>(roundf(x_original));
};
}
}

0 comments on commit cf88e72

Please sign in to comment.