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>
inline auto bitwise_and(batch<T, A> const &x, batch<T, A> const &y) noexcept -> decltype(x & y)

Computes the bitwise and of the batches x and y.

Parameters
  • x – batch involved in the operation.

  • y – batch involved in the operation.

Returns

the result of the bitwise and.

template<class T, class A>
inline auto bitwise_and(batch_bool<T, A> const &x, batch_bool<T, A> const &y) noexcept -> decltype(x & y)

Computes the bitwise and of the batches x and y.

Parameters
  • x – batch involved in the operation.

  • y – batch involved in the operation.

Returns

the result of the bitwise and.

template<class T, class A>
inline batch<T, A> bitwise_andnot(batch<T, A> const &x, batch<T, A> const &y) noexcept

Computes the bitwise and not of batches x and y.

Parameters
  • x – batch involved in the operation.

  • y – batch involved in the operation.

Returns

the result of the bitwise and not.

template<class T, class A>
inline batch<T, A> bitwise_not(batch<T, A> const &x) noexcept

Computes the bitwise not of batch x.

Parameters

x – batch involved in the operation.

Returns

the result of the bitwise not.

template<class T, class A>
inline batch_bool<T, A> bitwise_not(batch_bool<T, A> const &x) noexcept

Computes the bitwise not of batch x.

Parameters

x – batch involved in the operation.

Returns

the result of the bitwise not.

template<class T, class A>
inline auto bitwise_or(batch<T, A> const &x, batch<T, A> const &y) noexcept -> decltype(x | y)

Computes the bitwise or of the batches x and y.

Parameters
  • x – scalar or batch of scalars

  • y – scalar or batch of scalars

Returns

the result of the bitwise or.

template<class T, class A>
inline auto bitwise_or(batch_bool<T, A> const &x, batch_bool<T, A> const &y) noexcept -> decltype(x | y)

Computes the bitwise or of the batches x and y.

Parameters
  • x – scalar or batch of scalars

  • y – scalar or batch of scalars

Returns

the result of the bitwise or.

template<class T, class A>
inline auto bitwise_xor(batch<T, A> const &x, batch<T, A> const &y) noexcept -> decltype(x ^ y)

Computes the bitwise xor of the batches x and y.

Parameters
  • x – scalar or batch of scalars

  • y – scalar or batch of scalars

Returns

the result of the bitwise xor.

template<class T, class A>
inline auto bitwise_xor(batch_bool<T, A> const &x, batch_bool<T, A> const &y) noexcept -> decltype(x ^ y)

Computes the bitwise xor of the batches x and y.

Parameters
  • x – scalar or batch of scalars

  • y – scalar or batch of scalars

Returns

the result of the bitwise xor.