-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL] Decouple data types of SYCL builtins from OpenCL. #669
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] Decouple data types of SYCL builtins from OpenCL. #669
Conversation
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.
LGTM, some minor comments.
474b396
to
cb1f51d
Compare
return __sycl_std::__invoke_half_sqrt<T>(x); | ||
} | ||
|
||
// genfloatf tan (genfloatf x) | ||
template <typename T> | ||
typename std::enable_if<detail::is_genfloatf<T>::value, T>::type | ||
tan(T x) __NOEXC { | ||
detail::enable_if_t<detail::is_genfloatf<T>::value, T> tan(T x) __NOEXC { |
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.
Arrived here I have an overdose of detail::enable_if_t<detail::is_genfloatf<T>::value, T>
:-)
What about defining a meta-function with using
to factorize out this?
Add as many meta-function you can to reduce the code size...
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.
Hi, I agree with your comment, but I'd prefer not to inflate this patch any further.
In the near future I will create a couple of patches for this functionality and I will apply your suggestion in them.
Could you provide a small code snippet of what you would like this code to look like?
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.
We need to find a name understandable by native English speakers, which I am not...
A few ideas
detail::enable_if_genfloat_t<T> tan(T x) __NOEXC {
detail::only_genfloat_t<T> tan(T x) __NOEXC {
detail::only<detail::is_genfloatf, T> tan(T x) __NOEXC {
cb1f51d
to
5f1d64b
Compare
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.
LGTM, approved unless @keryell has any further comments
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.
A few minor comments.
Removed all use of OpenCL types from SYCL header files, aside from converting into SPIRV type. Removed some code dublications. Aligned built-in's host version with SPIRV types. Aligned nan built-in implementation with SYCL specification. Renamed detail/type_tratis.hpp to detail/std_type_tratis.hpp Updated SFINAE logic of intel/sub_group.hpp Added test for built-in's type_tratis Signed-off-by: Alexey Voronov <[email protected]>
5f1d64b
to
0f3c5db
Compare
Signed-off-by: Alexey Voronov [email protected]