DPC++ Runtime
Runtime libraries for oneAPI DPC++
specialization_id.hpp
Go to the documentation of this file.
1 //==---- specialization_id.hpp -- SYCL standard header file ----*- C++ -*---==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #pragma once
10 
11 #include <sycl/detail/defines.hpp> // for __SYCL_TYPE
12 #include <sycl/kernel_bundle_enums.hpp> // for bundle_state
13 
14 #include <utility> // for forward
15 
16 namespace sycl {
17 inline namespace _V1 {
18 
22 template <typename T> class __SYCL_TYPE(specialization_id) specialization_id {
23 public:
24  using value_type = T;
25 
26  template <class... Args>
27  explicit constexpr specialization_id(Args &&...args)
28  : MDefaultValue(std::forward<Args>(args)...) {}
29 
30  specialization_id(const specialization_id &rhs) = delete;
31  specialization_id(specialization_id &&rhs) = delete;
32  specialization_id &operator=(const specialization_id &rhs) = delete;
33  specialization_id &operator=(specialization_id &&rhs) = delete;
34 
35 private:
36  template <bundle_state State> friend class kernel_bundle;
37  T getDefaultValue() const noexcept { return MDefaultValue; }
38 
39  T MDefaultValue;
40 };
41 
42 } // namespace _V1
43 } // namespace sycl
The kernel_bundle class represents collection of device images in a particular state.
PropertyListT int access::address_space multi_ptr & operator=(multi_ptr &&)=default
const void value_type
Definition: multi_ptr.hpp:457
Definition: access.hpp:18
_Abi const simd< _Tp, _Abi > & noexcept
Definition: simd.hpp:1324