@@ -35,14 +35,12 @@ template <class _name, class _dataT, int32_t _min_capacity = 0> class pipe {
35
35
static constexpr int32_t _target_anchor = std::get<0 >(_constraint);
36
36
static constexpr type _control_type = std::get<1 >(_constraint);
37
37
static constexpr int32_t _cycle = std::get<2 >(_constraint);
38
- int32_t _type;
39
- if constexpr (_control_type == type::none) {
40
- _type = 0 ;
41
- } else if constexpr (_control_type == type::exact) {
38
+ int32_t _type = 0 ; // Default: _control_type == type::none
39
+ if constexpr (_control_type == type::exact) {
42
40
_type = 1 ;
43
41
} else if constexpr (_control_type == type::max) {
44
42
_type = 2 ;
45
- } else { // _control_type == type::min
43
+ } else if constexpr ( _control_type == type::min) {
46
44
_type = 3 ;
47
45
}
48
46
@@ -72,14 +70,12 @@ template <class _name, class _dataT, int32_t _min_capacity = 0> class pipe {
72
70
static constexpr int32_t _target_anchor = std::get<0 >(_constraint);
73
71
static constexpr type _control_type = std::get<1 >(_constraint);
74
72
static constexpr int32_t _cycle = std::get<2 >(_constraint);
75
- int32_t _type;
76
- if constexpr (_control_type == type::none) {
77
- _type = 0 ;
78
- } else if constexpr (_control_type == type::exact) {
73
+ int32_t _type = 0 ; // Default: _control_type == type::none
74
+ if constexpr (_control_type == type::exact) {
79
75
_type = 1 ;
80
76
} else if constexpr (_control_type == type::max) {
81
77
_type = 2 ;
82
- } else { // _control_type == type::min
78
+ } else if constexpr ( _control_type == type::min) {
83
79
_type = 3 ;
84
80
}
85
81
@@ -108,14 +104,12 @@ template <class _name, class _dataT, int32_t _min_capacity = 0> class pipe {
108
104
static constexpr int32_t _target_anchor = std::get<0 >(_constraint);
109
105
static constexpr type _control_type = std::get<1 >(_constraint);
110
106
static constexpr int32_t _cycle = std::get<2 >(_constraint);
111
- int32_t _type;
112
- if constexpr (_control_type == type::none) {
113
- _type = 0 ;
114
- } else if constexpr (_control_type == type::exact) {
107
+ int32_t _type = 0 ; // Default: _control_type == type::none
108
+ if constexpr (_control_type == type::exact) {
115
109
_type = 1 ;
116
110
} else if constexpr (_control_type == type::max) {
117
111
_type = 2 ;
118
- } else { // _control_type == type::min
112
+ } else if constexpr ( _control_type == type::min) {
119
113
_type = 3 ;
120
114
}
121
115
@@ -143,14 +137,12 @@ template <class _name, class _dataT, int32_t _min_capacity = 0> class pipe {
143
137
static constexpr int32_t _target_anchor = std::get<0 >(_constraint);
144
138
static constexpr type _control_type = std::get<1 >(_constraint);
145
139
static constexpr int32_t _cycle = std::get<2 >(_constraint);
146
- int32_t _type;
147
- if constexpr (_control_type == type::none) {
148
- _type = 0 ;
149
- } else if constexpr (_control_type == type::exact) {
140
+ int32_t _type = 0 ; // Default: _control_type == type::none
141
+ if constexpr (_control_type == type::exact) {
150
142
_type = 1 ;
151
143
} else if constexpr (_control_type == type::max) {
152
144
_type = 2 ;
153
- } else { // _control_type == type::min
145
+ } else if constexpr ( _control_type == type::min) {
154
146
_type = 3 ;
155
147
}
156
148
@@ -173,6 +165,7 @@ template <class _name, class _dataT, int32_t _min_capacity = 0> class pipe {
173
165
m_Capacity};
174
166
175
167
// FPGA BE will recognize this function and extract its arguments.
168
+ // TODO: Pass latency control parameters via the __spirv_* builtin when ready.
176
169
template <typename _T>
177
170
static int32_t
178
171
__latency_control_nb_read_wrapper (__ocl_RPipeTy<_T> Pipe, _T *Data,
@@ -182,6 +175,7 @@ template <class _name, class _dataT, int32_t _min_capacity = 0> class pipe {
182
175
}
183
176
184
177
// FPGA BE will recognize this function and extract its arguments.
178
+ // TODO: Pass latency control parameters via the __spirv_* builtin when ready.
185
179
template <typename _T>
186
180
static int32_t
187
181
__latency_control_nb_write_wrapper (__ocl_WPipeTy<_T> Pipe, const _T *Data,
@@ -191,6 +185,7 @@ template <class _name, class _dataT, int32_t _min_capacity = 0> class pipe {
191
185
}
192
186
193
187
// FPGA BE will recognize this function and extract its arguments.
188
+ // TODO: Pass latency control parameters via the __spirv_* builtin when ready.
194
189
template <typename _T>
195
190
static void __latency_control_bl_read_wrapper (__ocl_RPipeTy<_T> Pipe,
196
191
_T *Data, int32_t AnchorID,
@@ -200,6 +195,7 @@ template <class _name, class _dataT, int32_t _min_capacity = 0> class pipe {
200
195
}
201
196
202
197
// FPGA BE will recognize this function and extract its arguments.
198
+ // TODO: Pass latency control parameters via the __spirv_* builtin when ready.
203
199
template <typename _T>
204
200
static void
205
201
__latency_control_bl_write_wrapper (__ocl_WPipeTy<_T> Pipe, const _T *Data,
0 commit comments