DPC++ Runtime
Runtime libraries for oneAPI Data Parallel C++
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 
12 namespace sycl {
13 
17 template <typename T> class specialization_id {
18 public:
19  using value_type = T;
20 
21  template <class... Args>
22  explicit constexpr specialization_id(Args &&... args)
23  : MDefaultValue(std::forward<Args>(args)...) {}
24 
25  specialization_id(const specialization_id &rhs) = delete;
26  specialization_id(specialization_id &&rhs) = delete;
27  specialization_id &operator=(const specialization_id &rhs) = delete;
28  specialization_id &operator=(specialization_id &&rhs) = delete;
29 
30 private:
31  template <bundle_state State> friend class kernel_bundle;
32  T getDefaultValue() const noexcept { return MDefaultValue; }
33 
34  T MDefaultValue;
35 };
36 
37 } // namespace sycl
38 } // __SYCL_INLINE_NAMESPACE(cl)
cl::sycl::kernel_bundle
The kernel_bundle class represents collection of device images in a particular state.
Definition: kernel.hpp:28
T
cl::sycl::specialization_id
Declaring a specialization constant.
Definition: specialization_id.hpp:17
cl::sycl::specialization_id::specialization_id
constexpr specialization_id(Args &&... args)
Definition: specialization_id.hpp:22
cl
We provide new interfaces for matrix muliply in this patch:
Definition: access.hpp:13
cl::sycl::specialization_id::value_type
T value_type
Definition: specialization_id.hpp:19
std
Definition: accessor.hpp:2532
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition: defines_elementary.hpp:12