summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYogesh Tyagi <yogesh.tyagi@intel.com>2025-08-12 11:17:43 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2025-08-18 15:49:42 +0800
commit163ab5f04be21dab2cfbaa8e8737c1e3bee086c2 (patch)
treedf0f766020f8d647a25d3ef129d955920746de13
parent6a9e47a63846e743e8e5f7d58d7ac2809b6513b5 (diff)
downloadmeta-intel-163ab5f04be21dab2cfbaa8e8737c1e3bee086c2.tar.gz
rkcommon : fix test, use fully-qualified rkcommon::math::rsqrt to avoid overload ambiguity
Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/files/0001-use-fully-qualified-rkcommon-math-rsqrt-to-avoid-ove.patch49
-rw-r--r--dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.14.0.bb1
2 files changed, 50 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 @@
1From f0885d7d97e98ad586bbacf5edf7fa4022b425b9 Mon Sep 17 00:00:00 2001
2From: Yogesh Tyagi <yogesh.tyagi@intel.com>
3Date: Mon, 11 Aug 2025 14:00:50 +0800
4Subject: [PATCH] use fully-qualified rkcommon::math::rsqrt to avoid overload
5 ambiguity
6
7Explicitly calling rkcommon::math::rsqrt() prevents conflict with the
8standard rsqrt(double) declared in bits/mathcalls.h, fixing the build
9error in Quaternion tests.
10
11Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
12
13Upstream-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
19diff --git a/tests/math/test_Quaternion.cpp b/tests/math/test_Quaternion.cpp
20index 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]")
32diff --git a/tests/math/test_rkmath.cpp b/tests/math/test_rkmath.cpp
33index 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--
482.37.3
49
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.14.0.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.14.0.bb
index 5289e9eb..d49e8e52 100644
--- a/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.14.0.bb
+++ b/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.14.0.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
9inherit pkgconfig cmake 9inherit pkgconfig cmake
10 10
11SRC_URI = "git://github.com/ospray/rkcommon.git;protocol=https;branch=master \ 11SRC_URI = "git://github.com/ospray/rkcommon.git;protocol=https;branch=master \
12 file://0001-use-fully-qualified-rkcommon-math-rsqrt-to-avoid-ove.patch \
12 " 13 "
13SRCREV = "4a00047ae5a3ac705b6b33b4a7574588d91e7953" 14SRCREV = "4a00047ae5a3ac705b6b33b4a7574588d91e7953"
14 15