[llvm] [SYCL] Add platform enumeration and info query using liboffload (PR #166927)
Kseniya Tikhomirova via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 18 03:28:27 PST 2025
================
@@ -0,0 +1,76 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// This file contains helper functions for tranformation between implementation
+/// and SYCL's interface objects.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBSYCL___IMPL_DETAIL_OBJ_UTILS_HPP
+#define _LIBSYCL___IMPL_DETAIL_OBJ_UTILS_HPP
+
+#include <sycl/__impl/detail/config.hpp>
+
+#include <cassert>
+#include <memory>
+#include <optional>
+#include <type_traits>
+#include <utility>
+
+_LIBSYCL_BEGIN_NAMESPACE_SYCL
+
+namespace detail {
+
+// Note! This class relies on the fact that all SYCL interface
+// classes contain "impl" field that points to implementation object. "impl"
+// field should be accessible from this class.
----------------
KseniyaTikhomirova wrote:
I believe that main justification is that pimpl idiom fits into common reference semantics really well https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:reference-semantics.
https://github.com/llvm/llvm-project/pull/166927
More information about the llvm-commits
mailing list