From ac948b52f8e7802f961f92c9b0fa9bb651fb3c31 Mon Sep 17 00:00:00 2001 From: Dmitry Vedenko Date: Mon, 2 Oct 2023 13:19:26 +0300 Subject: [PATCH] Fix the ARM Neon build --- libraries/lib-time-and-pitch/StaffPad/SimdTypes_neon.h | 7 +++++++ libraries/lib-time-and-pitch/StaffPad/SimdTypes_scalar.h | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/libraries/lib-time-and-pitch/StaffPad/SimdTypes_neon.h b/libraries/lib-time-and-pitch/StaffPad/SimdTypes_neon.h index 72cc2243e072..7bc3c3d49533 100644 --- a/libraries/lib-time-and-pitch/StaffPad/SimdTypes_neon.h +++ b/libraries/lib-time-and-pitch/StaffPad/SimdTypes_neon.h @@ -14,6 +14,8 @@ #define __vecc #endif +#include + namespace staffpad::audio::simd { struct float_x4 @@ -141,6 +143,11 @@ __finl float_x4 __vecc sqrt(const float_x4 &a) return vsqrtq_f32(a.s); } +__finl float __vecc rint(float a) +{ + return std::rint(a); +} + __finl float_x4 __vecc rint(const float_x4 &a) { return vrndnq_f32(a.s); diff --git a/libraries/lib-time-and-pitch/StaffPad/SimdTypes_scalar.h b/libraries/lib-time-and-pitch/StaffPad/SimdTypes_scalar.h index decb4ff34da0..f600cb7499fc 100644 --- a/libraries/lib-time-and-pitch/StaffPad/SimdTypes_scalar.h +++ b/libraries/lib-time-and-pitch/StaffPad/SimdTypes_scalar.h @@ -96,6 +96,11 @@ __finl float_x4 __vecc sqrt(const float_x4 &a) return {std::sqrt(a[0]), std::sqrt(a[1]), std::sqrt(a[2]), std::sqrt(a[3])}; } +__finl float __vecc rint(float a) +{ + return std::rint(a); +} + __finl float_x4 __vecc rint(const float_x4 &a) { return {std::rint(a[0]), std::rint(a[1]), std::rint(a[2]), std::rint(a[3])};