Batch of conditions
-
template<class T, class A = default_arch>
class batch_bool : public types::get_bool_simd_register_t<T, default_arch> batch of predicate over scalar or complex values.
Abstract representation of a predicate over SIMD register for scalar or complex values.
- Template Parameters:
T – the type of the predicated values.
A – the architecture this batch is tied too.
Public Types
-
using value_type = bool
Type of the scalar elements within this batch.
-
using register_type = typename base_type::register_type
SIMD register type abstracted by this batch.
Public Functions
-
XSIMD_INLINE batch_bool() = default
Create a batch initialized with undefined values.
- XSIMD_INLINE uint64_t mask () const noexcept
Extract a scalar mask representation from this
batch_bool
.- Returns:
bit mask
Public Static Functions
- static XSIMD_INLINE batch_bool from_mask (uint64_t mask) noexcept
Extract a scalar mask representation from this
batch_bool
.- Returns:
bit mask
Logical operators
- template<class T, class A> XSIMD_INLINE batch_bool< T, A > bitwise_andnot (batch_bool< T, A > const &x, batch_bool< T, A > const &y) noexcept
Computes the bitwise and not of batches
x
andy
.- Parameters:
x – batch involved in the operation.
y – batch involved in the operation.
- Returns:
the result of the bitwise and not.
Reducers
- template<class T, class A> XSIMD_INLINE bool all (batch_bool< T, A > const &x) noexcept
Returns true if all the boolean values in the batch are true, false otherwise.
- Parameters:
x – the batch to reduce.
- Returns:
a boolean scalar.
- template<class T, class A> XSIMD_INLINE bool any (batch_bool< T, A > const &x) noexcept
Return true if any of the boolean values in the batch is true, false otherwise.
- Parameters:
x – the batch to reduce.
- Returns:
a boolean scalar.
- template<class T, class A> XSIMD_INLINE bool none (batch_bool< T, A > const &x) noexcept
Return true if none of the boolean values in the batch is true, false otherwise.
- Parameters:
x – the batch to reduce.
- Returns:
a boolean scalar.