Bitwise operators

bitwise_not()

per slot bitwise not

bitwise_or()

per slot bitwise or

bitwise_xor()

per slot bitwise xor

bitwise_and()

per slot bitwise and

bitwise_andnot()

per slot bitwise and not


template <class T, class A>
auto xsimd::bitwise_and(batch<T, A> const &x, batch<T, A> const &y)

Computes the bitwise and of the batches x and y.

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>
auto xsimd::bitwise_and(batch_bool<T, A> const &x, batch_bool<T, A> const &y)

Computes the bitwise and of the batches x and y.

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>
batch<T, A> xsimd::bitwise_andnot(batch<T, A> const &x, batch<T, A> const &y)

Computes the bitwise and not of batches x and y.

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>
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>
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>
auto xsimd::bitwise_or(batch<T, A> const &x, batch<T, A> const &y)

Computes the bitwise or of the batches x and y.

Return

the result of the bitwise or.

Parameters
  • x: scalar or batch of scalars

  • y: scalar or batch of scalars

template <class T, class A>
auto xsimd::bitwise_or(batch_bool<T, A> const &x, batch_bool<T, A> const &y)

Computes the bitwise or of the batches x and y.

Return

the result of the bitwise or.

Parameters
  • x: scalar or batch of scalars

  • y: scalar or batch of scalars

template <class T, class A>
auto xsimd::bitwise_xor(batch<T, A> const &x, batch<T, A> const &y)

Computes the bitwise xor of the batches x and y.

Return

the result of the bitwise xor.

Parameters
  • x: scalar or batch of scalars

  • y: scalar or batch of scalars

template <class T, class A>
auto xsimd::bitwise_xor(batch_bool<T, A> const &x, batch_bool<T, A> const &y)

Computes the bitwise xor of the batches x and y.

Return

the result of the bitwise xor.

Parameters
  • x: scalar or batch of scalars

  • y: scalar or batch of scalars