Skip to content

Conversation

@slawekptak
Copy link
Contributor

@slawekptak slawekptak commented Nov 25, 2025

Change the way KernelType is defined, so the const and reference declarations are removed. Also, use std::decay_t and/or detail::nth_type_t where applicable.

The KernelType definition, used to check if a kernel is using
a kernel_handler argument, should be a pure lambda type,
so remove const and reference declarations.
Copy link
Contributor

@aelovikov-intel aelovikov-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While on it, I'd suggest using

#if __has_builtin(__type_pack_element)
template <int N, typename... Ts>
using nth_type_t = __type_pack_element<N, Ts...>;
#else
template <int N, typename T, typename... Ts> struct nth_type {
using type = typename nth_type<N - 1, Ts...>::type;
};
template <typename T, typename... Ts> struct nth_type<0, T, Ts...> {
using type = T;
};
template <int N, typename... Ts>
using nth_type_t = typename nth_type<N, Ts...>::type;
#endif

and change to std::decay_t<detail::nth_type_t<RestT...>>.

@slawekptak slawekptak changed the title [SYCL] Fix KernelType definition [SYCL] Change KernelType definition to use std::decay_t Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants