Construct masks from boolean values, generators, bitsets, integers, and other masks.
More...
|
| constexpr | xvec::simd::basic_mask< _Bytes, _Abi >::basic_mask (std::same_as< value_type > auto b) noexcept |
| | Build a mask from a boolean value.
|
template<std::unsigned_integral T>
requires (!std::same_as<T, value_type>) |
| constexpr | xvec::simd::basic_mask< _Bytes, _Abi >::basic_mask (T m) noexcept |
| | Build a mask from the bits of an unsigned integral value. Each mask element is initialized from the corresponding input bit. Elements beyond the width of the input value are initialized to false.
|
template<std::size_t _UBytes, typename _UAbi>
requires (basic_mask<_UBytes, _UAbi>::size() == size()) |
| constexpr | xvec::simd::basic_mask< _Bytes, _Abi >::basic_mask (const basic_mask< _UBytes, _UAbi > &m) |
| | Convert a mask with the same number of elements. Each output element retains the corresponding input boolean value.
|
| constexpr | xvec::simd::basic_mask< _Bytes, _Abi >::basic_mask (std::invocable< std::integral_constant< simd_size_type, 0 > > auto fn) |
| | Generate each mask element from its index.
|
| template<std::same_as< std::bitset< size()> > T> |
| constexpr | xvec::simd::basic_mask< _Bytes, _Abi >::basic_mask (const T &b) noexcept |
| | Construct a mask from the corresponding bitset.
|
Construct masks from boolean values, generators, bitsets, integers, and other masks.
- See also
- https://eel.is/c++draft/simd.mask.ctor
◆ basic_mask() [1/5]
template<std::size_t _Bytes, typename _Abi>
template<std::size_t _UBytes, typename _UAbi>
requires (basic_mask<_UBytes, _UAbi>
::size() ==
size())
Convert a mask with the same number of elements. Each output element retains the corresponding input boolean value.
- Template Parameters
-
| _UBytes | The source mask's associated vector element size in bytes. |
| _UAbi | The source mask ABI. |
- Parameters
-
◆ basic_mask() [2/5]
template<std::size_t _Bytes, typename _Abi>
template<std::same_as< std::bitset<
size()> > T>
Construct a mask from the corresponding bitset.
- Parameters
-
| b | The bitset supplying the value of each mask element. |
◆ basic_mask() [3/5]
template<std::size_t _Bytes, typename _Abi>
| xvec::simd::basic_mask< _Bytes, _Abi >::basic_mask |
( |
std::invocable< std::integral_constant< simd_size_type, 0 > > auto | fn | ) |
|
|
inlineconstexpr |
Generate each mask element from its index.
- Parameters
-
| fn | The generator returning a boolean value for each element index. |
◆ basic_mask() [4/5]
template<std::size_t _Bytes, typename _Abi>
|
|
inlineexplicitconstexprnoexcept |
Build a mask from a boolean value.
- Parameters
-
| b | The boolean value to broadcast to all mask elements. |
◆ basic_mask() [5/5]
template<std::size_t _Bytes, typename _Abi>
template<std::unsigned_integral T>
requires (!std::same_as<T,
value_type>)
|
|
inlineexplicitconstexprnoexcept |
Build a mask from the bits of an unsigned integral value. Each mask element is initialized from the corresponding input bit. Elements beyond the width of the input value are initialized to false.
- Parameters
-
| m | The unsigned integral value supplying the bits. |