-
Notifications
You must be signed in to change notification settings - Fork 755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYCL][COMPAT] Added compare and unordered compare operations #12998
Conversation
d896b6b
to
57e1d49
Compare
sycl/doc/syclcompat/README.md
Outdated
template <typename ValueT, class BinaryOperation> | ||
inline std::enable_if_t< | ||
std::is_same_v<std::invoke_result_t<BinaryOperation, ValueT, ValueT>, bool>, | ||
bool> | ||
compare(const ValueT a, const ValueT b, const BinaryOperation binary_op); | ||
template <typename ValueT> | ||
inline std::enable_if_t< | ||
std::is_same_v<std::invoke_result_t<std::not_equal_to<>, ValueT, ValueT>, | ||
bool>, | ||
bool> | ||
compare(const ValueT a, const ValueT b, const std::not_equal_to<> binary_op); | ||
template <typename ValueT, class BinaryOperation> | ||
inline std::enable_if_t<ValueT::size() == 2, ValueT> | ||
compare(const ValueT a, const ValueT b, const BinaryOperation binary_op); | ||
template <typename ValueT, class BinaryOperation> | ||
inline std::enable_if_t< | ||
std::is_same_v<std::invoke_result_t<BinaryOperation, ValueT, ValueT>, bool>, | ||
bool> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we format this differently, it is very challenging to read?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've substituted the enable if by a comment that includes the enable_if and what the enable_if does. It's technically describing the line of code, but as you say the three nested std::
calls is difficult to read.
I also removed the not_equal_to<>
specialization, as it is more an implementation detail.
35a0f97
to
568f77a
Compare
@intel/llvm-gatekeepers This is ready to merge. AWS CI check fails due to an unrelated test. Related issue: #13281 |
Adds the following ordered and unordered comparisons: