54 [[
nodiscard]] hi_force_inline
static array_type set(
float a,
float b)
noexcept
59 [[
nodiscard]] hi_force_inline
static array_type set(
float a)
noexcept
81 [[
nodiscard]] hi_force_inline
static float get(array_type a)
noexcept
84 if constexpr (I == 0) {
91 [[
nodiscard]] hi_force_inline
static array_type broadcast(
float a)
noexcept
96 [[
nodiscard]] hi_force_inline
static array_type broadcast(array_type a)
noexcept
105 static_cast<int32_t
>(mask) << 30,
106 static_cast<int32_t
>(mask) << 30,
107 static_cast<int32_t
>(mask) << 31,
108 static_cast<int32_t
>(mask) << 31);
121 [[
nodiscard]] hi_force_inline
static array_type neg(array_type a)
noexcept
126 template<std::
size_t Mask>
127 [[
nodiscard]] hi_force_inline
constexpr static array_type neg_mask(array_type a)
noexcept
129 if constexpr (
Mask == 0) {
131 }
else if constexpr (
Mask == 0b11) {
133#if defined(HI_HAS_SSE3)
134 }
else if constexpr (
Mask == 0b01) {
143 [[
nodiscard]] hi_force_inline
static array_type inv(array_type a)
noexcept
145 return _xor(set_all_ones(), a);
148 [[
nodiscard]] hi_force_inline
static array_type
sqrt(array_type a)
noexcept
153#if defined(HI_HAS_SSE4_1)
154 [[
nodiscard]] hi_force_inline
static array_type
round(array_type a)
noexcept
159 [[
nodiscard]] hi_force_inline
static array_type
floor(array_type a)
noexcept
164 [[
nodiscard]] hi_force_inline
static array_type
ceil(array_type a)
noexcept
170 [[
nodiscard]] hi_force_inline
static array_type add(array_type a, array_type b)
noexcept
175 [[
nodiscard]] hi_force_inline
static array_type sub(array_type a, array_type b)
noexcept
180 template<std::
size_t Mask>
181 [[
nodiscard]] hi_force_inline
constexpr static array_type addsub_mask(array_type a, array_type b)
noexcept
183 if constexpr (
Mask == 0) {
185 }
else if constexpr (
Mask == 0b11) {
187#if defined(HI_HAS_SSE3)
188 }
else if constexpr (
Mask == 0b10) {
196 [[
nodiscard]] hi_force_inline
static array_type mul(array_type a, array_type b)
noexcept
201 [[
nodiscard]] hi_force_inline
static array_type
div(array_type a, array_type b)
noexcept
206 [[
nodiscard]] hi_force_inline
static array_type eq(array_type a, array_type b)
noexcept
211 [[
nodiscard]] hi_force_inline
static array_type ne(array_type a, array_type b)
noexcept
216 [[
nodiscard]] hi_force_inline
static array_type lt(array_type a, array_type b)
noexcept
221 [[
nodiscard]] hi_force_inline
static array_type gt(array_type a, array_type b)
noexcept
226 [[
nodiscard]] hi_force_inline
static array_type le(array_type a, array_type b)
noexcept
231 [[
nodiscard]] hi_force_inline
static array_type ge(array_type a, array_type b)
noexcept
236 [[
nodiscard]] hi_force_inline
static bool test(array_type a, array_type b)
noexcept
238#if defined(HI_HAS_SSE4_1)
245 [[
nodiscard]] hi_force_inline
static array_type
max(array_type a, array_type b)
noexcept
250 [[
nodiscard]] hi_force_inline
static array_type
min(array_type a, array_type b)
noexcept
255 [[
nodiscard]] hi_force_inline
static array_type clamp(array_type v, array_type
lo, array_type
hi)
noexcept
260 [[
nodiscard]] hi_force_inline
static array_type _or(array_type a, array_type b)
noexcept
265 [[
nodiscard]] hi_force_inline
static array_type _and(array_type a, array_type b)
noexcept
270 [[
nodiscard]] hi_force_inline
static array_type _xor(array_type a, array_type b)
noexcept
275 [[
nodiscard]] hi_force_inline
static array_type andnot(array_type a, array_type b)
noexcept
280 [[
nodiscard]] hi_force_inline
static array_type sll(array_type a,
unsigned int b)
noexcept
286 [[
nodiscard]] hi_force_inline
static array_type srl(array_type a,
unsigned int b)
noexcept
292 [[
nodiscard]] hi_force_inline
static array_type sra(array_type a,
unsigned int b)
noexcept
298#if defined(HI_HAS_SSE3)
299 [[
nodiscard]] hi_force_inline
static array_type hadd(array_type a, array_type b)
noexcept
305#if defined(HI_HAS_SSE3)
306 [[
nodiscard]] hi_force_inline
static array_type hsub(array_type a, array_type b)
noexcept
315 static_assert(
sizeof...(Indices) == 2);
319 for (
size_t i = 0; i != 2; ++i) {
320 auto const index = indices[i] < 0 ? i : indices[i];
321 r |= index << (i * 2);
327 [[
nodiscard]] hi_force_inline
static array_type
shuffle(array_type a)
noexcept
332 template<
size_t Mask>
333 [[
nodiscard]] hi_force_inline
static array_type blend(array_type a, array_type b)
noexcept
335#if defined(HI_HAS_SSE4_1)
344 [[
nodiscard]] hi_force_inline
static array_type sum(array_type a)
noexcept
350 template<
size_t Mask>
351 [[
nodiscard]] hi_force_inline
static array_type dot(array_type a, array_type b)
noexcept
353#if defined(HI_HAS_SSE4_1)