5#include "native_simd_utility.hpp"
6#include "../utility/utility.hpp"
7#include "../macros.hpp"
34struct native_simd<float16,8> {
35 using value_type = float16;
36 constexpr static size_t size = 8;
41 native_simd(native_simd
const&)
noexcept =
default;
66 [[
nodiscard]] native_simd(value_type a, value_type b = value_type{}, value_type c = value_type{}, value_type d = value_type{},
67 value_type e = value_type{}, value_type f = value_type{}, value_type g = value_type{},
68 value_type h = value_type{})
noexcept :
73 void store(value_type *out)
const noexcept
75 hi_axiom_not_null(out);
81 void store(
void *out)
const noexcept
83 hi_axiom_not_null(out);
87 [[
nodiscard]]
explicit native_simd(std::span<value_type const>
other)
noexcept
89 hi_axiom(
other.size() >= size);
93 void store(std::span<value_type> out)
const noexcept
95 hi_axiom(out.size() >= size);
158 return native_simd{
tmp};
166 hi_axiom(mask <= 0b1111'1111);
169 mask & 0b0000'0001 ? value_type{} : value_type::from_uint16_t(0xffff),
170 mask & 0b0000'0010 ? value_type{} : value_type::from_uint16_t(0xffff),
171 mask & 0b0000'0100 ? value_type{} : value_type::from_uint16_t(0xffff),
172 mask & 0b0000'1000 ? value_type{} : value_type::from_uint16_t(0xffff),
173 mask & 0b0001'0000 ? value_type{} : value_type::from_uint16_t(0xffff),
174 mask & 0b0010'0000 ? value_type{} : value_type::from_uint16_t(0xffff),
175 mask & 0b0100'0000 ? value_type{} : value_type::from_uint16_t(0xffff),
176 mask & 0b1000'0000 ? value_type{} : value_type::from_uint16_t(0xffff)};
193 [[
nodiscard]]
friend native_simd operator==(native_simd a, native_simd b)
noexcept
203 [[
nodiscard]]
friend native_simd operator&(native_simd a, native_simd b)
noexcept
208 [[
nodiscard]]
friend native_simd operator|(native_simd a, native_simd b)
noexcept
213 [[
nodiscard]]
friend native_simd operator^(native_simd a, native_simd b)
noexcept
218 [[
nodiscard]]
friend native_simd operator~(native_simd a)
noexcept
231 template<
size_t Mask>
234 static_assert(
Mask <= 0b1111'1111);
246 template<
size_t Index>
247 [[
nodiscard]]
friend native_simd insert(native_simd a, value_type b)
noexcept
249 static_assert(
Index < 4);
259 template<
size_t Index>
273 template<
size_t Mask>
274 [[
nodiscard]]
friend native_simd
blend(native_simd a, native_simd b)
noexcept
280 return not_and(mask, a) | (mask & b);
324 template<fixed_
string SourceElements>
327 constexpr auto one_mask = detail::native_swizzle_to_mask<SourceElements, size, '1'>();
328 constexpr auto zero_mask = detail::native_swizzle_to_mask<SourceElements, size, '0'>();
358 [[
nodiscard]]
friend native_simd
not_and(native_simd a, native_simd b)
noexcept
363 template<fixed_
string SourceElements>
366 constexpr auto one_mask = detail::native_swizzle_to_mask<SourceElements, size, '1'>();
367 constexpr auto zero_mask = detail::native_swizzle_to_mask<SourceElements, size, '0'>();
375 return native_simd::broadcast(value_type::from_uint16_t(0x3c00));
379 to_bool(
one_mask & 0b00000001) ? value_type::from_uint16_t(0x3c00) : value_type{},
380 to_bool(
one_mask & 0b00000010) ? value_type::from_uint16_t(0x3c00) : value_type{},
381 to_bool(
one_mask & 0b00000100) ? value_type::from_uint16_t(0x3c00) : value_type{},
382 to_bool(
one_mask & 0b00001000) ? value_type::from_uint16_t(0x3c00) : value_type{},
383 to_bool(
one_mask & 0b00010000) ? value_type::from_uint16_t(0x3c00) : value_type{},
384 to_bool(
one_mask & 0b00100000) ? value_type::from_uint16_t(0x3c00) : value_type{},
385 to_bool(
one_mask & 0b01000000) ? value_type::from_uint16_t(0x3c00) : value_type{},
386 to_bool(
one_mask & 0b10000000) ? value_type::from_uint16_t(0x3c00) : value_type{}
@ other
The gui_event does not have associated data.
DOXYGEN BUG.
Definition algorithm.hpp:16
geometry/margins.hpp
Definition lookahead_iterator.hpp:5
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377