DPC++ Runtime
Runtime libraries for oneAPI DPC++
handler_proxy.hpp
Go to the documentation of this file.
1 //==--------- handler_proxy.hpp - Proxy methods to call in handler ---------==//
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/access/access.hpp> // for image_target, target
12 #include <sycl/detail/export.hpp> // for __SYCL_EXPORT
13 
14 namespace sycl {
15 inline namespace _V1 {
16 
17 class handler;
18 
19 namespace detail {
20 
21 class AccessorBaseHost;
22 class UnsampledImageAccessorBaseHost;
23 class SampledImageAccessorBaseHost;
24 
25 #ifdef __SYCL_DEVICE_ONLY__
26 // In device compilation accessor isn't inherited from host base classes, so
27 // can't detect by it. Since we don't expect it to be ever called in device
28 // execution, just use blind void *.
29 inline void associateWithHandler(handler &, void *, access::target) {}
30 inline void associateWithHandler(handler &, void *, image_target) {}
31 #else
32 __SYCL_EXPORT void associateWithHandler(handler &, AccessorBaseHost *,
34 __SYCL_EXPORT void
35 associateWithHandler(handler &, UnsampledImageAccessorBaseHost *, image_target);
36 __SYCL_EXPORT void
37 associateWithHandler(handler &, SampledImageAccessorBaseHost *, image_target);
38 #endif
39 } // namespace detail
40 } // namespace _V1
41 } // namespace sycl
void associateWithHandler(handler &, AccessorBaseHost *, access::target)
image_target
Definition: access.hpp:74
Definition: access.hpp:18