diff options
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon')
2 files changed, 67 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 | |||
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 new file mode 100644 index 00000000..d49e8e52 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.14.0.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | SUMMARY = "rkcommon - C++/CMake infrastructure" | ||
2 | DESCRIPTION = "A common set of C++ infrastructure and CMake utilities \ | ||
3 | used by various components of IntelĀ® oneAPI Rendering Toolkit." | ||
4 | HOMEPAGE = "https://github.com/ospray/rkcommon" | ||
5 | |||
6 | LICENSE = "Apache-2.0" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
8 | |||
9 | inherit pkgconfig cmake | ||
10 | |||
11 | SRC_URI = "git://github.com/ospray/rkcommon.git;protocol=https;branch=master \ | ||
12 | file://0001-use-fully-qualified-rkcommon-math-rsqrt-to-avoid-ove.patch \ | ||
13 | " | ||
14 | SRCREV = "4a00047ae5a3ac705b6b33b4a7574588d91e7953" | ||
15 | |||
16 | DEPENDS = "tbb" | ||
17 | |||
18 | EXTRA_OECMAKE += " -DBUILD_TESTING=OFF" | ||