4 #ifndef __UTIL_MATH_INT4_H__
5 #define __UTIL_MATH_INT4_H__
7 #ifndef __UTIL_MATH_H__
8 # error "Do not include this file directly, include util/types.h instead."
17 #ifndef __KERNEL_GPU__
35 #ifndef __KERNEL_GPU__
38 # ifdef __KERNEL_SSE__
39 return int4(_mm_add_epi32(
a.m128,
b.m128));
52 # ifdef __KERNEL_SSE__
53 return int4(_mm_srai_epi32(
a.m128, i));
61 # ifdef __KERNEL_SSE__
62 return int4(_mm_slli_epi32(
a.m128, i));
70 # ifdef __KERNEL_SSE__
71 return int4(_mm_cmplt_epi32(
a.m128,
b.m128));
79 # ifdef __KERNEL_SSE__
80 return int4(_mm_xor_si128(_mm_set1_epi32(0xffffffff), _mm_cmplt_epi32(
a.m128,
b.m128)));
88 # ifdef __KERNEL_SSE__
89 return int4(_mm_and_si128(
a.m128,
b.m128));
97 # if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE41__)
98 return int4(_mm_min_epi32(
a.m128,
b.m128));
106 # if defined(__KERNEL_SSE__) && defined(__KERNEL_SSE41__)
107 return int4(_mm_max_epi32(
a.m128,
b.m128));
120 # ifdef __KERNEL_SSE__
121 return int4(_mm_or_si128(_mm_and_si128(
mask,
a), _mm_andnot_si128(
mask,
b)));
130 # ifdef __KERNEL_SSE__
131 return int4(_mm_loadu_si128((__m128i *)
v));
ATTR_WARN_UNUSED_RESULT const BMVert * v
#define ccl_device_inline
#define CCL_NAMESPACE_END
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
ccl_device_inline int4 load_int4(const int *v)
ccl_device_inline int4 operator>>(const int4 &a, int i)
ccl_device_inline int4 operator<<(const int4 &a, int i)
ccl_device_inline int4 operator<(const int4 &a, const int4 &b)
ccl_device_inline int4 operator&(const int4 &a, const int4 &b)
ccl_device_inline int4 clamp(const int4 &a, const int4 &mn, const int4 &mx)
ccl_device_inline int4 min(int4 a, int4 b)
ccl_device_inline int4 max(int4 a, int4 b)
CCL_NAMESPACE_BEGIN ccl_device_inline int4 operator+(const int4 &a, const int4 &b)
ccl_device_inline int4 operator>=(const int4 &a, const int4 &b)
ccl_device_inline int4 select(const int4 &mask, const int4 &a, const int4 &b)
ccl_device_inline int4 operator+=(int4 &a, const int4 &b)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)