[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]") auto a, [same_as](concept.same#concept:same_as "18.4.2 Concept same_­as [concept.same]") 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 friend constexpr vec 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 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 object where the ith element equalsmask[i] ? a : b for all i in the range of [0, size())[.](#4.sentence-1)