66 lines
2.0 KiB
Markdown
66 lines
2.0 KiB
Markdown
[simd.mask.cond]
|
||
|
||
# 29 Numerics library [[numerics]](./#numerics)
|
||
|
||
## 29.10 Data-parallel types [[simd]](simd#mask.cond)
|
||
|
||
### 29.10.10 basic_mask non-member operations [[simd.mask.nonmembers]](simd.mask.nonmembers#simd.mask.cond)
|
||
|
||
#### 29.10.10.4 basic_mask exposition only conditional operators [simd.mask.cond]
|
||
|
||
[ð](#itemdecl:1)
|
||
|
||
`friend constexpr basic_mask simd-select-impl(
|
||
const basic_mask& mask, const basic_mask& a, const basic_mask& b) noexcept;
|
||
`
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20441)
|
||
|
||
*Returns*: A basic_mask object where the ith element equalsmask[i] ? a[i] : b[i] for all i in the range of
|
||
[0, size())[.](#1.sentence-1)
|
||
|
||
[ð](#itemdecl:2)
|
||
|
||
`friend constexpr basic_mask
|
||
simd-select-impl(const basic_mask& mask, [same_as](concept.same#concept:same_as "18.4.2 Concept same_as [concept.same]")<bool> auto a, [same_as](concept.same#concept:same_as "18.4.2 Concept same_as [concept.same]")<bool> auto b) noexcept;
|
||
`
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20454)
|
||
|
||
*Returns*: A basic_mask object where the ith element equalsmask[i] ? a : b for all i in the range of [0, size())[.](#2.sentence-1)
|
||
|
||
[ð](#itemdecl:3)
|
||
|
||
`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](#3)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20467)
|
||
|
||
*Constraints*:
|
||
|
||
- [(3.1)](#3.1)
|
||
|
||
same_as<T0, T1> is true,
|
||
|
||
- [(3.2)](#3.2)
|
||
|
||
T0 is a vectorizable type, and
|
||
|
||
- [(3.3)](#3.3)
|
||
|
||
sizeof(T0) == Bytes[.](#3.sentence-1)
|
||
|
||
[4](#4)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20478)
|
||
|
||
*Returns*: A vec<T0, size()> object where the ith element equalsmask[i] ? a : b for all i in the range of [0, size())[.](#4.sentence-1)
|