17 namespace __ESIMD_DNS {
54 template <
typename T,
int N>
57 T, N, simd_mask_impl<T, N>,
58 std::enable_if_t<std::is_same_v<simd_mask_elem_type, T>>> {
70 static_assert(std::is_same_v<
raw_vector_type, simd_mask_storage_t<N>> &&
71 "mask impl type mismatch");
81 template <
class T1,
class = std::enable_if_t<std::is_
integral_v<T1>>>
89 template <
int N1,
class = std::enable_if_t<N1 == N>>
91 base_type::template init_from_array<false>(std::move(Arr));
99 static inline constexpr
bool mask_size_ok_for_mem_io() {
100 constexpr
unsigned Sz =
sizeof(element_type) * N;
101 return (Sz >= OperandSize::OWORD) && (Sz % OperandSize::OWORD == 0) &&
102 isPowerOf2(Sz / OperandSize::OWORD) &&
103 (Sz <= 8 * OperandSize::OWORD);
115 template <
typename T1,
117 std::is_same_v<T1, element_type>>>
119 base_type::copy_from(ptr);
131 class = std::enable_if_t<T1::length == 1>>
132 operator bool()
const {
133 return base_type::data()[0] != 0;
137 #undef __ESIMD_MASK_DEPRECATION_MSG