Comparison operatorsΒΆ
Ordering:
|
per slot equals to comparison |
|
per slot different from comparison |
|
per slot strictly greater than comparison |
|
per slot strictly lower than comparison |
|
per slot greater or equal to comparison |
|
per slot lower or equal to comparison |
Parity check:
|
per slot check for evenness |
|
per slot check for oddness |
Floating point number check:
|
per slot check for infinity |
|
per slot check for NaN |
|
per slot check for finite number |
|
per slot check for float representing an integer |
- template <class T, class A>
-
XSIMD_INLINE auto xsimd::eq(batch< T, A > const & x, batch< T, A > const & y) Element-wise equality comparison of batches
xandy.- Return
a boolean batch.
- Parameters
x: batch of scalarsy: batch of scalars
- template <class T, class A>
-
XSIMD_INLINE auto xsimd::eq(batch_bool< T, A > const & x, batch_bool< T, A > const & y) Element-wise equality comparison of batches of boolean values
xandy.- Return
a boolean batch.
- Parameters
x: batch of booleans involved in the comparison.y: batch of booleans involved in the comparison.
- template <class T, class A>
-
XSIMD_INLINE batch_bool<T, A> xsimd::ge(batch< T, A > const & x, batch< T, A > const & y) Element-wise greater or equal comparison of batches
xandy.- Return
a boolean batch.
- Template Parameters
X: the actual type of batch.
- Parameters
x: batch involved in the comparison.y: batch involved in the comparison.
- template <class T, class A>
-
XSIMD_INLINE batch_bool<T, A> xsimd::gt(batch< T, A > const & x, batch< T, A > const & y) Element-wise greater than comparison of batches
xandy.- Return
a boolean batch.
- Template Parameters
X: the actual type of batch.
- Parameters
x: batch involved in the comparison.y: batch involved in the comparison.
- template <class T, class A>
-
XSIMD_INLINE batch_bool<T, A> xsimd::is_even(batch< T, A > const & x) Determines if the scalars in the given batch
xrepresent an even integer value.- Return
a batch of booleans.
- Parameters
x: batch of floating point values.
- template <class T, class A>
-
XSIMD_INLINE batch_bool<T, A> xsimd::is_flint(batch< T, A > const & x) Determines if the floating-point scalars in the given batch
xrepresent integer value.- Return
a batch of booleans.
- Parameters
x: batch of floating point values.
- template <class T, class A>
-
XSIMD_INLINE batch_bool<T, A> xsimd::is_odd(batch< T, A > const & x) Determines if the scalars in the given batch
xrepresent an odd integer value.- Return
a batch of booleans.
- Parameters
x: batch of floating point values.
- template <class T, class A>
-
XSIMD_INLINE batch<T, A>::batch_bool_type xsimd::isinf(batch< T, A > const & x) Determines if the scalars in the given batch
xare inf values.- Return
a batch of booleans.
- Parameters
x: batch of floating point values.
- template <class T, class A>
-
XSIMD_INLINE batch<T, A>::batch_bool_type xsimd::isfinite(batch< T, A > const & x) Determines if the scalars in the given batch
xare finite values.- Return
a batch of booleans.
- Parameters
x: batch of floating point values.
- template <class T, class A>
-
XSIMD_INLINE batch<T, A>::batch_bool_type xsimd::isnan(batch< T, A > const & x) Determines if the scalars in the given batch
xare NaN values.- Return
a batch of booleans.
- Parameters
x: batch of floating point values.
- template <class T, class A>
-
XSIMD_INLINE batch_bool<T, A> xsimd::le(batch< T, A > const & x, batch< T, A > const & y) Element-wise lesser or equal to comparison of batches
xandy.- Return
a boolean batch.
- Parameters
x: batch involved in the comparison.y: batch involved in the comparison.
- template <class T, class A>
-
XSIMD_INLINE batch_bool<T, A> xsimd::lt(batch< T, A > const & x, batch< T, A > const & y) Element-wise lesser than comparison of batches
xandy.- Return
a boolean batch.
- Parameters
x: batch involved in the comparison.y: batch involved in the comparison.
- template <class T, class A>
-
XSIMD_INLINE auto xsimd::neq(batch< T, A > const & x, batch< T, A > const & y) Element-wise inequality comparison of batches
xandy.- Return
a boolean batch.
- Parameters
x: batch involved in the comparison.y: batch involved in the comparison.
- template <class T, class A>
-
XSIMD_INLINE auto xsimd::neq(batch_bool< T, A > const & x, batch_bool< T, A > const & y) Element-wise inequality comparison of batches of boolean values
xandy.- Return
a boolean batch.
- Parameters
x: batch of booleans involved in the comparison.y: batch of booleans involved in the comparison.