DPC++ Runtime
Runtime libraries for oneAPI DPC++
pipe_properties.hpp
Go to the documentation of this file.
1 //==----- pipe_properties.hpp - SYCL properties associated with data flow pipe
2 //---==//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #pragma once
11 
12 #include <sycl/ext/oneapi/properties/property.hpp> // for PropKind
13 #include <sycl/ext/oneapi/properties/property_value.hpp> // for property_value
14 
15 #include <cstdint> // for uint16_t
16 #include <type_traits> // for true_type
17 
18 namespace sycl {
19 inline namespace _V1 {
20 namespace ext {
21 namespace intel {
22 namespace experimental {
23 
25  template <int Latency>
27  ready_latency_key, std::integral_constant<int, Latency>>;
28 };
29 
31  template <int Bits>
32  using value_t =
34  std::integral_constant<int, Bits>>;
35 };
36 
38  template <bool Valid>
39  using value_t =
41  std::bool_constant<Valid>>;
42 };
43 
45  template <bool HighOrder>
46  using value_t =
48  std::bool_constant<HighOrder>>;
49 };
50 
51 enum class protocol_name : std::uint16_t {
52  avalon_streaming = 0,
54  avalon_mm = 2,
56 };
57 
58 struct protocol_key {
59  template <protocol_name Protocol>
61  protocol_key, std::integral_constant<protocol_name, Protocol>>;
62 };
63 
64 template <int Latency>
66 
67 template <int Bits>
69 
70 template <bool Valid>
74 
75 template <bool HighOrder>
82 
83 template <protocol_name Protocol>
87 inline constexpr protocol_key::value_t<
94 
95 } // namespace experimental
96 } // namespace intel
97 
98 namespace oneapi {
99 namespace experimental {
100 
101 template <>
102 struct is_property_key<intel::experimental::ready_latency_key>
103  : std::true_type {};
104 template <>
105 struct is_property_key<intel::experimental::bits_per_symbol_key>
106  : std::true_type {};
107 template <>
108 struct is_property_key<intel::experimental::uses_valid_key> : std::true_type {};
109 template <>
110 struct is_property_key<intel::experimental::first_symbol_in_high_order_bits_key>
111  : std::true_type {};
112 template <>
113 struct is_property_key<intel::experimental::protocol_key> : std::true_type {};
114 
115 namespace detail {
116 template <> struct PropertyToKind<intel::experimental::ready_latency_key> {
117  static constexpr PropKind Kind = PropKind::ReadyLatency;
118 };
119 template <> struct PropertyToKind<intel::experimental::bits_per_symbol_key> {
120  static constexpr PropKind Kind = PropKind::BitsPerSymbol;
121 };
122 template <> struct PropertyToKind<intel::experimental::uses_valid_key> {
123  static constexpr PropKind Kind = PropKind::UsesValid;
124 };
125 template <>
127  intel::experimental::first_symbol_in_high_order_bits_key> {
129 };
130 template <> struct PropertyToKind<intel::experimental::protocol_key> {
131  static constexpr PropKind Kind = PropKind::PipeProtocol;
132 };
133 
134 template <>
135 struct IsCompileTimeProperty<intel::experimental::ready_latency_key>
136  : std::true_type {};
137 template <>
138 struct IsCompileTimeProperty<intel::experimental::bits_per_symbol_key>
139  : std::true_type {};
140 template <>
141 struct IsCompileTimeProperty<intel::experimental::uses_valid_key>
142  : std::true_type {};
143 template <>
145  intel::experimental::first_symbol_in_high_order_bits_key> : std::true_type {
146 };
147 template <>
148 struct IsCompileTimeProperty<intel::experimental::protocol_key>
149  : std::true_type {};
150 
151 } // namespace detail
152 } // namespace experimental
153 } // namespace oneapi
154 } // namespace ext
155 } // namespace _V1
156 } // namespace sycl
constexpr protocol_key::value_t< protocol_name::avalon_streaming > protocol_avalon_streaming
constexpr protocol_key::value_t< protocol_name::avalon_mm > protocol_avalon_mm
constexpr first_symbol_in_high_order_bits_key::value_t< true > first_symbol_in_high_order_bits_on
constexpr uses_valid_key::value_t< false > uses_valid_off
constexpr bits_per_symbol_key::value_t< Bits > bits_per_symbol
constexpr uses_valid_key::value_t< Valid > uses_valid
constexpr first_symbol_in_high_order_bits_key::value_t< HighOrder > first_symbol_in_high_order_bits
constexpr protocol_key::value_t< protocol_name::avalon_streaming_uses_ready > protocol_avalon_streaming_uses_ready
constexpr ready_latency_key::value_t< Latency > ready_latency
constexpr first_symbol_in_high_order_bits_key::value_t< false > first_symbol_in_high_order_bits_off
constexpr uses_valid_key::value_t< true > uses_valid_on
constexpr protocol_key::value_t< protocol_name::avalon_mm_uses_ready > protocol_avalon_mm_uses_ready
constexpr protocol_key::value_t< Protocol > protocol
Definition: access.hpp:18