Skip to content

Commit 3fd9a98

Browse files
author
Alexander Batashev
committed
address feedback
1 parent 65f6b2e commit 3fd9a98

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sycl/include/CL/sycl/sub_group.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,16 @@ namespace sycl {
1616
using ext::oneapi::sub_group;
1717
// TODO move the entire sub_group class implementation to this file once
1818
// breaking changes are allowed.
19+
20+
namespace experimental {
21+
inline sub_group this_sub_group() {
22+
#ifdef __SYCL_DEVICE_ONLY__
23+
return sub_group();
24+
#else
25+
throw runtime_error("Sub-groups are not supported on host device.",
26+
PI_INVALID_DEVICE);
27+
#endif
28+
}
29+
} // namespace experimental
1930
} // namespace sycl
2031
} // __SYCL_INLINE_NAMESPACE(cl)

0 commit comments

Comments
 (0)