diff options
author | Brecht Van Lommel <brecht> | 2022-11-01 17:16:55 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-11-08 14:28:40 +0300 |
commit | e1b3d9112730bc3b569ffff732a1558752ded146 (patch) | |
tree | 27caad945dcc9ce7313b4c84cd0efbab6f70503c /intern/cycles/kernel/device/cpu/kernel.cpp | |
parent | 32ec0521c542bb78a0080f8091856ec085030f09 (diff) |
Refactor: replace Cycles sse/avx types by vectorized float4/int4/float8/int8
The distinction existed for legacy reasons, to easily port of Embree
intersection code without affecting the main vector types. However we are now
using SIMD for these types as well, so no good reason to keep the distinction.
Also more consistently pass these vector types by value in inline functions.
Previously it was partially changed for functions used by Metal to avoid having
to add address space qualifiers, simple to do it everywhere.
Also removes function declarations for vector math headers, serves no real
purpose.
Differential Revision: https://developer.blender.org/D16146
Diffstat (limited to 'intern/cycles/kernel/device/cpu/kernel.cpp')
-rw-r--r-- | intern/cycles/kernel/device/cpu/kernel.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/intern/cycles/kernel/device/cpu/kernel.cpp b/intern/cycles/kernel/device/cpu/kernel.cpp index 01087c96dd6..558431961ab 100644 --- a/intern/cycles/kernel/device/cpu/kernel.cpp +++ b/intern/cycles/kernel/device/cpu/kernel.cpp @@ -7,6 +7,7 @@ * one with SSE2 intrinsics. */ #if defined(__x86_64__) || defined(_M_X64) +# define __KERNEL_SSE__ # define __KERNEL_SSE2__ #endif @@ -29,11 +30,15 @@ # define __KERNEL_SSE41__ # endif # ifdef __AVX__ -# define __KERNEL_SSE__ +# ifndef __KERNEL_SSE__ +# define __KERNEL_SSE__ +# endif # define __KERNEL_AVX__ # endif # ifdef __AVX2__ -# define __KERNEL_SSE__ +# ifndef __KERNEL_SSE__ +# define __KERNEL_SSE__ +# endif # define __KERNEL_AVX2__ # endif #endif |