Bitwise operatorsΒΆ
|
per slot bitwise not |
|
per slot bitwise or |
|
per slot bitwise xor |
|
per slot bitwise and |
|
per slot bitwise and not |
|
per slot bitwise and |
|
per slot bitwise and not |
|
per slot rotate right |
|
per slot rotate left |
- template <class T, class A>
-
XSIMD_INLINE auto xsimd::bitwise_and(batch< T, A > const & x, batch< T, A > const & y) Computes the bitwise and of the batches
xandy.- Return
the result of the bitwise and.
- Parameters
x: batch involved in the operation.y: batch involved in the operation.
- template <class T, class A>
-
XSIMD_INLINE auto xsimd::bitwise_and(batch_bool< T, A > const & x, batch_bool< T, A > const & y) Computes the bitwise and of the batches
xandy.- Return
the result of the bitwise and.
- Parameters
x: batch involved in the operation.y: batch involved in the operation.
- template <class T, class A>
-
XSIMD_INLINE batch<T, A> xsimd::bitwise_andnot(batch< T, A > const & x, batch< T, A > const & y) Computes the bitwise and not of batches
xandy.- Return
the result of the bitwise and not.
- Parameters
x: batch involved in the operation.y: batch involved in the operation.
- template <class T, class A>
-
XSIMD_INLINE batch<T, A> xsimd::bitwise_lshift(batch< T, A > const & x, int shift) Perform a bitwise shift to the left.
- Return
shifted
x.- Parameters
x: batch ofT_inshift: scalar amount to shift
- template <class T, class A>
-
XSIMD_INLINE batch<T, A> xsimd::bitwise_not(batch< T, A > const & x) Computes the bitwise not of batch
x.- Return
the result of the bitwise not.
- Parameters
x: batch involved in the operation.
- template <class T, class A>
-
XSIMD_INLINE batch_bool<T, A> xsimd::bitwise_not(batch_bool< T, A > const & x) Computes the bitwise not of batch
x.- Return
the result of the bitwise not.
- Parameters
x: batch involved in the operation.
- template <class T, class A>
-
XSIMD_INLINE auto xsimd::bitwise_or(batch< T, A > const & x, batch< T, A > const & y) Computes the bitwise or of the batches
xandy.- Return
the result of the bitwise or.
- Parameters
x: scalar or batch of scalarsy: scalar or batch of scalars
- template <class T, class A>
-
XSIMD_INLINE auto xsimd::bitwise_or(batch_bool< T, A > const & x, batch_bool< T, A > const & y) Computes the bitwise or of the batches
xandy.- Return
the result of the bitwise or.
- Parameters
x: scalar or batch of scalarsy: scalar or batch of scalars
- template <class T, class A>
-
XSIMD_INLINE batch<T, A> xsimd::bitwise_rshift(batch< T, A > const & x, int shift) Perform a bitwise shift to the right.
- Return
shifted
x.- Parameters
x: batch ofT_inshift: scalar amount to shift
- template <class T, class A>
-
XSIMD_INLINE auto xsimd::bitwise_xor(batch< T, A > const & x, batch< T, A > const & y) Computes the bitwise xor of the batches
xandy.- Return
the result of the bitwise xor.
- Parameters
x: scalar or batch of scalarsy: scalar or batch of scalars
- template <class T, class A>
-
XSIMD_INLINE auto xsimd::bitwise_xor(batch_bool< T, A > const & x, batch_bool< T, A > const & y) Computes the bitwise xor of the batches
xandy.- Return
the result of the bitwise xor.
- Parameters
x: scalar or batch of scalarsy: scalar or batch of scalars
- template <class T, class A>
-
XSIMD_INLINE batch<T, A> xsimd::rotl(batch< T, A > const & x, int shift) Perform a bitwise shift to the left, reintroducing the shifted out bits to the right.
- Return
rotated
x.- Parameters
x: batch to rotateshift: scalar amount to shift
- template <class T, class A>
-
XSIMD_INLINE batch<T, A> xsimd::rotr(batch< T, A > const & x, int shift) Perform a bitwise shift to the right, reintroducing the shifted out bits to the left.
- Return
rotated
x.- Parameters
x: batch to rotateshift: scalar amount to shift