DPC++ Runtime
Runtime libraries for oneAPI DPC++
fusion_properties.hpp
Go to the documentation of this file.
1 //==----------- fusion_properties.hpp --- SYCL fusion properties -----------==//
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>
14 
15 namespace sycl {
17 namespace ext::codeplay::experimental::property {
18 
20  : public detail::DataLessProperty<detail::FusionPromotePrivate> {};
21 
23  : public detail::DataLessProperty<detail::FusionPromoteLocal> {};
24 
25 class no_barriers : public detail::DataLessProperty<detail::FusionNoBarrier> {};
26 
27 class force_fusion : public detail::DataLessProperty<detail::FusionForce> {};
28 
29 namespace queue {
30 class enable_fusion : public detail::DataLessProperty<detail::FusionEnable> {};
31 } // namespace queue
32 
33 } // namespace ext::codeplay::experimental::property
34 
35 // Forward declarations
36 template <typename T, int Dimensions, typename AllocatorT, typename Enable>
37 class buffer;
38 
39 template <typename DataT, int Dimensions, access::mode AccessMode,
41  typename PropertyListT>
42 class accessor;
43 
44 class queue;
45 
46 // Property trait specializations.
47 template <>
48 struct is_property<ext::codeplay::experimental::property::promote_private>
49  : std::true_type {};
50 
51 template <>
52 struct is_property<ext::codeplay::experimental::property::promote_local>
53  : std::true_type {};
54 
55 template <>
56 struct is_property<ext::codeplay::experimental::property::no_barriers>
57  : std::true_type {};
58 
59 template <>
60 struct is_property<ext::codeplay::experimental::property::force_fusion>
61  : std::true_type {};
62 
63 template <>
64 struct is_property<ext::codeplay::experimental::property::queue::enable_fusion>
65  : std::true_type {};
66 
67 // Buffer property trait specializations
68 template <typename T, int Dimensions, typename AllocatorT>
69 struct is_property_of<ext::codeplay::experimental::property::promote_private,
70  buffer<T, Dimensions, AllocatorT, void>>
71  : std::true_type {};
72 
73 template <typename T, int Dimensions, typename AllocatorT>
74 struct is_property_of<ext::codeplay::experimental::property::promote_local,
75  buffer<T, Dimensions, AllocatorT, void>>
76  : std::true_type {};
77 
78 // Accessor property trait specializations
79 template <typename DataT, int Dimensions, access::mode AccessMode,
81  typename PropertyListT>
82 struct is_property_of<ext::codeplay::experimental::property::promote_private,
83  accessor<DataT, Dimensions, AccessMode, AccessTarget,
84  IsPlaceholder, PropertyListT>> : std::true_type {
85 };
86 
87 template <typename DataT, int Dimensions, access::mode AccessMode,
89  typename PropertyListT>
90 struct is_property_of<ext::codeplay::experimental::property::promote_local,
91  accessor<DataT, Dimensions, AccessMode, AccessTarget,
92  IsPlaceholder, PropertyListT>> : std::true_type {
93 };
94 
95 // Queue property trait specializations
96 template <>
98  ext::codeplay::experimental::property::queue::enable_fusion, queue>
99  : std::true_type {};
100 
101 } // __SYCL_INLINE_VER_NAMESPACE(_V1)
102 } // namespace sycl
sycl::_V1::IsPlaceholder
class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor class __SYCL_EBO __SYCL_SPECIAL_CLASS IsPlaceholder
Definition: accessor.hpp:2855
sycl::_V1::access::mode
mode
Definition: access.hpp:30
property_traits.hpp
sycl::_V1::detail::DataLessProperty
Definition: property_helper.hpp:71
sycl::_V1::is_property
Definition: property_traits.hpp:18
__SYCL_INLINE_VER_NAMESPACE
#define __SYCL_INLINE_VER_NAMESPACE(X)
Definition: defines_elementary.hpp:11
sycl::_V1::buffer
Defines a shared array that can be used by kernels in queues.
Definition: buffer.hpp:37
sycl::_V1::ext::codeplay::experimental::property::no_barriers
Definition: fusion_properties.hpp:25
sycl::_V1::ext::codeplay::experimental::property::queue::enable_fusion
Definition: fusion_properties.hpp:30
sycl::_V1::is_property_of
Definition: property_traits.hpp:24
sycl::_V1::Dimensions
class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor class __SYCL_EBO __SYCL_SPECIAL_CLASS Dimensions
Definition: accessor.hpp:2854
sycl
---— Error handling, matching OpenCL plugin semantics.
Definition: access.hpp:14
access.hpp
sycl::_V1::ext::codeplay::experimental::property::promote_private
Definition: fusion_properties.hpp:19
sycl::_V1::access::placeholder
placeholder
Definition: access.hpp:45
sycl::_V1::queue
Encapsulates a single SYCL queue which schedules kernels on a SYCL device.
Definition: queue.hpp:89
sycl::_V1::access::target
target
Definition: access.hpp:18
sycl::_V1::accessor
Definition: accessor.hpp:225
property_helper.hpp
sycl::_V1::ext::codeplay::experimental::property::promote_local
Definition: fusion_properties.hpp:22
sycl::_V1::AccessMode
class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor class __SYCL_EBO __SYCL_SPECIAL_CLASS AccessMode
Definition: accessor.hpp:2854
sycl::_V1::ext::codeplay::experimental::property::force_fusion
Definition: fusion_properties.hpp:27