simd_batch_bool¶

template <class X>
classsimd_batch_bool
¶ Base class for batch of boolean values.
The simd_batch_bool class is the base class for all classes representing a batch of boolean values. Batch of boolean values is meant for operations that may involve batches of integer or floating point values. Thus, the boolean values are stored as integer or floating point values, and each type of batch has its dedicated type of boolean batch.
 See
 simd_batch
 Template Parameters
X
: The derived type
Subclassed by xsimd::simd_complex_batch_bool< X >
Bitwise computed assignement

X &
operator&=
(const X &rhs)¶ Assigns the bitwise and of
rhs
andthis
. Return
 a reference to
this
.  Parameters
rhs
: the batch involved in the operation.

X &
operator=
(const X &rhs)¶ Assigns the bitwise or of
rhs
andthis
. Return
 a reference to
this
.  Parameters
rhs
: the batch involved in the operation.

X &
operator^=
(const X &rhs)¶ Assigns the bitwise xor of
rhs
andthis
. Return
 a reference to
this
.  Parameters
rhs
: the batch involved in the operation.
Static downcast functions

X &
operator()
()¶ Returns a reference to the actual derived type of the simd_batch_bool.

const X &
operator()
() const¶ Returns a constant reference to the actual derived type of the simd_batch_bool.
Bitwise operators¶

template <class X>
Xxsimd
::
operator&
(const simd_batch_bool<X> &lhs, const simd_batch_bool<X> &rhs)¶ Computes the bitwise and of batches
lhs
andrhs
. Return
 the result of the bitwise and.
 Template Parameters
X
: the actual type of boolean batch.
 Parameters
lhs
: batch involved in the operation.rhs
: batch involved in the operation.

template <class X>
Xxsimd
::
operator
(const simd_batch_bool<X> &lhs, const simd_batch_bool<X> &rhs)¶ Computes the bitwise or of batches
lhs
andrhs
. Return
 the result of the bitwise or.
 Template Parameters
X
: the actual type of boolean batch.
 Parameters
lhs
: batch involved in the operation.rhs
: batch involved in the operation.

template <class X>
Xxsimd
::
operator^
(const simd_batch_bool<X> &lhs, const simd_batch_bool<X> &rhs)¶ Computes the bitwise xor of batches
lhs
andrhs
. Return
 the result of the bitwise xor.
 Template Parameters
X
: the actual type of boolean batch.
 Parameters
lhs
: batch involved in the operation.rhs
: batch involved in the operation.

template <class X>
Xxsimd
::
operator~
(const simd_batch_bool<X> &rhs)¶ Computes the bitwise not of batch
rhs
. Return
 the result of the bitwise not.
 Template Parameters
X
: the actual type of boolean batch.
 Parameters
rhs
: batch involved in the operation.

template <class X>
Xxsimd
::
bitwise_andnot
(const simd_batch_bool<X> &lhs, const simd_batch_bool<X> &rhs)¶ Computes the bitwise and not of batches
lhs
andrhs
. Return
 the result of the bitwise and not.
 Template Parameters
X
: the actual type of boolean batch.
 Parameters
lhs
: batch involved in the operation.rhs
: batch involved in the operation.
Logical operators¶

template <class X>
Xxsimd
::
operator&&
(const simd_batch_bool<X> &lhs, const simd_batch_bool<X> &rhs)¶ Computes the logical and of batches
lhs
andrhs
. Return
 the result of the logical and.
 Template Parameters
X
: the actual type of boolean batch.
 Parameters
lhs
: batch involved in the operation.rhs
: batch involved in the operation.

template <class X>
Xxsimd
::
operator&&
(const simd_batch_bool<X> &lhs, bool rhs)¶ Computes the logical and of the batch
lhs
and the scalarrhs
.Equivalent to the logical and of two boolean batches, where all the values of the second one are initialized to
rhs
. Return
 the result of the logical and.
 Template Parameters
X
: the actual type of boolean batch.
 Parameters
lhs
: batch involved in the operation.rhs
: boolean involved in the operation.

template <class X>
Xxsimd
::
operator&&
(bool lhs, const simd_batch_bool<X> &rhs)¶ Computes the logical and of the scalar
lhs
and the batchrhs
.Equivalent to the logical and of two boolean batches, where all the values of the first one are initialized to
lhs
. Return
 the result of the logical and.
 Template Parameters
X
: the actual type of boolean batch.
 Parameters
lhs
: boolean involved in the operation.rhs
: batch involved in the operation.

template <class X>
Xxsimd
::
operator
(const simd_batch_bool<X> &lhs, const simd_batch_bool<X> &rhs)¶ Computes the logical or of batches
lhs
andrhs
. Return
 the result of the logical or.
 Template Parameters
X
: the actual type of boolean batch.
 Parameters
lhs
: batch involved in the operation.rhs
: batch involved in the operation.

template <class X>
Xxsimd
::
operator
(const simd_batch_bool<X> &lhs, bool rhs)¶ Computes the logical or of the batch
lhs
and the scalarrhs
.Equivalent to the logical or of two boolean batches, where all the values of the second one are initialized to
rhs
. Return
 the result of the logical or.
 Template Parameters
X
: the actual type of boolean batch.
 Parameters
lhs
: batch involved in the operation.rhs
: boolean involved in the operation.

template <class X>
Xxsimd
::
operator
(bool lhs, const simd_batch_bool<X> &rhs)¶ Computes the logical or of the scalar
lhs
and the batchrhs
.Equivalent to the logical or of two boolean batches, where all the values of the first one are initialized to
lhs
. Return
 the result of the logical or.
 Template Parameters
X
: the actual type of boolean batch.
 Parameters
lhs
: boolean involved in the operation.rhs
: batch involved in the operation.
Comparison operators¶

template <class X>
Xxsimd
::
operator==
(const simd_batch_bool<X> &lhs, const simd_batch_bool<X> &rhs)¶ Elementwise equality of batches
lhs
andrhs
. Return
 the result of the equality comparison.
 Parameters
lhs
: batch involved in the comparison.rhs
: batch involved in the comparison.

template <class X>
Xxsimd
::
operator!=
(const simd_batch_bool<X> &lhs, const simd_batch_bool<X> &rhs)¶ Elementwise inequality of batches
lhs
andrhs
. Return
 the result of the inequality comparison.
 Parameters
lhs
: batch involved in the comparison.rhs
: batch involved in the comparison.
Reducers¶

template <class X>
boolxsimd
::
all
(const simd_batch_bool<X> &rhs)¶ Returns true if all the boolean values in the batch are true, false otherwise.
 Return
 a boolean scalar.
 Parameters
rhs
: the batch to reduce.

template <class X>
boolxsimd
::
any
(const simd_batch_bool<X> &rhs)¶ Return true if any of the boolean values in the batch is true, false otherwise.
 Return
 a boolean scalar.
 Parameters
rhs
: the batch to reduce.