DPC++ Runtime
Runtime libraries for oneAPI DPC++
sub_group.hpp
Go to the documentation of this file.
1
//==----------- sub_group.hpp --- SYCL sub-group ---------------------------==//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#pragma once
10
11
#include <
sycl/ext/oneapi/sub_group.hpp
>
12
#include <
sycl/group.hpp
>
13
14
namespace
sycl
{
15
__SYCL_INLINE_VER_NAMESPACE
(_V1) {
16
using
ext::oneapi::sub_group;
17
// TODO move the entire sub_group class implementation to this file once
18
// breaking changes are allowed.
19
20
namespace
ext::oneapi::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."
,
26
PI_ERROR_INVALID_DEVICE);
27
#endif
28
}
29
}
// namespace ext::oneapi::experimental
30
}
// __SYCL_INLINE_VER_NAMESPACE(_V1)
31
}
// namespace sycl
__SYCL_INLINE_VER_NAMESPACE
#define __SYCL_INLINE_VER_NAMESPACE(X)
Definition:
defines_elementary.hpp:11
sycl
---— Error handling, matching OpenCL plugin semantics.
Definition:
access.hpp:14
group.hpp
sycl::_V1::ext::oneapi::experimental::this_sub_group
sub_group this_sub_group()
Definition:
sub_group.hpp:21
sub_group.hpp
sycl::_V1::ext::oneapi::sub_group
Definition:
sub_group.hpp:131
include
sycl
sub_group.hpp
Generated by
1.8.17