Files
cppdraft_translate/cppdraft/simd/mask/cond.md
2025-10-25 03:02:53 +03:00

2.0 KiB
Raw Blame History

[simd.mask.cond]

29 Numerics library [numerics]

29.10 Data-parallel types [simd]

29.10.10 basic_mask non-member operations [simd.mask.nonmembers]

29.10.10.4 basic_mask exposition only conditional operators [simd.mask.cond]

🔗

friend constexpr basic_mask simd-select-impl( const basic_mask& mask, const basic_mask& a, const basic_mask& b) noexcept;

1

#

Returns: A basic_mask object where the ith element equalsmask[i] ? a[i] : b[i] for all i in the range of [0, size()).

🔗

friend constexpr basic_mask simd-select-impl(const basic_mask& mask, [same_as](concept.same#concept:same_as "18.4.2Concept same_­as[concept.same]")<bool> auto a, [same_as](concept.same#concept:same_as "18.4.2Concept same_­as[concept.same]")<bool> auto b) noexcept;

2

#

Returns: A basic_mask object where the ith element equalsmask[i] ? a : b for all i in the range of [0, size()).

🔗

template<class T0, class T1> friend constexpr vec<see below, size()> simd-select-impl(const basic_mask& mask, const T0& a, const T1& b) noexcept;

3

#

Constraints:

same_as<T0, T1> is true,

T0 is a vectorizable type, and

sizeof(T0) == Bytes.

4

#

Returns: A vec<T0, size()> object where the ith element equalsmask[i] ? a : b for all i in the range of [0, size()).