Skip to content

Commit

Permalink
Added missing boolean operators in xsimd_api.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
anutosh491 committed Oct 10, 2023
1 parent 6363da9 commit b453df5
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions include/xsimd/types/xsimd_api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,21 @@ namespace xsimd
return x == y;
}

/**
* @ingroup batch_logical
*
* Element-wise equality comparison of batches of boolean values \c x and \c y.
* @param x batch of booleans involved in the comparison.
* @param y batch of booleans involved in the comparison.
* @return a boolean batch.
*/
template <class T, class A>
inline auto eq(batch_bool<T, A> const& x, batch_bool<T, A> const& y) noexcept -> decltype(x == y)
{
detail::static_check_supported_config<T, A>();
return x == y;
}

/**
* @ingroup batch_math
*
Expand Down Expand Up @@ -1521,6 +1536,21 @@ namespace xsimd
return x != y;
}

/**
* @ingroup batch_logical
*
* Element-wise inequality comparison of batches of boolean values \c x and \c y.
* @param x batch of booleans involved in the comparison.
* @param y batch of booleans involved in the comparison.
* @return a boolean batch.
*/
template <class T, class A>
inline auto neq(batch_bool<T, A> const& x, batch_bool<T, A> const& y) noexcept -> decltype(x != y)
{
detail::static_check_supported_config<T, A>();
return x != y;
}

/**
* @ingroup batch_arithmetic
*
Expand Down

0 comments on commit b453df5

Please sign in to comment.