DPC++ Runtime
Runtime libraries for oneAPI DPC++
fusion_wrapper.hpp
Go to the documentation of this file.
1 //==---- fusion_wrapper.hpp --- SYCL wrapper for queue for kernel fusion ---==//
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/export.hpp> // for __SYCL_EXPORT
12 #include <sycl/event.hpp> // for event
13 #include <sycl/property_list.hpp> // for property_list
14 #include <sycl/queue.hpp> // for queue
15 
16 #include <memory> // for shared_ptr
17 
18 namespace sycl {
19 inline namespace _V1 {
20 
21 namespace detail {
22 class fusion_wrapper_impl;
23 }
24 
25 namespace ext::codeplay::experimental {
26 
30 class __SYCL_EXPORT fusion_wrapper {
31 
32 public:
38  explicit fusion_wrapper(queue &q);
39 
42  queue get_queue() const;
43 
46  bool is_in_fusion_mode() const;
47 
56  void start_fusion();
57 
72  void cancel_fusion();
73 
92  event complete_fusion(const property_list &propList = {});
93 
94 private:
95  std::shared_ptr<detail::fusion_wrapper_impl> MImpl;
96 };
97 } // namespace ext::codeplay::experimental
98 } // namespace _V1
99 } // namespace sycl
A wrapper wrapping a sycl::queue to provide access to the kernel fusion API, allowing to manage kerne...
Objects of the property_list class are containers for the SYCL properties.
Encapsulates a single SYCL queue which schedules kernels on a SYCL device.
Definition: queue.hpp:111
Definition: access.hpp:18