29 Numerics library [numerics]

29.10 Data-parallel types [simd]

29.10.9 Class template basic_mask [simd.mask.class]

29.10.9.2 basic_mask constructors [simd.mask.ctor]

constexpr explicit basic_mask(value_type x) noexcept;
Effects: Initializes each element with x.
template<size_t UBytes, class UAbi> constexpr explicit basic_mask(const basic_mask<UBytes, UAbi>& x) noexcept;
Constraints: basic_mask<UBytes, UAbi>​::​size() == size() is true.
Effects: Initializes the element with x[i] for all i in the range of [0, size()).
template<class G> constexpr explicit basic_mask(G&& gen);
Constraints: The expression gen(integral_constant<simd-size-type, i>()) is well-formed and its type is bool for all i in the range of [0, size()).
Effects: Initializes the element with gen(integral_constant<simd-size-type, i>()) for all i in the range of [0, size()).
Remarks: gen is invoked exactly once for each i, in increasing order of i.
constexpr basic_mask(const bitset<size()>& b) noexcept;
Effects: Initializes the element with b[i] for all i in the range [0, size()).
constexpr explicit basic_mask(unsigned_integral auto val) noexcept;
Effects: Initializes the first M elements to the corresponding bit values in val, where M is the smaller of size() and the number of bits in the value representation ([basic.types.general]) of the type of val.
If M is less than size(), the remaining elements are initialized to zero.