17 #ifndef __UTIL_MATH_INT3_H__
18 #define __UTIL_MATH_INT3_H__
20 #ifndef __UTIL_MATH_H__
21 # error "Do not include this file directly, include util_types.h instead."
30 #ifndef __KERNEL_OPENCL__
41 #ifndef __KERNEL_OPENCL__
44 # if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE41__)
45 return int3(_mm_min_epi32(
a.m128, b.m128));
53 # if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE41__)
54 return int3(_mm_max_epi32(
a.m128, b.m128));
62 # ifdef __KERNEL_SSE__
71 # ifdef __KERNEL_SSE__
80 return a.x == b.
x &&
a.y == b.
y &&
a.z == b.
z;
90 return a.x < b.
x &&
a.y < b.
y &&
a.z < b.
z;
95 # ifdef __KERNEL_SSE__
96 return int3(_mm_add_epi32(
a.m128, b.m128));
104 # ifdef __KERNEL_SSE__
105 return int3(_mm_sub_epi32(
a.m128, b.m128));
#define ccl_device_inline
#define CCL_NAMESPACE_END
#define make_int3(x, y, z)
CCL_NAMESPACE_BEGIN ccl_device_inline int3 min(int3 a, int3 b)
ccl_device_inline int3 max(int3 a, int3 b)
ccl_device_inline bool operator<(const int3 &a, const int3 &b)
ccl_device_inline bool operator!=(const int3 &a, const int3 &b)
ccl_device_inline int3 clamp(const int3 &a, int mn, int mx)
ccl_device_inline bool operator==(const int3 &a, const int3 &b)
ccl_device_inline int3 operator-(const int3 &a, const int3 &b)
ccl_device_inline int3 operator+(const int3 &a, const int3 &b)