mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
34 lines
979 B
Diff
34 lines
979 B
Diff
|
From d7794f3540cc9837173ed375ea5db4651c1c24df Mon Sep 17 00:00:00 2001
|
||
|
From: "Werner, Stefan" <stefan.werner@intel.com>
|
||
|
Date: Mon, 5 Jun 2023 11:49:17 +0200
|
||
|
Subject: [PATCH] Cycles: Fixed SYCL build with newer compilers
|
||
|
|
||
|
---
|
||
|
intern/cycles/util/math.h | 6 ++++--
|
||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/intern/cycles/util/math.h b/intern/cycles/util/math.h
|
||
|
index 99415d2ee9b..289bd5d4baf 100644
|
||
|
--- a/intern/cycles/util/math.h
|
||
|
+++ b/intern/cycles/util/math.h
|
||
|
@@ -101,7 +101,6 @@ using std::isfinite;
|
||
|
using std::isnan;
|
||
|
using std::sqrt;
|
||
|
# else
|
||
|
-using sycl::sqrt;
|
||
|
# define isfinite(x) sycl::isfinite((x))
|
||
|
# define isnan(x) sycl::isnan((x))
|
||
|
# endif
|
||
|
@@ -795,7 +794,10 @@ ccl_device float bits_to_01(uint bits)
|
||
|
|
||
|
#if !defined(__KERNEL_GPU__)
|
||
|
# if defined(__GNUC__)
|
||
|
-# define popcount(x) __builtin_popcount(x)
|
||
|
+ccl_device_inline uint popcount(uint x)
|
||
|
+{
|
||
|
+ return __builtin_popcount(x);
|
||
|
+}
|
||
|
# else
|
||
|
ccl_device_inline uint popcount(uint x)
|
||
|
{
|