4 #ifndef __UTIL_MATH_INT3_H__
5 #define __UTIL_MATH_INT3_H__
7 #ifndef __UTIL_MATH_H__
8 # error "Do not include this file directly, include util/types.h instead."
17 #if !defined(__KERNEL_METAL__)
28 #if !defined(__KERNEL_METAL__)
31 # if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE41__)
32 return int3(_mm_min_epi32(
a.m128,
b.m128));
40 # if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE41__)
41 return int3(_mm_max_epi32(
a.m128,
b.m128));
49 # ifdef __KERNEL_SSE__
58 # ifdef __KERNEL_SSE__
67 return a.x ==
b.x &&
a.y ==
b.y &&
a.z ==
b.z;
77 return a.x <
b.x &&
a.y <
b.y &&
a.z <
b.z;
82 # ifdef __KERNEL_SSE__
83 return int3(_mm_add_epi32(
a.m128,
b.m128));
91 # ifdef __KERNEL_SSE__
92 return int3(_mm_sub_epi32(
a.m128,
b.m128));
#define ccl_device_inline
#define CCL_NAMESPACE_END
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)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)