File tree Expand file tree Collapse file tree 4 files changed +46
-11
lines changed
doc/extensions/experimental
include/sycl/ext/oneapi/experimental Expand file tree Collapse file tree 4 files changed +46
-11
lines changed Original file line number Diff line number Diff line change @@ -471,18 +471,15 @@ class nd_item {
471
471
sycl::ext::oneapi::experimental::root_group<Dimensions> ext_oneapi_get_root_group() const;
472
472
};
473
473
474
- namespace ext {
475
- namespace oneapi {
476
- namespace experimental {
477
- namespace this_kernel {
474
+ namespace ext::oneapi::experimental {
475
+ namespace this_work_item {
478
476
479
477
template <int Dimensions>
480
478
root_group<Dimensions> get_root_group();
481
479
482
- } // namespace this_kernel
483
- } // namespace experimental
484
- } // namespace oneapi
485
- } // namespace ext
480
+ }
481
+
482
+ } // namespace ext::oneapi::experimental
486
483
} // namespace sycl
487
484
----
488
485
@@ -505,6 +502,31 @@ a `sycl::nd_range` argument.
505
502
_Returns_: A `root_group` instance representing the root-group to which the
506
503
calling work-item belongs.
507
504
505
+ === Deprecated functionality
506
+
507
+ The functionality in this section was previously part of this extension, but is
508
+ now deprecated.
509
+
510
+ [source,c++]
511
+ ----
512
+ namespace sycl::ext::oneapi::experimental {
513
+
514
+ namespace this_kernel {
515
+
516
+ template <int Dimensions>
517
+ root_group<Dimensions> get_root_group();
518
+
519
+ } // namespace this_kernel
520
+
521
+ }
522
+ ----
523
+
524
+ [source,c++]
525
+ ----
526
+ template <int Dimensions>
527
+ root_group<Dimensions> get_root_group();
528
+ ----
529
+ _Effects_: Equivalent to `return this_work_item::get_root_group()`.
508
530
509
531
== Implementation notes
510
532
Original file line number Diff line number Diff line change @@ -89,12 +89,21 @@ template <int Dimensions> sycl::sub_group get_child_group(group<Dimensions> g) {
89
89
(void )g;
90
90
return this_sub_group ();
91
91
}
92
-
93
- namespace this_kernel {
92
+ namespace this_work_item {
94
93
template <int Dimensions> root_group<Dimensions> get_root_group () {
95
94
return sycl::ext::oneapi::this_work_item::get_nd_item<Dimensions>()
96
95
.ext_oneapi_get_root_group ();
97
96
}
97
+ } // namespace this_work_item
98
+
99
+ namespace this_kernel {
100
+ template <int Dimensions>
101
+ __SYCL_DEPRECATED (
102
+ " use sycl::ext::oneapi::experimental::this_work_item::get_root_group() "
103
+ " instead" )
104
+ root_group<Dimensions> get_root_group () {
105
+ this_work_item::get_root_group<Dimensions>();
106
+ }
98
107
} // namespace this_kernel
99
108
100
109
} // namespace ext::oneapi::experimental
Original file line number Diff line number Diff line change @@ -52,7 +52,8 @@ void testRootGroup() {
52
52
sycl::group_barrier (root);
53
53
54
54
root =
55
- sycl::ext::oneapi::experimental::this_kernel::get_root_group<1 >();
55
+ sycl::ext::oneapi::experimental::this_work_item::get_root_group<
56
+ 1 >();
56
57
int sum = data[root.get_local_id ()] +
57
58
data[root.get_local_range () - root.get_local_id () - 1 ];
58
59
sycl::group_barrier (root);
Original file line number Diff line number Diff line change @@ -16,5 +16,8 @@ int main() {
16
16
// expected-warning@+1 {{'this_id<1>' is deprecated: use nd_range kernel and sycl::ext::oneapi::this_work_item::get_nd_item() instead}}
17
17
(void )sycl_exp::this_id<1 >();
18
18
19
+ // expected-warning@+1 {{'get_root_group<1>' is deprecated: use sycl::ext::oneapi::experimental::this_work_item::get_root_group() instead}}
20
+ (void )sycl_exp::this_kernel::get_root_group<1 >();
21
+
19
22
return 0 ;
20
23
}
You can’t perform that action at this time.
0 commit comments