Files
2025-10-25 03:02:53 +03:00

3.0 KiB
Raw Permalink Blame History

[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;

1

#

Effects: Initializes each element with x.

🔗

template<size_t UBytes, class UAbi> constexpr explicit basic_mask(const basic_mask<UBytes, UAbi>& x) noexcept;

2

#

Constraints: basic_mask<UBytes, UAbi>::size() == size() istrue.

3

#

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);

4

#

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()).

5

#

Effects: Initializes the ith element withgen(integral_constant<simd-size-type, i>()) for all i in the range of [0, size()).

6

#

Remarks: gen is invoked exactly once for each i, in increasing order of i.

🔗

constexpr basic_mask(const bitset<size()>& b) noexcept;

7

#

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.7Arithmetic concepts[concepts.arithmetic]") auto val) noexcept;

8

#

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.