Skip to content

sycl::is_group is missing #8704

Closed
Closed
@Pennycook

Description

@Pennycook

Describe the bug
sycl::is_group is missing, and sycl::is_group_v is defined directly in terms of some structs in detail:

template <class T>
inline constexpr bool is_group_v =
detail::is_group<T>::value || detail::is_sub_group<T>::value;

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.

Metadata

Metadata

Assignees

Labels

CTSImpacts Khronos SYCL CTSbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions