From 08fbc303e17e2a783808ade71e709b621b53743f Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 23 Jul 2015 11:48:54 +0200 Subject: Cycles: Resolve compilation error of avx2 kernel with certain compilers It was redefined macro happening with Clang 3.6 here. --- intern/cycles/util/util_simd.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'intern/cycles/util') diff --git a/intern/cycles/util/util_simd.h b/intern/cycles/util/util_simd.h index 7c15199d4e1..a1c35b7174d 100644 --- a/intern/cycles/util/util_simd.h +++ b/intern/cycles/util/util_simd.h @@ -58,8 +58,12 @@ __forceinline operator int ( ) const { return std::numeric_limits< /* Intrinsics Functions */ #if defined(__BMI__) && defined(__GNUC__) -#define _tzcnt_u32 __tzcnt_u32 -#define _tzcnt_u64 __tzcnt_u64 +# ifndef _tzcnt_u32 +# define _tzcnt_u32 __tzcnt_u32 +# endif +# ifndef _tzcnt_u64 +# define _tzcnt_u64 __tzcnt_u64 +# endif #endif #if defined(__LZCNT__) -- cgit v1.2.3