Description
Describe the bug
sycl::is_group
is missing, and sycl::is_group_v
is defined directly in terms of some structs in detail
:
llvm/sycl/include/sycl/detail/type_traits.hpp
Lines 67 to 69 in 90e0e65
To Reproduce
#include <sycl/sycl.hpp>
static_assert(sycl::is_group<sycl::group<1>>::value);
static_assert(sycl::is_group<sycl::sub_group>::value);
The above fails to compile, producing errors like:
test.cpp:3:15: error: no template named 'is_group' in namespace 'sycl'; did you mean 'sycl::detail::is_group'?
static_assert(sycl::is_group<sycl::group<1>>::value);
^~~~~~~~~~~~~~
sycl::detail::is_group
Environment:
- OS: Linux
- Target device and vendor: N/A
- DPC++ version: 90e0e65
- Dependencies version: N/A
Additional context
We should match the behavior described in Section 4.17.3.1 of the SYCL 2020 specification; in addition to defining sycl::is_group
, we should define sycl::is_group_v
in terms of that trait.
I'm trying to implement some new group types, and I expected to be able to just define a new specialization of sycl::is_group
for those classes. I'm afraid to update the definition of sycl::is_group_v
myself because I'm not sure what will break.