3.0 KiB
[simd.mask.ctor]
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() istrue.
Effects: Initializes the ith 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 ith element withgen(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 ith element with b[i] for all i in the range [0, size()).
constexpr explicit basic_mask([unsigned_integral](concepts.arithmetic#concept:unsigned_integral "18.4.7 Arithmetic concepts [concepts.arithmetic]") auto val) noexcept;
Effects: Initializes the first M elements to the corresponding bit values inval, where M is the smaller of size() and the number of bits in the value representation ([basic.types.general]) of the type of val.
IfM is less than size(), the remaining elements are initialized to zero.