Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-07-25 18:38:03 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-07-25 18:43:35 +0300
commitf26aa186b26f46dad08536d95b126afb42abd2f3 (patch)
tree564cb2e4efbf4d5f9756f68499d2d8824d8a1329 /intern/cycles/util
parent793d2031395246fb2421d130742e0fe61ab2b29c (diff)
Cleanup: remove __KERNEL_CPU__
This was tested in some places to check if code was being compiled for the CPU, however this is only defined in the kernel. Checking __KERNEL_GPU__ always works.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/defines.h2
-rw-r--r--intern/cycles/util/math_fast.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/util/defines.h b/intern/cycles/util/defines.h
index 115a747cf1c..d0df1a221fc 100644
--- a/intern/cycles/util/defines.h
+++ b/intern/cycles/util/defines.h
@@ -81,7 +81,7 @@
/* macros */
/* hints for branch prediction, only use in code that runs a _lot_ */
-#if defined(__GNUC__) && defined(__KERNEL_CPU__)
+#if defined(__GNUC__) && !defined(__KERNEL_GPU__)
# define LIKELY(x) __builtin_expect(!!(x), 1)
# define UNLIKELY(x) __builtin_expect(!!(x), 0)
#else
diff --git a/intern/cycles/util/math_fast.h b/intern/cycles/util/math_fast.h
index 2221e7a9835..142a664a1d2 100644
--- a/intern/cycles/util/math_fast.h
+++ b/intern/cycles/util/math_fast.h
@@ -420,7 +420,7 @@ ccl_device_inline float fast_expf(float x)
return fast_exp2f(x / M_LN2_F);
}
-#if defined(__KERNEL_CPU__) && !defined(_MSC_VER)
+#if !defined(__KERNEL_GPU__) && !defined(_MSC_VER)
/* MSVC seems to have a code-gen bug here in at least SSE41/AVX, see
* T78047 and T78869 for details. Just disable for now, it only makes
* a small difference in denoising performance. */