命名空间
变体
操作

std::experimental::where

来自 cppreference.cn
< cpp‎ | experimental‎ | simd
 
 
实验性
技术规范
文件系统库 (filesystem TS)
库基础 (library fundamentals TS)
库基础 2 (library fundamentals TS v2)
库基础 3 (library fundamentals TS v3)
并行性扩展 (parallelism TS)
并行性扩展 2 (parallelism TS v2)
并发扩展 (concurrency TS)
并发扩展 2 (concurrency TS v2)
概念 (concepts TS)
范围 (ranges TS)
反射 (reflection TS)
数学特殊函数 (special functions TR)
实验性非TS
模式匹配
线性代数
std::execution
契约
2D 图形
 
 
 
定义于头文件 <experimental/simd>
template< class T, class Abi >

where_expression<simd_mask<T, Abi>, simd<T, Abi>>
    where( const typename simd<T, Abi>::mask_type& mask,

           simd<T, Abi>& value ) noexcept;
(1) (parallelism TS v2)
template< class T, class Abi >

const_where_expression<simd_mask<T, Abi>, const simd<T, Abi>>
    where( const typename simd<T, Abi>::mask_type& mask,

           const simd<T, Abi>& value ) noexcept;
(2) (parallelism TS v2)
template< class T, class Abi >

where_expression<simd_mask<T, Abi>, simd_mask<T, Abi>>
    where( const type_identity_t<simd_mask<T, Abi>>& mask,

           simd_mask<T, Abi>& value ) noexcept;
(3) (parallelism TS v2)
template< class T, class Abi >

const_where_expression<simd_mask<T, Abi>, const simd_mask<T, Abi>>
    where( const type_identity_t<simd_mask<T, Abi>>& mask,

           const simd_mask<T, Abi>& value ) noexcept;
(4) (parallelism TS v2)
template< class T >

where_expression<bool, T>

    where( /* 见下方 */ mask, T& value ) noexcept;
(5) (parallelism TS v2)
template< class T >

const_where_expression<bool, const T>

    where( /* 见下方 */ mask, const T& value ) noexcept;
(6) (parallelism TS v2)

构造一个新的 const_where_expressionwhere_expression

1-6) 从给定的掩码和值参数构造一个 where_expression

内容

[编辑] 参数

1-4)
mask - simd_mask 对象 simd_mask
value - 掩码应用到的 simd 对象的引用 simd
5,6)
mask - bool 类型的掩码 bool
value - 掩码应用到的标量的引用

[编辑] 返回值

构造的 const_where_expressionwhere_expression

[编辑] 注释

5,6) 使用实现定义的掩码类型,以便禁用从其他类型到 bool 的隐式转换。

[编辑] 示例