Skip to content

Commit d5e10a2

Browse files
committed
Merge branch 'private/dvodopya/move-__buildin_unique_stable_name-to-separate-header' of github.com:dm-vodopyanov/llvm into private/dvodopya/move-__buildin_unique_stable_name-to-separate-header
2 parents 8e58b19 + b73a756 commit d5e10a2

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

sycl/include/CL/sycl/detail/spec_const_integration.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ namespace sycl {
1616
namespace detail {
1717

1818
#if __cplusplus >= 201703L
19-
// Translates SYCL 2020 specialization constant type to its name.
19+
// Translates SYCL 2020 `specialization_id` to a unique symbolic identifier
20+
// which is used internally by the toolchain
2021
template <auto &SpecName> const char *get_spec_constant_symbolic_ID() {
2122
return get_spec_constant_symbolic_ID_impl<SpecName>();
2223
}

sycl/include/CL/sycl/kernel_bundle.hpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,7 @@ class kernel_bundle : public detail::kernel_bundle_plain {
263263
/// \returns true if any device image in the kernel_bundle uses specialization
264264
/// constant whose address is SpecName
265265
template <auto &SpecName> bool has_specialization_constant() const noexcept {
266-
const char *SpecSymName =
267-
detail::get_spec_constant_symbolic_ID<SpecName>();
266+
const char *SpecSymName = detail::get_spec_constant_symbolic_ID<SpecName>();
268267
return has_specialization_constant_impl(SpecSymName);
269268
}
270269

@@ -275,8 +274,7 @@ class kernel_bundle : public detail::kernel_bundle_plain {
275274
typename = detail::enable_if_t<_State == bundle_state::input>>
276275
void set_specialization_constant(
277276
typename std::remove_reference_t<decltype(SpecName)>::value_type Value) {
278-
const char *SpecSymName =
279-
detail::get_spec_constant_symbolic_ID<SpecName>();
277+
const char *SpecSymName = detail::get_spec_constant_symbolic_ID<SpecName>();
280278
set_specialization_constant_impl(SpecSymName, &Value,
281279
sizeof(decltype(Value)));
282280
}
@@ -286,8 +284,7 @@ class kernel_bundle : public detail::kernel_bundle_plain {
286284
template <auto &SpecName>
287285
typename std::remove_reference_t<decltype(SpecName)>::value_type
288286
get_specialization_constant() const {
289-
const char *SpecSymName =
290-
detail::get_spec_constant_symbolic_ID<SpecName>();
287+
const char *SpecSymName = detail::get_spec_constant_symbolic_ID<SpecName>();
291288
if (!is_specialization_constant_set(SpecSymName))
292289
return SpecName.getDefaultValue();
293290

0 commit comments

Comments
 (0)