[Bf-blender-cvs] [08fbc30] master: Cycles: Resolve compilation error of avx2 kernel with certain compilers

Sergey Sharybin noreply at git.blender.org
Thu Jul 23 11:54:36 CEST 2015


Commit: 08fbc303e17e2a783808ade71e709b621b53743f
Author: Sergey Sharybin
Date:   Thu Jul 23 11:48:54 2015 +0200
Branches: master
https://developer.blender.org/rB08fbc303e17e2a783808ade71e709b621b53743f

Cycles: Resolve compilation error of avx2 kernel with certain compilers

It was redefined macro happening with Clang 3.6 here.

===================================================================

M	intern/cycles/util/util_simd.h

===================================================================

diff --git a/intern/cycles/util/util_simd.h b/intern/cycles/util/util_simd.h
index 7c15199..a1c35b7 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__)




More information about the Bf-blender-cvs mailing list