[Bf-blender-cvs] [c543814] master: Cycles: Enable SSE math optimization for AVX kernels

Sergey Sharybin noreply at git.blender.org
Tue Oct 25 16:12:31 CEST 2016


Commit: c54381488bd6066b2b9c66d6a570c8b181c80216
Author: Sergey Sharybin
Date:   Tue Oct 25 16:10:47 2016 +0200
Branches: master
https://developer.blender.org/rBc54381488bd6066b2b9c66d6a570c8b181c80216

Cycles: Enable SSE math optimization for AVX kernels

This gives about 5% speedup for AVX processors.

Benefit of such optimization on other microarchitectures is still
under investigation.

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

M	intern/cycles/kernel/kernels/cpu/kernel.cpp
M	intern/cycles/kernel/kernels/cpu/kernel_avx.cpp

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

diff --git a/intern/cycles/kernel/kernels/cpu/kernel.cpp b/intern/cycles/kernel/kernels/cpu/kernel.cpp
index 1559b0d..72dbbd9a 100644
--- a/intern/cycles/kernel/kernels/cpu/kernel.cpp
+++ b/intern/cycles/kernel/kernels/cpu/kernel.cpp
@@ -42,6 +42,7 @@
 #    define __KERNEL_SSE41__
 #  endif
 #  ifdef __AVX__
+#    define __KERNEL_SSE__
 #    define __KERNEL_AVX__
 #  endif
 #  ifdef __AVX2__
diff --git a/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp b/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp
index 533ab46..1350d9e 100644
--- a/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp
+++ b/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp
@@ -20,6 +20,7 @@
  
 /* SSE optimization disabled for now on 32 bit, see bug #36316 */
 #if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86)))
+#  define __KERNEL_SSE__
 #  define __KERNEL_SSE2__
 #  define __KERNEL_SSE3__
 #  define __KERNEL_SSSE3__




More information about the Bf-blender-cvs mailing list