Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/experimental/simd/simd/operator cmp"

From cppreference.com
< cpp‎ | experimental‎ | simd‎ | simd
m (See also)
m (See also)
Line 45: Line 45:
 
{{dsc inc|cpp/experimental/simd/dsc popcount}}
 
{{dsc inc|cpp/experimental/simd/dsc popcount}}
 
{{dsc inc|cpp/experimental/simd/dsc find_first_set}}
 
{{dsc inc|cpp/experimental/simd/dsc find_first_set}}
 +
{{dsc inc|cpp/experimental/simd/dsc simd_mask}}
 
{{dsc end}}
 
{{dsc end}}

Revision as of 12:11, 20 March 2023

 
 
Experimental
Technical Specification
Filesystem library (filesystem TS)
Library fundamentals (library fundamentals TS)
Library fundamentals 2 (library fundamentals TS v2)
Library fundamentals 3 (library fundamentals TS v3)
Extensions for parallelism (parallelism TS)
Extensions for parallelism 2 (parallelism TS v2)
Extensions for concurrency (concurrency TS)
Extensions for concurrency 2 (concurrency TS v2)
Concepts (concepts TS)
Ranges (ranges TS)
Reflection (reflection TS)
Mathematical special functions (special functions TR)
Experimental Non-TS
Pattern Matching
Linear Algebra
std::execution
Contracts
2D Graphics
 
 
 
 
friend simd_mask operator==( const simd& lhs, const simd& rhs ) noexcept;
(1) (parallelism TS v2)
friend simd_mask operator!=( const simd& lhs, const simd& rhs ) noexcept;
(2) (parallelism TS v2)
friend simd_mask operator<( const simd& lhs, const simd& rhs ) noexcept;
(3) (parallelism TS v2)
friend simd_mask operator<=( const simd& lhs, const simd& rhs ) noexcept;
(4) (parallelism TS v2)
friend simd_mask operator>( const simd& lhs, const simd& rhs ) noexcept;
(5) (parallelism TS v2)
friend simd_mask operator>=( const simd& lhs, const simd& rhs ) noexcept;
(6) (parallelism TS v2)

Applies the given comparison element-wise to each corresponding element of the operands.

1) Returns a simd_mask where the i-th element equals lhs[i] == rhs[i] for all i in the range of [0size()).
2) Returns a simd_mask where the i-th element equals lhs[i] != rhs[i] for all i in the range of [0size()).
3) Returns a simd_mask where the i-th element equals lhs[i] <  rhs[i] for all i in the range of [0size()).
4) Returns a simd_mask where the i-th element equals lhs[i] <= rhs[i] for all i in the range of [0size()).
5) Returns a simd_mask where the i-th element equals lhs[i] >  rhs[i] for all i in the range of [0size()).
6) Returns a simd_mask where the i-th element equals lhs[i] >= rhs[i] for all i in the range of [0size()).

Parameters

lhs - left operands
rhs - right operands

Example

See also

(parallelism TS v2)
reductions of simd_mask to bool
(function template) [edit]
(parallelism TS v2)
reduction of simd_mask to the number of true values
(function template) [edit]
(parallelism TS v2)
reductions of simd_mask to the index of the first or last true value
(function template) [edit]
(parallelism TS v2)
data-parallel type with the element type bool
(class template) [edit]