diff options
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/files/0001-use-fully-qualified-rkcommon-math-rsqrt-to-avoid-ove.patch')
| -rw-r--r-- | dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/files/0001-use-fully-qualified-rkcommon-math-rsqrt-to-avoid-ove.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/files/0001-use-fully-qualified-rkcommon-math-rsqrt-to-avoid-ove.patch b/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/files/0001-use-fully-qualified-rkcommon-math-rsqrt-to-avoid-ove.patch new file mode 100644 index 00000000..5aef2b76 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/files/0001-use-fully-qualified-rkcommon-math-rsqrt-to-avoid-ove.patch | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | From f0885d7d97e98ad586bbacf5edf7fa4022b425b9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
| 3 | Date: Mon, 11 Aug 2025 14:00:50 +0800 | ||
| 4 | Subject: [PATCH] use fully-qualified rkcommon::math::rsqrt to avoid overload | ||
| 5 | ambiguity | ||
| 6 | |||
| 7 | Explicitly calling rkcommon::math::rsqrt() prevents conflict with the | ||
| 8 | standard rsqrt(double) declared in bits/mathcalls.h, fixing the build | ||
| 9 | error in Quaternion tests. | ||
| 10 | |||
| 11 | Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
| 12 | |||
| 13 | Upstream-Status: Submitted [https://github.com/RenderKit/rkcommon/pull/16] | ||
| 14 | --- | ||
| 15 | tests/math/test_Quaternion.cpp | 2 +- | ||
| 16 | tests/math/test_rkmath.cpp | 4 ++-- | ||
| 17 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/tests/math/test_Quaternion.cpp b/tests/math/test_Quaternion.cpp | ||
| 20 | index 760d815..f527824 100644 | ||
| 21 | --- a/tests/math/test_Quaternion.cpp | ||
| 22 | +++ b/tests/math/test_Quaternion.cpp | ||
| 23 | @@ -187,7 +187,7 @@ template <typename T> | ||
| 24 | inline void test_slerp() | ||
| 25 | { | ||
| 26 | typename T::Scalar two = 2; | ||
| 27 | - REQUIRE(CmpT(slerp(.5f, T(1, 0, 0, 0), T(0, 1, 0, 0)), T(rsqrt(two), rsqrt(two), 0, 0))); | ||
| 28 | + REQUIRE(CmpT(slerp(.5f, T(1, 0, 0, 0), T(0, 1, 0, 0)), T(rkcommon::math::rsqrt(two), rkcommon::math::rsqrt(two), 0, 0))); | ||
| 29 | } | ||
| 30 | |||
| 31 | TEST_CASE("Quaternion functions", "[quat]") | ||
| 32 | diff --git a/tests/math/test_rkmath.cpp b/tests/math/test_rkmath.cpp | ||
| 33 | index 7f66532..fd18df4 100644 | ||
| 34 | --- a/tests/math/test_rkmath.cpp | ||
| 35 | +++ b/tests/math/test_rkmath.cpp | ||
| 36 | @@ -49,8 +49,8 @@ TEST_CASE("rkmath rcp_safe function", "[rkmath]") | ||
| 37 | template <typename T> | ||
| 38 | inline void test_rsqrt() | ||
| 39 | { | ||
| 40 | - REQUIRE(CmpT<T>(rsqrt(T(1)), T(1))); | ||
| 41 | - REQUIRE(CmpT<T>(rsqrt(T(4)), T(.5))); | ||
| 42 | + REQUIRE(CmpT<T>(rkcommon::math::rsqrt(T(1)), T(1))); | ||
| 43 | + REQUIRE(CmpT<T>(rkcommon::math::rsqrt(T(4)), T(.5))); | ||
| 44 | } | ||
| 45 | |||
| 46 | TEST_CASE("rkmath rsqrt function", "[rkmath]") | ||
| 47 | -- | ||
| 48 | 2.37.3 | ||
| 49 | |||
