From ab8d9c4b8853755faa62307750d961dc2ec43708 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 16 Dec 2014 20:27:44 +0500 Subject: Cycles: Add some utility functions and structures Most of them are not currently used but are essential for the further work. - CPU kernels with SSE2 support will now have sse3b, sse3f and sse3i - Added templatedversions of min4, max4 which are handy to use with register variables. - Added util_swap function which gets arguments by pointers. So hopefully it'll be a portable version of std::swap. --- intern/cycles/kernel/kernel_compat_cpu.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'intern/cycles/kernel/kernel_compat_cpu.h') diff --git a/intern/cycles/kernel/kernel_compat_cpu.h b/intern/cycles/kernel/kernel_compat_cpu.h index 08c8bdd369d..2f0b78ea073 100644 --- a/intern/cycles/kernel/kernel_compat_cpu.h +++ b/intern/cycles/kernel/kernel_compat_cpu.h @@ -344,6 +344,12 @@ typedef texture_image texture_image_uchar4; #define kernel_data (kg->__data) +#ifdef __KERNEL_SSE2__ +typedef vector3 sse3b; +typedef vector3 sse3f; +typedef vector3 sse3i; +#endif + CCL_NAMESPACE_END #endif /* __KERNEL_COMPAT_CPU_H__ */ -- cgit v1.2.3