Skip to content

Commit 19369b6

Browse files
[SYCL] Resolve namespace ambiguity in this_id, this_item, and this_group (#5375)
Since the `detail` namespace appears in both the `sycl` namespace and in the `sycl::ext::oneapi::experimental` namespace, the implementation of `sycl::ext::oneapi::experimental::this_id`, `sycl::ext::oneapi::experimental::this_item`, and `sycl::ext::oneapi::experimental::this_group` may fail due to `detail::declptr` not existing in the latter. These changes remove the ambiguity. Signed-off-by: Steffen Larsen <steffen.larsen@intel.com>
1 parent 912fde3 commit 19369b6

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

sycl/include/CL/sycl/group.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,8 @@ namespace oneapi {
439439
namespace experimental {
440440
template <int Dims> group<Dims> this_group() {
441441
#ifdef __SYCL_DEVICE_ONLY__
442-
return sycl::detail::Builder::getElement(detail::declptr<group<Dims>>());
442+
return sycl::detail::Builder::getElement(
443+
sycl::detail::declptr<group<Dims>>());
443444
#else
444445
throw sycl::exception(
445446
sycl::make_error_code(sycl::errc::feature_not_supported),

sycl/include/CL/sycl/id.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ namespace oneapi {
360360
namespace experimental {
361361
template <int Dims> id<Dims> this_id() {
362362
#ifdef __SYCL_DEVICE_ONLY__
363-
return sycl::detail::Builder::getElement(detail::declptr<id<Dims>>());
363+
return sycl::detail::Builder::getElement(sycl::detail::declptr<id<Dims>>());
364364
#else
365365
throw sycl::exception(
366366
sycl::make_error_code(sycl::errc::feature_not_supported),

sycl/include/CL/sycl/item.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ namespace oneapi {
150150
namespace experimental {
151151
template <int Dims> item<Dims> this_item() {
152152
#ifdef __SYCL_DEVICE_ONLY__
153-
return sycl::detail::Builder::getElement(detail::declptr<item<Dims>>());
153+
return sycl::detail::Builder::getElement(sycl::detail::declptr<item<Dims>>());
154154
#else
155155
throw sycl::exception(
156156
sycl::make_error_code(sycl::errc::feature_not_supported),

0 commit comments

Comments
 (0)