-
Notifications
You must be signed in to change notification settings - Fork 787
[NFC][SYCL] Use get_elem_type_t instead of TryToGetElementType<T>::type #12738
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
Conversation
public: | ||
using type = decltype(check(T())); | ||
static constexpr bool value = !std::is_same_v<T, type>; | ||
}; |
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.
Why do we keep TryToGetElementType
?
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.
It has a single remaining use just below at line 650. Note that it's ::value
, not ::type
so I can't do the same replacement as in other places of this PR. I think it's possible to replace that as well somehow, but I've decided to wait until we can drop legacy builtins implementation and remove it after that.
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 see. I personally think value
in this is unintuitive, so I would prefer we replace it, if nothing else then by just replacing the use with !std::is_same_v<T, get_elem_type_t<T>>
.
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.
It's not immediately obvious if that would be an NFC or not, so I won't be doing it here.
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 am fine with my comment being addressed separately, but I also don't think it necessarily muddies this PR too much to just inline the one remaining use case.
public: | ||
using type = decltype(check(T())); | ||
static constexpr bool value = !std::is_same_v<T, type>; | ||
}; |
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 see. I personally think value
in this is unintuitive, so I would prefer we replace it, if nothing else then by just replacing the use with !std::is_same_v<T, get_elem_type_t<T>>
.
No description provided.