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.
This commit is contained in:
Sergey Sharybin
2014-12-16 20:27:44 +05:00
parent f770bc4757
commit ab8d9c4b88
4 changed files with 57 additions and 3 deletions

View File

@@ -344,6 +344,12 @@ typedef texture_image<uchar4> texture_image_uchar4;
#define kernel_data (kg->__data)
#ifdef __KERNEL_SSE2__
typedef vector3<sseb> sse3b;
typedef vector3<ssef> sse3f;
typedef vector3<ssei> sse3i;
#endif
CCL_NAMESPACE_END
#endif /* __KERNEL_COMPAT_CPU_H__ */