DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl_mem_obj_t.hpp
Go to the documentation of this file.
1 //==------------ sycl_mem_obj_t.hpp - SYCL standard header file ------------==//
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 
16 #include <CL/sycl/event.hpp>
20 #include <CL/sycl/stl.hpp>
21 
22 #include <cstring>
23 #include <memory>
24 #include <type_traits>
25 
27 namespace sycl {
28 namespace detail {
29 
30 // Forward declarations
31 class context_impl;
32 class event_impl;
33 class plugin;
34 
35 using ContextImplPtr = std::shared_ptr<context_impl>;
36 using EventImplPtr = std::shared_ptr<event_impl>;
37 
38 template <typename T>
39 class aligned_allocator;
41 
42 // The class serves as a base for all SYCL memory objects.
43 class __SYCL_EXPORT SYCLMemObjT : public SYCLMemObjI {
44 
45  // The check for output iterator is commented out as it blocks set_final_data
46  // with void * argument to be used.
47  // TODO: Align these checks with the SYCL specification when the behaviour
48  // with void * is clarified.
49  template <typename T>
50  using EnableIfOutputPointerT = enable_if_t<
51  /*is_output_iterator<T>::value &&*/ std::is_pointer<T>::value>;
52 
53  template <typename T>
54  using EnableIfOutputIteratorT = enable_if_t<
55  /*is_output_iterator<T>::value &&*/ !std::is_pointer<T>::value>;
56 
57  template <typename T>
58  using EnableIfDefaultAllocator =
60 
61  template <typename T>
62  using EnableIfNonDefaultAllocator =
64 
65 public:
66  SYCLMemObjT(const size_t SizeInBytes, const property_list &Props,
67  std::unique_ptr<SYCLMemObjAllocator> Allocator)
68  : MAllocator(std::move(Allocator)), MProps(Props), MInteropEvent(nullptr),
69  MInteropContext(nullptr), MInteropMemObject(nullptr),
70  MOpenCLInterop(false), MHostPtrReadOnly(false), MNeedWriteBack(true),
71  MSizeInBytes(SizeInBytes), MUserPtr(nullptr), MShadowCopy(nullptr),
72  MUploadDataFunctor(nullptr), MSharedPtrStorage(nullptr) {}
73 
74  SYCLMemObjT(const property_list &Props,
75  std::unique_ptr<SYCLMemObjAllocator> Allocator)
76  : SYCLMemObjT(/*SizeInBytes*/ 0, Props, std::move(Allocator)) {}
77 
78  // For ABI compatibility
79  SYCLMemObjT(cl_mem MemObject, const context &SyclContext,
80  const size_t SizeInBytes, event AvailableEvent,
81  std::unique_ptr<SYCLMemObjAllocator> Allocator);
82 
83  SYCLMemObjT(pi_native_handle MemObject, const context &SyclContext,
84  const size_t SizeInBytes, event AvailableEvent,
85  std::unique_ptr<SYCLMemObjAllocator> Allocator);
86 
87  SYCLMemObjT(cl_mem MemObject, const context &SyclContext,
88  event AvailableEvent,
89  std::unique_ptr<SYCLMemObjAllocator> Allocator)
90  : SYCLMemObjT(MemObject, SyclContext, /*SizeInBytes*/ 0, AvailableEvent,
91  std::move(Allocator)) {}
92 
93  SYCLMemObjT(pi_native_handle MemObject, const context &SyclContext,
94  bool OwmNativeHandle, event AvailableEvent,
95  std::unique_ptr<SYCLMemObjAllocator> Allocator);
96 
97  virtual ~SYCLMemObjT() = default;
98 
99  const plugin &getPlugin() const;
100 
101  __SYCL_DLL_LOCAL size_t getSize() const override { return MSizeInBytes; }
102  __SYCL2020_DEPRECATED("get_count() is deprecated, please use size() instead")
103  __SYCL_DLL_LOCAL size_t get_count() const { return size(); }
104  __SYCL_DLL_LOCAL size_t size() const noexcept {
105  size_t AllocatorValueSize = MAllocator->getValueSize();
106  return (getSize() + AllocatorValueSize - 1) / AllocatorValueSize;
107  }
108 
109  template <typename propertyT> __SYCL_DLL_LOCAL bool has_property() const {
110  return MProps.has_property<propertyT>();
111  }
112 
113  template <typename propertyT>
114  __SYCL_DLL_LOCAL propertyT get_property() const {
115  return MProps.get_property<propertyT>();
116  }
117 
118  __SYCL_DLL_LOCAL void
120  MProps.add_or_replace_accessor_properties(PropertyList);
121  }
122 
123  __SYCL_DLL_LOCAL void deleteAccessorProperty(const PropWithDataKind &Kind) {
124  MProps.delete_accessor_property(Kind);
125  }
126 
127  template <typename AllocatorT>
128  __SYCL_DLL_LOCAL AllocatorT get_allocator() const {
129  return MAllocator->getAllocator<AllocatorT>();
130  }
131 
132  __SYCL_DLL_LOCAL void *allocateHostMem() override {
133  return MAllocator->allocate(size());
134  }
135 
136  __SYCL_DLL_LOCAL void releaseHostMem(void *Ptr) override {
137  if (Ptr)
138  MAllocator->deallocate(Ptr, size());
139  }
140 
141  void releaseMem(ContextImplPtr Context, void *MemAllocation) override;
142 
143  __SYCL_DLL_LOCAL void *getUserPtr() const {
144  return MOpenCLInterop ? static_cast<void *>(MInteropMemObject) : MUserPtr;
145  }
146 
147  __SYCL_DLL_LOCAL void set_write_back(bool NeedWriteBack) {
148  MNeedWriteBack = NeedWriteBack;
149  }
150 
151  __SYCL_DLL_LOCAL void set_final_data(std::nullptr_t) {
152  MUploadDataFunctor = nullptr;
153  }
154 
155  template <template <typename T> class PtrT, typename T>
156  __SYCL_DLL_LOCAL
157  enable_if_t<std::is_convertible<PtrT<T>, std::weak_ptr<T>>::value>
158  set_final_data(PtrT<T> FinalData) {
159  std::weak_ptr<T> TempFinalData(FinalData);
160  set_final_data(TempFinalData);
161  }
162 
163  template <typename T>
164  __SYCL_DLL_LOCAL void set_final_data(std::weak_ptr<T> FinalData) {
165  MUploadDataFunctor = [this, FinalData]() {
166  if (std::shared_ptr<T> LockedFinalData = FinalData.lock()) {
167  updateHostMemory(LockedFinalData.get());
168  }
169  };
170  }
171 
172  __SYCL_DLL_LOCAL void set_final_data_from_storage() {
173  MUploadDataFunctor = [this]() {
174  if (MSharedPtrStorage.use_count() > 1) {
175  void *FinalData = const_cast<void *>(MSharedPtrStorage.get());
176  updateHostMemory(FinalData);
177  }
178  };
179  }
180 
181  template <typename Destination>
182  __SYCL_DLL_LOCAL EnableIfOutputPointerT<Destination>
183  set_final_data(Destination FinalData) {
184  if (!FinalData)
185  MUploadDataFunctor = nullptr;
186  else
187  MUploadDataFunctor = [this, FinalData]() {
188  updateHostMemory(FinalData);
189  };
190  }
191 
192  template <typename Destination>
193  __SYCL_DLL_LOCAL EnableIfOutputIteratorT<Destination>
194  set_final_data(Destination FinalData) {
195  MUploadDataFunctor = [this, FinalData]() {
196  using DestinationValueT = iterator_value_type_t<Destination>;
197  // TODO if Destination is ContiguousIterator then don't create
198  // ContiguousStorage. updateHostMemory works only with pointer to
199  // continuous data.
200  const size_t Size = MSizeInBytes / sizeof(DestinationValueT);
201  std::unique_ptr<DestinationValueT[]> ContiguousStorage(
202  new DestinationValueT[Size]);
203  updateHostMemory(ContiguousStorage.get());
204  std::copy(ContiguousStorage.get(), ContiguousStorage.get() + Size,
205  FinalData);
206  };
207  }
208 
209 protected:
210  void updateHostMemory(void *const Ptr);
211 
212  // Update host with the latest data + notify scheduler that the memory object
213  // is going to die. After this method is finished no further operations with
214  // the memory object is allowed. This method is executed from child's
215  // destructor. This cannot be done in SYCLMemObjT's destructor as child's
216  // members must be alive.
217  void updateHostMemory();
218 
219 public:
220  __SYCL_DLL_LOCAL bool useHostPtr() {
221  return has_property<property::buffer::use_host_ptr>() ||
222  has_property<property::image::use_host_ptr>();
223  }
224 
225  __SYCL_DLL_LOCAL bool canReuseHostPtr(void *HostPtr,
226  const size_t RequiredAlign) {
227  bool Aligned =
228  (reinterpret_cast<std::uintptr_t>(HostPtr) % RequiredAlign) == 0;
229  return Aligned || useHostPtr();
230  }
231 
232  __SYCL_DLL_LOCAL void handleHostData(void *HostPtr,
233  const size_t RequiredAlign) {
234  if (!MHostPtrReadOnly)
235  set_final_data(reinterpret_cast<char *>(HostPtr));
236 
237  if (canReuseHostPtr(HostPtr, RequiredAlign)) {
238  MUserPtr = HostPtr;
239  } else {
240  setAlign(RequiredAlign);
241  MShadowCopy = allocateHostMem();
242  MUserPtr = MShadowCopy;
243  std::memcpy(MUserPtr, HostPtr, MSizeInBytes);
244  }
245  }
246 
247  __SYCL_DLL_LOCAL void handleHostData(const void *HostPtr,
248  const size_t RequiredAlign) {
249  MHostPtrReadOnly = true;
250  handleHostData(const_cast<void *>(HostPtr), RequiredAlign);
251  }
252 
253  template <typename T>
254  __SYCL_DLL_LOCAL void handleHostData(const std::shared_ptr<T> &HostPtr,
255  const size_t RequiredAlign) {
256  MSharedPtrStorage = HostPtr;
257  MHostPtrReadOnly = std::is_const<T>::value;
258  if (HostPtr) {
259  if (!MHostPtrReadOnly)
260  set_final_data_from_storage();
261 
262  if (canReuseHostPtr(HostPtr.get(), RequiredAlign))
263  MUserPtr = HostPtr.get();
264  else {
265  setAlign(RequiredAlign);
266  MShadowCopy = allocateHostMem();
267  MUserPtr = MShadowCopy;
268  std::memcpy(MUserPtr, HostPtr.get(), MSizeInBytes);
269  }
270  }
271  }
272 
273  template <class InputIterator>
274  __SYCL_DLL_LOCAL void handleHostData(InputIterator First, InputIterator Last,
275  const size_t RequiredAlign) {
277  setAlign(RequiredAlign);
278  if (useHostPtr())
279  throw runtime_error(
280  "Buffer constructor from a pair of iterator values does not support "
281  "use_host_ptr property.",
283 
284  setAlign(RequiredAlign);
285  MShadowCopy = allocateHostMem();
286  MUserPtr = MShadowCopy;
287 
288  // We need to cast MUserPtr to pointer to the iteration type to get correct
289  // offset in std::copy when it will increment destination pointer.
290  using IteratorValueType = iterator_value_type_t<InputIterator>;
291  using IteratorNonConstValueType = remove_const_t<IteratorValueType>;
292  using IteratorPointerToNonConstValueType =
294  std::copy(First, Last,
295  static_cast<IteratorPointerToNonConstValueType>(MUserPtr));
296  }
297 
298  __SYCL_DLL_LOCAL void setAlign(size_t RequiredAlign) {
299  MAllocator->setAlignment(RequiredAlign);
300  }
301 
302  // For ABI compatibility
303  static size_t getBufSizeForContext(const ContextImplPtr &Context,
304  cl_mem MemObject);
305 
306  static size_t getBufSizeForContext(const ContextImplPtr &Context,
307  pi_native_handle MemObject);
308 
309  __SYCL_DLL_LOCAL void *allocateMem(ContextImplPtr Context,
310  bool InitFromUserData, void *HostPtr,
311  RT::PiEvent &InteropEvent) override {
312  (void)Context;
313  (void)InitFromUserData;
314  (void)HostPtr;
315  (void)InteropEvent;
316  throw runtime_error("Not implemented", PI_INVALID_OPERATION);
317  }
318 
319  __SYCL_DLL_LOCAL MemObjType getType() const override {
320  return MemObjType::Undefined;
321  }
322 
323  ContextImplPtr getInteropContext() const override { return MInteropContext; }
324 
325  bool hasUserDataPtr() const { return MUserPtr != nullptr; };
326 
327  bool isInterop() const;
328 
329 protected:
330  // An allocateMem helper that determines which host ptr to use
331  void determineHostPtr(const ContextImplPtr &Context, bool InitFromUserData,
332  void *&HostPtr, bool &HostPtrReadOnly);
333 
334  // Allocator used for allocation memory on host.
335  std::unique_ptr<SYCLMemObjAllocator> MAllocator;
336  // Properties passed by user.
338  // Event passed by user to interoperability constructor.
339  // Should wait on this event before start working with such memory object.
341  // Context passed by user to interoperability constructor.
343  // Native backend memory object handle passed by user to interoperability
344  // constructor.
346  // Indicates whether memory object is created using interoperability
347  // constructor or not.
349  // Indicates if user provided pointer is read only.
351  // Indicates if memory object should write memory to the host on destruction.
353  // Size of memory.
354  size_t MSizeInBytes;
355  // User's pointer passed to constructor.
356  void *MUserPtr;
357  // Copy of memory passed by user to constructor.
358  void *MShadowCopy;
359  // Function which update host with final data on memory object destruction.
360  std::function<void(void)> MUploadDataFunctor;
361  // Field which holds user's shared_ptr in case of memory object is created
362  // using constructor with shared_ptr.
363  std::shared_ptr<const void> MSharedPtrStorage;
364 };
365 
366 } // namespace detail
367 } // namespace sycl
368 } // __SYCL_INLINE_NAMESPACE(cl)
_pi_mem
PI Mem mapping to CUDA memory allocations, both data and texture/surface.
Definition: pi_cuda.hpp:207
property_list.hpp
cl::sycl::detail::SYCLMemObjT::set_final_data
__SYCL_DLL_LOCAL EnableIfOutputIteratorT< Destination > set_final_data(Destination FinalData)
Definition: sycl_mem_obj_t.hpp:194
cl::sycl::detail::pi::getPlugin
const plugin & getPlugin()
Definition: pi.cpp:511
cl::sycl::detail::SYCLMemObjT::MSizeInBytes
size_t MSizeInBytes
Definition: sycl_mem_obj_t.hpp:354
cl::sycl::detail::aligned_allocator
Definition: aligned_allocator.hpp:23
cl::sycl::detail::SYCLMemObjT::handleHostData
__SYCL_DLL_LOCAL void handleHostData(void *HostPtr, const size_t RequiredAlign)
Definition: sycl_mem_obj_t.hpp:232
cl::sycl::detail::SYCLMemObjT::MInteropContext
ContextImplPtr MInteropContext
Definition: sycl_mem_obj_t.hpp:342
cl::sycl::detail::ContextImplPtr
std::shared_ptr< detail::context_impl > ContextImplPtr
Definition: memory_manager.hpp:32
sycl_mem_obj_i.hpp
cl::sycl::event
An event object can be used to synchronize memory transfers, enqueues of kernels and signaling barrie...
Definition: event.hpp:31
cl::sycl::detail::SYCLMemObjT::MSharedPtrStorage
std::shared_ptr< const void > MSharedPtrStorage
Definition: sycl_mem_obj_t.hpp:363
PI_INVALID_OPERATION
@ PI_INVALID_OPERATION
Definition: pi.h:88
type_traits.hpp
cl::sycl::detail::SYCLMemObjT::addOrReplaceAccessorProperties
__SYCL_DLL_LOCAL void addOrReplaceAccessorProperties(const property_list &PropertyList)
Definition: sycl_mem_obj_t.hpp:119
cl::sycl::detail::SYCLMemObjT::SYCLMemObjT
SYCLMemObjT(const property_list &Props, std::unique_ptr< SYCLMemObjAllocator > Allocator)
Definition: sycl_mem_obj_t.hpp:74
stl.hpp
cl::sycl::detail::SYCLMemObjT::set_final_data
__SYCL_DLL_LOCAL void set_final_data(std::weak_ptr< T > FinalData)
Definition: sycl_mem_obj_t.hpp:164
cl::sycl::detail::SYCLMemObjT::set_final_data
__SYCL_DLL_LOCAL enable_if_t< std::is_convertible< PtrT< T >, std::weak_ptr< T > >::value > set_final_data(PtrT< T > FinalData)
Definition: sycl_mem_obj_t.hpp:158
cl::sycl::detail::SYCLMemObjT::has_property
__SYCL_DLL_LOCAL bool has_property() const
Definition: sycl_mem_obj_t.hpp:109
cl::sycl::detail::SYCLMemObjT::getInteropContext
ContextImplPtr getInteropContext() const override
Definition: sycl_mem_obj_t.hpp:323
event.hpp
sycl
Definition: invoke_simd.hpp:68
cl::sycl::property_list
Objects of the property_list class are containers for the SYCL properties.
Definition: property_list.hpp:26
cl::sycl::detail::SYCLMemObjT::MInteropMemObject
RT::PiMem MInteropMemObject
Definition: sycl_mem_obj_t.hpp:345
cl::sycl::detail::SYCLMemObjT::MAllocator
std::unique_ptr< SYCLMemObjAllocator > MAllocator
Definition: sycl_mem_obj_t.hpp:335
cl::sycl::detail::SYCLMemObjI::MemObjType
MemObjType
Definition: sycl_mem_obj_i.hpp:32
cl::sycl::detail::memcpy
void memcpy(void *Dst, const void *Src, std::size_t Size)
cl::sycl::detail::SYCLMemObjT::useHostPtr
__SYCL_DLL_LOCAL bool useHostPtr()
Definition: sycl_mem_obj_t.hpp:220
cl::sycl::detail::iterator_value_type_t
typename std::iterator_traits< T >::value_type iterator_value_type_t
Definition: stl_type_traits.hpp:55
cl::sycl::detail::SYCLMemObjT::set_final_data
__SYCL_DLL_LOCAL EnableIfOutputPointerT< Destination > set_final_data(Destination FinalData)
Definition: sycl_mem_obj_t.hpp:183
cl::sycl::detail::SYCLMemObjT::SYCLMemObjT
SYCLMemObjT(cl_mem MemObject, const context &SyclContext, event AvailableEvent, std::unique_ptr< SYCLMemObjAllocator > Allocator)
Definition: sycl_mem_obj_t.hpp:87
cl::sycl::detail::SYCLMemObjT::allocateHostMem
__SYCL_DLL_LOCAL void * allocateHostMem() override
Definition: sycl_mem_obj_t.hpp:132
export.hpp
cl::sycl::detail::SYCLMemObjT::__SYCL2020_DEPRECATED
__SYCL2020_DEPRECATED("get_count() is deprecated, please use size() instead") __SYCL_DLL_LOCAL size_t get_count() const
Definition: sycl_mem_obj_t.hpp:102
cl::sycl::detail::SYCLMemObjT::MOpenCLInterop
bool MOpenCLInterop
Definition: sycl_mem_obj_t.hpp:348
cl::sycl::detail::SYCLMemObjT::size
__SYCL_DLL_LOCAL size_t size() const noexcept
Definition: sycl_mem_obj_t.hpp:104
cl::sycl::detail::EventImplPtr
std::shared_ptr< detail::event_impl > EventImplPtr
Definition: memory_manager.hpp:31
cl::sycl::detail::SYCLMemObjT::getSize
__SYCL_DLL_LOCAL size_t getSize() const override
Definition: sycl_mem_obj_t.hpp:101
image_properties.hpp
cl::sycl::detail::SYCLMemObjT::handleHostData
__SYCL_DLL_LOCAL void handleHostData(InputIterator First, InputIterator Last, const size_t RequiredAlign)
Definition: sycl_mem_obj_t.hpp:274
cl::sycl::detail::SYCLMemObjT::MProps
property_list MProps
Definition: sycl_mem_obj_t.hpp:337
cl::sycl::detail::SYCLMemObjT::releaseHostMem
__SYCL_DLL_LOCAL void releaseHostMem(void *Ptr) override
Definition: sycl_mem_obj_t.hpp:136
cl
We provide new interfaces for matrix muliply in this patch:
Definition: access.hpp:13
cl::sycl::detail::SYCLMemObjT::MUserPtr
void * MUserPtr
Definition: sycl_mem_obj_t.hpp:356
cl::sycl::detail::plugin
The plugin class provides a unified interface to the underlying low-level runtimes for the device-agn...
Definition: plugin.hpp:90
cl::sycl::detail::iterator_to_const_type_t
std::is_const< typename std::remove_pointer< iterator_pointer_t< T > >::type > iterator_to_const_type_t
Definition: stl_type_traits.hpp:62
cl::sycl::detail::SYCLMemObjT::set_write_back
__SYCL_DLL_LOCAL void set_write_back(bool NeedWriteBack)
Definition: sycl_mem_obj_t.hpp:147
pi_native_handle
uintptr_t pi_native_handle
Definition: pi.h:76
cl::sycl::detail::SYCLMemObjT::MUploadDataFunctor
std::function< void(void)> MUploadDataFunctor
Definition: sycl_mem_obj_t.hpp:360
cl::sycl::detail::SYCLMemObjT::set_final_data
__SYCL_DLL_LOCAL void set_final_data(std::nullptr_t)
Definition: sycl_mem_obj_t.hpp:151
cl::sycl::detail::add_pointer_t
typename std::add_pointer< T >::type add_pointer_t
Definition: stl_type_traits.hpp:37
cl::sycl::detail::SYCLMemObjT::canReuseHostPtr
__SYCL_DLL_LOCAL bool canReuseHostPtr(void *HostPtr, const size_t RequiredAlign)
Definition: sycl_mem_obj_t.hpp:225
cl::sycl::detail::SYCLMemObjT::deleteAccessorProperty
__SYCL_DLL_LOCAL void deleteAccessorProperty(const PropWithDataKind &Kind)
Definition: sycl_mem_obj_t.hpp:123
std
Definition: accessor.hpp:2616
cl::sycl::detail::SYCLMemObjT::getUserPtr
__SYCL_DLL_LOCAL void * getUserPtr() const
Definition: sycl_mem_obj_t.hpp:143
_pi_event
PI Event mapping to CUevent.
Definition: pi_cuda.hpp:458
sycl_mem_obj_allocator.hpp
cl::sycl::detail::SYCLMemObjT::MInteropEvent
EventImplPtr MInteropEvent
Definition: sycl_mem_obj_t.hpp:340
cl::sycl::context
The context class represents a SYCL context on which kernel functions may be executed.
Definition: context.hpp:35
cl::sycl::detail::SYCLMemObjT::SYCLMemObjT
SYCLMemObjT(const size_t SizeInBytes, const property_list &Props, std::unique_ptr< SYCLMemObjAllocator > Allocator)
Definition: sycl_mem_obj_t.hpp:66
cl::sycl::detail::SYCLMemObjT::set_final_data_from_storage
__SYCL_DLL_LOCAL void set_final_data_from_storage()
Definition: sycl_mem_obj_t.hpp:172
cl::sycl::detail::SYCLMemObjT::hasUserDataPtr
bool hasUserDataPtr() const
Definition: sycl_mem_obj_t.hpp:325
cl::sycl::detail::remove_const_t
typename std::remove_const< T >::type remove_const_t
Definition: stl_type_traits.hpp:30
common.hpp
cl::sycl::detail::SYCLMemObjT::getType
__SYCL_DLL_LOCAL MemObjType getType() const override
Definition: sycl_mem_obj_t.hpp:319
cl::sycl::detail::SYCLMemObjT::handleHostData
__SYCL_DLL_LOCAL void handleHostData(const std::shared_ptr< T > &HostPtr, const size_t RequiredAlign)
Definition: sycl_mem_obj_t.hpp:254
cl::sycl::detail::SYCLMemObjT::get_allocator
__SYCL_DLL_LOCAL AllocatorT get_allocator() const
Definition: sycl_mem_obj_t.hpp:128
cl::sycl::detail::SYCLMemObjT::handleHostData
__SYCL_DLL_LOCAL void handleHostData(const void *HostPtr, const size_t RequiredAlign)
Definition: sycl_mem_obj_t.hpp:247
cl::sycl::detail::enable_if_t
typename std::enable_if< B, T >::type enable_if_t
Definition: stl_type_traits.hpp:24
cl::sycl::detail::SYCLMemObjT::setAlign
__SYCL_DLL_LOCAL void setAlign(size_t RequiredAlign)
Definition: sycl_mem_obj_t.hpp:298
cl::sycl::detail::SYCLMemObjT
Definition: sycl_mem_obj_t.hpp:43
cl::sycl::detail::SYCLMemObjT::MHostPtrReadOnly
bool MHostPtrReadOnly
Definition: sycl_mem_obj_t.hpp:350
cl::sycl::detail::SYCLMemObjI
Definition: sycl_mem_obj_i.hpp:28
cl::sycl::detail::SYCLMemObjT::MNeedWriteBack
bool MNeedWriteBack
Definition: sycl_mem_obj_t.hpp:352
cl::sycl::detail::SYCLMemObjT::allocateMem
__SYCL_DLL_LOCAL void * allocateMem(ContextImplPtr Context, bool InitFromUserData, void *HostPtr, RT::PiEvent &InteropEvent) override
Definition: sycl_mem_obj_t.hpp:309
cl::sycl::detail::SYCLMemObjT::get_property
__SYCL_DLL_LOCAL propertyT get_property() const
Definition: sycl_mem_obj_t.hpp:114
cl::sycl::detail::SYCLMemObjT::MShadowCopy
void * MShadowCopy
Definition: sycl_mem_obj_t.hpp:358
cl::sycl::detail::PropWithDataKind
PropWithDataKind
Definition: property_helper.hpp:45
buffer_properties.hpp
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition: defines_elementary.hpp:12