[llvm] [libsycl] Add device image registration & compatibility check (PR #187528)
Alexey Bader via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 5 11:29:14 PDT 2026
================
@@ -0,0 +1,77 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBSYCL_KERNEL_ID
+#define _LIBSYCL_KERNEL_ID
+
+#include <sycl/__impl/detail/config.hpp>
+#include <sycl/__impl/detail/obj_utils.hpp>
+
+#include <memory>
+#include <string>
+
+_LIBSYCL_BEGIN_NAMESPACE_SYCL
+
+namespace detail {
+/// The class is impl counterpart for sycl::kernel_id which represent a kernel
+/// identificator.
+class KernelIdImpl {
+public:
+ KernelIdImpl(std::string_view Name) : MName(std::move(Name)) {}
+ KernelIdImpl() {}
+ /// \return a null-terminated string representing the name of kernel this id
+ /// stands for.
+ const char *get_name() { return MName.data(); }
+
+private:
+ std::string MName;
+};
+} // namespace detail
+
+// TODO: It is not exported now, but is a part of SYCL spec.
----------------
bader wrote:
This is inconsistent with the existing approach where you add "incomplete" implementation of classes to corresponding files.
https://github.com/llvm/llvm-project/pull/187528
More information about the llvm-commits
mailing list