1 | namespace dnnl { |
2 | namespace impl { |
3 | namespace gpu { |
4 | namespace ocl { |
5 | const char * = R"==(/******************************************************************************* )==" "\n" |
6 | R"==(* Copyright 2019-2021 Intel Corporation )==" "\n" |
7 | R"==(* )==" "\n" |
8 | R"==(* Licensed under the Apache License, Version 2.0 (the "License"); )==" "\n" |
9 | R"==(* you may not use this file except in compliance with the License. )==" "\n" |
10 | R"==(* You may obtain a copy of the License at )==" "\n" |
11 | R"==(* )==" "\n" |
12 | R"==(* http: )==" "\n" |
13 | R"==(* )==" "\n" |
14 | R"==(* Unless required by applicable law or agreed to in writing, software )==" "\n" |
15 | R"==(* distributed under the License is distributed on an "AS IS" BASIS, )==" "\n" |
16 | R"==(* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. )==" "\n" |
17 | R"==(* See the License for the specific language governing permissions and )==" "\n" |
18 | R"==(* limitations under the License. )==" "\n" |
19 | R"==(*******************************************************************************/ )==" "\n" |
20 | R"==(#ifndef GPU_OCL_OCL_POST_OPS_H )==" "\n" |
21 | R"==(#define GPU_OCL_OCL_POST_OPS_H )==" "\n" |
22 | R"==(#ifndef SUB_GROUP_SIZE )==" "\n" |
23 | R"==(#define SUB_GROUP_SIZE get_sub_group_size() )==" "\n" |
24 | R"==(#endif )==" "\n" |
25 | R"==(#if WITH_POST_OP )==" "\n" |
26 | R"==(#if !WITH_ELTWISE )==" "\n" |
27 | R"==(#undef WITH_ELTWISE )==" "\n" |
28 | R"==(#define WITH_ELTWISE 1 )==" "\n" |
29 | R"==(#endif )==" "\n" |
30 | R"==(#include "gpu/ocl/ocl_eltwise.h" )==" "\n" |
31 | R"==(#include "gpu/ocl/ocl_types.h" )==" "\n" |
32 | R"==(float fwd_Xnary(unsigned kind, unsigned algorithm, float x, float y, )==" "\n" |
33 | R"==(float alpha, float beta, float scale) { )==" "\n" |
34 | R"==(if (kind == PO_BINARY) { )==" "\n" |
35 | R"==(switch (algorithm) { )==" "\n" |
36 | R"==(case BINARY_ADD: return x + y; break; )==" "\n" |
37 | R"==(case BINARY_MUL: return x * y; break; )==" "\n" |
38 | R"==(case BINARY_MIN: return x < y ? x : y; break; )==" "\n" |
39 | R"==(case BINARY_MAX: return x > y ? x : y; break; )==" "\n" |
40 | R"==(case BINARY_DIV: return x / y; break; )==" "\n" |
41 | R"==(case BINARY_SUB: return x - y; break; )==" "\n" |
42 | R"==(case BINARY_GE: return x >= y; break; )==" "\n" |
43 | R"==(case BINARY_GT: return x > y; break; )==" "\n" |
44 | R"==(case BINARY_LE: return x <= y; break; )==" "\n" |
45 | R"==(case BINARY_LT: return x < y; break; )==" "\n" |
46 | R"==(case BINARY_EQ: return x == y; break; )==" "\n" |
47 | R"==(case BINARY_NE: return x != y; break; )==" "\n" |
48 | R"==(case RELU: )==" "\n" |
49 | R"==(return fwd_eltwise_common(RELU, x, y, beta, scale); )==" "\n" |
50 | R"==(break; )==" "\n" |
51 | R"==(default: return 0.f; )==" "\n" |
52 | R"==(} )==" "\n" |
53 | R"==(} else { )==" "\n" |
54 | R"==(return fwd_eltwise_common(algorithm, x, alpha, beta, scale); )==" "\n" |
55 | R"==(} )==" "\n" |
56 | R"==(} )==" "\n" |
57 | R"==(#define CONV_BIN_ARG_TO_FLOAT(idx, bin_arg_val) \ )==" "\n" |
58 | R"==(({ \ )==" "\n" |
59 | R"==(float ret_val; \ )==" "\n" |
60 | R"==(if (CONCAT3(PO_, idx, _BIN_ARG_DT_IS_BF16)) \ )==" "\n" |
61 | R"==(ret_val = cvt_bf16_to_f32(bin_arg_val); \ )==" "\n" |
62 | R"==(else \ )==" "\n" |
63 | R"==(ret_val = convert_float(bin_arg_val); \ )==" "\n" |
64 | R"==(\ )==" "\n" |
65 | R"==(ret_val; \ )==" "\n" |
66 | R"==(}) )==" "\n" |
67 | R"==(#define FWD_XNARY_GENERIC_DT(po_kind, algorithm, result, result_elem_dt, \ )==" "\n" |
68 | R"==(arg0_ptr, arg0_len, arg1_ptr, arg1_len, alpha, beta, scale) \ )==" "\n" |
69 | R"==({ \ )==" "\n" |
70 | R"==(const unsigned out_len = max((unsigned)arg0_len, (unsigned)arg1_len); \ )==" "\n" |
71 | R"==(result_elem_dt *res_ptr = (result_elem_dt *)(&result); \ )==" "\n" |
72 | R"==(unroll_for(unsigned idx = 0; idx < out_len; ++idx) { \ )==" "\n" |
73 | R"==(if (arg0_len == 1 && arg1_len == 1) { \ )==" "\n" |
74 | R"==(*res_ptr = fwd_Xnary(po_kind, algorithm, \ )==" "\n" |
75 | R"==(convert_float(*arg0_ptr), convert_float(*arg1_ptr), \ )==" "\n" |
76 | R"==(alpha, beta, scale); \ )==" "\n" |
77 | R"==(} else if (arg0_len == 1) { \ )==" "\n" |
78 | R"==(res_ptr[idx] = fwd_Xnary(po_kind, algorithm, \ )==" "\n" |
79 | R"==(convert_float(*arg0_ptr), \ )==" "\n" |
80 | R"==(convert_float(arg1_ptr[idx]), alpha, beta, scale); \ )==" "\n" |
81 | R"==(} else if (arg1_len == 1) { \ )==" "\n" |
82 | R"==(res_ptr[idx] = fwd_Xnary(po_kind, algorithm, \ )==" "\n" |
83 | R"==(convert_float(arg0_ptr[idx]), \ )==" "\n" |
84 | R"==(convert_float(*arg1_ptr), alpha, beta, scale); \ )==" "\n" |
85 | R"==(} else { \ )==" "\n" |
86 | R"==(res_ptr[idx] = fwd_Xnary(po_kind, algorithm, \ )==" "\n" |
87 | R"==(convert_float(arg0_ptr[idx]), \ )==" "\n" |
88 | R"==(convert_float(arg1_ptr[idx]), alpha, beta, scale); \ )==" "\n" |
89 | R"==(} \ )==" "\n" |
90 | R"==(} \ )==" "\n" |
91 | R"==(} )==" "\n" |
92 | R"==(#define FMA_BLOCK( \ )==" "\n" |
93 | R"==(block_size, nof_elems, acc_ptr, acc_elem_dt, a_ptr, a_elem_dt, b) \ )==" "\n" |
94 | R"==(unroll_for(; nof_elems >= block_size; acc_ptr += block_size, \ )==" "\n" |
95 | R"==(a_ptr += block_size, nof_elems -= block_size) { \ )==" "\n" |
96 | R"==(CONCAT2(acc_elem_dt, block_size) \ )==" "\n" |
97 | R"==(a_conv = CONCAT3(convert_, acc_elem_dt, block_size)( \ )==" "\n" |
98 | R"==(*((CONCAT2(a_elem_dt, block_size) *)a_ptr)); \ )==" "\n" |
99 | R"==(*((CONCAT2(acc_elem_dt, block_size) *)acc_ptr) = fma( \ )==" "\n" |
100 | R"==(a_conv, b, *((CONCAT2(acc_elem_dt, block_size) *)acc_ptr)); \ )==" "\n" |
101 | R"==(} )==" "\n" |
102 | R"==(#define FMA_MIXED(acc_nof_elems, a, a_elem_dt, b, acc, acc_elem_dt) \ )==" "\n" |
103 | R"==({ \ )==" "\n" |
104 | R"==(unsigned nof_elems = acc_nof_elems; \ )==" "\n" |
105 | R"==(a_elem_dt *a_ptr = (a_elem_dt *)(&a); \ )==" "\n" |
106 | R"==(acc_elem_dt *acc_ptr = (acc_elem_dt *)(&acc); \ )==" "\n" |
107 | R"==(FMA_BLOCK(8, nof_elems, acc_ptr, acc_elem_dt, a_ptr, a_elem_dt, b); \ )==" "\n" |
108 | R"==(FMA_BLOCK(4, nof_elems, acc_ptr, acc_elem_dt, a_ptr, a_elem_dt, b); \ )==" "\n" |
109 | R"==(FMA_BLOCK(2, nof_elems, acc_ptr, acc_elem_dt, a_ptr, a_elem_dt, b); \ )==" "\n" |
110 | R"==(if (nof_elems == 1) { *acc_ptr += (*a_ptr) * b; } \ )==" "\n" |
111 | R"==(} )==" "\n" |
112 | R"==(#define FILL_BIN_ARG_SERIAL(idx, dest_ptr, x0, x0_s, x1, x1_s, x1_incr, x2, \ )==" "\n" |
113 | R"==(x2_s, x3, x3_s, x4, x4_s, x5, x5_s) \ )==" "\n" |
114 | R"==(unroll_for(unsigned x0_idx = x0, bin_arg_offset = 0; x0_idx < x0 + x0_s; \ )==" "\n" |
115 | R"==(++x0_idx) { \ )==" "\n" |
116 | R"==(unroll_for(unsigned x1_idx = x1; x1_idx < x1 + x1_s; \ )==" "\n" |
117 | R"==(x1_idx += x1_incr) { \ )==" "\n" |
118 | R"==(unroll_for(unsigned x2_idx = x2; x2_idx < x2 + x2_s; ++x2_idx) { \ )==" "\n" |
119 | R"==(unroll_for(unsigned x3_idx = x3; x3_idx < x3 + x3_s; \ )==" "\n" |
120 | R"==(++x3_idx) { \ )==" "\n" |
121 | R"==(unroll_for(unsigned x4_idx = x4; x4_idx < x4 + x4_s; \ )==" "\n" |
122 | R"==(++x4_idx) { \ )==" "\n" |
123 | R"==(unroll_for(unsigned x5_idx = x5; x5_idx < x5 + x5_s; \ )==" "\n" |
124 | R"==(++x5_idx, ++bin_arg_offset) { \ )==" "\n" |
125 | R"==(const unsigned bin_arg_glob_off = OFF_MD( \ )==" "\n" |
126 | R"==(CONCAT3(PO_, idx, _BIN_ARG), \ )==" "\n" |
127 | R"==(x0_idx % CONCAT3(PO_, idx, _BIN_ARG_D0), \ )==" "\n" |
128 | R"==(x1_idx % CONCAT3(PO_, idx, _BIN_ARG_D1), \ )==" "\n" |
129 | R"==(x2_idx % CONCAT3(PO_, idx, _BIN_ARG_D2), \ )==" "\n" |
130 | R"==(x3_idx % CONCAT3(PO_, idx, _BIN_ARG_D3), \ )==" "\n" |
131 | R"==(x4_idx % CONCAT3(PO_, idx, _BIN_ARG_D4), \ )==" "\n" |
132 | R"==(x5_idx % CONCAT3(PO_, idx, _BIN_ARG_D5)); \ )==" "\n" |
133 | R"==(dest_ptr[bin_arg_offset] = CONV_BIN_ARG_TO_FLOAT( \ )==" "\n" |
134 | R"==(idx, \ )==" "\n" |
135 | R"==(CONCAT3(po_, idx, \ )==" "\n" |
136 | R"==(_binary_arg)[bin_arg_glob_off]); \ )==" "\n" |
137 | R"==(} \ )==" "\n" |
138 | R"==(} \ )==" "\n" |
139 | R"==(} \ )==" "\n" |
140 | R"==(} \ )==" "\n" |
141 | R"==(} \ )==" "\n" |
142 | R"==(} )==" "\n" |
143 | R"==(#define intel_sub_group_block_read_uc1 intel_sub_group_block_read_uc )==" "\n" |
144 | R"==(#define intel_sub_group_block_read_us1 intel_sub_group_block_read_us )==" "\n" |
145 | R"==(#define intel_sub_group_block_read1 intel_sub_group_block_read )==" "\n" |
146 | R"==(#define uchar1 uchar )==" "\n" |
147 | R"==(#define ushort1 ushort )==" "\n" |
148 | R"==(#define uint1 uint )==" "\n" |
149 | R"==(#define FILL_WITH_BLOCK_READ(idx, src_ptr, dst_ptr, nelem, data_type) \ )==" "\n" |
150 | R"==({ \ )==" "\n" |
151 | R"==(data_type tmp_storage[nelem]; \ )==" "\n" |
152 | R"==(if (sizeof(data_type) == 1) { \ )==" "\n" |
153 | R"==(*((CONCAT2(uchar, nelem) *)(&tmp_storage)) \ )==" "\n" |
154 | R"==(= (CONCAT2(intel_sub_group_block_read_uc, nelem)( \ )==" "\n" |
155 | R"==((__global uchar *)(src_ptr))); \ )==" "\n" |
156 | R"==(} \ )==" "\n" |
157 | R"==(if (sizeof(data_type) == 2) { \ )==" "\n" |
158 | R"==(*((CONCAT2(ushort, nelem) *)(&tmp_storage)) \ )==" "\n" |
159 | R"==(= CONCAT2(intel_sub_group_block_read_us, nelem)( \ )==" "\n" |
160 | R"==((__global ushort *)(src_ptr)); \ )==" "\n" |
161 | R"==(} \ )==" "\n" |
162 | R"==(if (sizeof(data_type) == 4) { \ )==" "\n" |
163 | R"==(*((CONCAT2(uint, nelem) *)(&tmp_storage)) \ )==" "\n" |
164 | R"==(= CONCAT2(intel_sub_group_block_read, nelem)( \ )==" "\n" |
165 | R"==((__global uint *)(src_ptr)); \ )==" "\n" |
166 | R"==(} \ )==" "\n" |
167 | R"==(unroll_for(unsigned s_index = 0; s_index < nelem; ++s_index) { \ )==" "\n" |
168 | R"==(dst_ptr[s_index] \ )==" "\n" |
169 | R"==(= CONV_BIN_ARG_TO_FLOAT(idx, tmp_storage[s_index]); \ )==" "\n" |
170 | R"==(} \ )==" "\n" |
171 | R"==(} )==" "\n" |
172 | R"==(#define X_NELEMS(x) ({ x / SUB_GROUP_SIZE; }) )==" "\n" |
173 | R"==(#define CONDITIONAL_FILL( \ )==" "\n" |
174 | R"==(idx, blocked_coord, nelem, src_ptr, dst_ptr, data_type) \ )==" "\n" |
175 | R"==(if (blocked_coord / SUB_GROUP_SIZE == nelem) \ )==" "\n" |
176 | R"==(FILL_WITH_BLOCK_READ(idx, src_ptr, dst_ptr, nelem, data_type); )==" "\n" |
177 | R"==(#define FILL_BIN_ARG_TRY_BLOCK(idx, dest_ptr, dest_size, x0, x0_s, x1, x1_s, \ )==" "\n" |
178 | R"==(x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s) \ )==" "\n" |
179 | R"==({ \ )==" "\n" |
180 | R"==(unroll_for(unsigned x0_idx = x0, arg_off = 0; x0_idx < x0 + x0_s; \ )==" "\n" |
181 | R"==(++x0_idx, arg_off += X_NELEMS(x1_s)) { \ )==" "\n" |
182 | R"==(const unsigned bin_arg_glob_off \ )==" "\n" |
183 | R"==(= OFF_MD(CONCAT3(PO_, idx, _BIN_ARG), \ )==" "\n" |
184 | R"==(x0_idx % CONCAT3(PO_, idx, _BIN_ARG_D0), \ )==" "\n" |
185 | R"==(x1 % CONCAT3(PO_, idx, _BIN_ARG_D1), \ )==" "\n" |
186 | R"==(x2 % CONCAT3(PO_, idx, _BIN_ARG_D2), \ )==" "\n" |
187 | R"==(x3 % CONCAT3(PO_, idx, _BIN_ARG_D3), \ )==" "\n" |
188 | R"==(x4 % CONCAT3(PO_, idx, _BIN_ARG_D4), \ )==" "\n" |
189 | R"==(x5 % CONCAT3(PO_, idx, _BIN_ARG_D5)); \ )==" "\n" |
190 | R"==(\ )==" "\n" |
191 | R"==(CONDITIONAL_FILL(idx, x1_s, 1, \ )==" "\n" |
192 | R"==((CONCAT3(po_, idx, _binary_arg) + bin_arg_glob_off), \ )==" "\n" |
193 | R"==((dest_ptr + arg_off), CONCAT3(PO_, idx, _BIN_ARG_DATA_T)); \ )==" "\n" |
194 | R"==(CONDITIONAL_FILL(idx, x1_s, 2, \ )==" "\n" |
195 | R"==((CONCAT3(po_, idx, _binary_arg) + bin_arg_glob_off), \ )==" "\n" |
196 | R"==((dest_ptr + arg_off), CONCAT3(PO_, idx, _BIN_ARG_DATA_T)); \ )==" "\n" |
197 | R"==(CONDITIONAL_FILL(idx, x1_s, 4, \ )==" "\n" |
198 | R"==((CONCAT3(po_, idx, _binary_arg) + bin_arg_glob_off), \ )==" "\n" |
199 | R"==((dest_ptr + arg_off), CONCAT3(PO_, idx, _BIN_ARG_DATA_T)); \ )==" "\n" |
200 | R"==(} \ )==" "\n" |
201 | R"==(} )==" "\n" |
202 | R"==(#define REPLICATE_DATA( \ )==" "\n" |
203 | R"==(dest_ptr, dest_size, x0_s, x1_s, x2_s, x3_s, x4_s, x5_s) \ )==" "\n" |
204 | R"==({ \ )==" "\n" |
205 | R"==(const unsigned copy_size \ )==" "\n" |
206 | R"==(= x0_s * X_NELEMS(x1_s) * x2_s * x3_s * x4_s * x5_s; \ )==" "\n" |
207 | R"==(unroll_for(unsigned fid = copy_size; fid < dest_size; ++fid) { \ )==" "\n" |
208 | R"==(*(dest_ptr + fid) = *(dest_ptr + (fid % copy_size)); \ )==" "\n" |
209 | R"==(} \ )==" "\n" |
210 | R"==(} )==" "\n" |
211 | R"==(#define IS_BURSTABLE(idx, x0, x0_s, x1, x1_s, x2, x2_s, x3, x3_s, x4, x4_s, \ )==" "\n" |
212 | R"==(x5, x5_s, is_burst) \ )==" "\n" |
213 | R"==(({ \ )==" "\n" |
214 | R"==(bool is_burstable = is_burst; \ )==" "\n" |
215 | R"==(if (x0_s > CONCAT3(PO_, idx, _BIN_ARG_D0) && x0_s > 1) \ )==" "\n" |
216 | R"==(is_burstable = false; \ )==" "\n" |
217 | R"==(if (x1_s > CONCAT3(PO_, idx, _BIN_ARG_D1) && x1_s > 1) \ )==" "\n" |
218 | R"==(is_burstable = false; \ )==" "\n" |
219 | R"==(if (x2_s > CONCAT3(PO_, idx, _BIN_ARG_D2) && x2_s > 1) \ )==" "\n" |
220 | R"==(is_burstable = false; \ )==" "\n" |
221 | R"==(if (x3_s > CONCAT3(PO_, idx, _BIN_ARG_D3) && x3_s > 1) \ )==" "\n" |
222 | R"==(is_burstable = false; \ )==" "\n" |
223 | R"==(if (x4_s > CONCAT3(PO_, idx, _BIN_ARG_D4) && x4_s > 1) \ )==" "\n" |
224 | R"==(is_burstable = false; \ )==" "\n" |
225 | R"==(if (x5_s > CONCAT3(PO_, idx, _BIN_ARG_D5) && x5_s > 1) \ )==" "\n" |
226 | R"==(is_burstable = false; \ )==" "\n" |
227 | R"==(if (CONCAT3(PO_, idx, _BIN_ARG_D0) * CONCAT3(PO_, idx, _BIN_ARG_D1) \ )==" "\n" |
228 | R"==(* CONCAT3(PO_, idx, _BIN_ARG_D2) \ )==" "\n" |
229 | R"==(* CONCAT3(PO_, idx, _BIN_ARG_D2) \ )==" "\n" |
230 | R"==(* CONCAT3(PO_, idx, _BIN_ARG_D3) \ )==" "\n" |
231 | R"==(* CONCAT3(PO_, idx, _BIN_ARG_D4) \ )==" "\n" |
232 | R"==(* CONCAT3(PO_, idx, _BIN_ARG_D5) \ )==" "\n" |
233 | R"==(== 1) \ )==" "\n" |
234 | R"==(is_burstable = false; \ )==" "\n" |
235 | R"==(\ )==" "\n" |
236 | R"==(is_burstable; \ )==" "\n" |
237 | R"==(}) )==" "\n" |
238 | R"==(#define BINARY_ARG_IS_SCALAR(idx) ({ false; }) )==" "\n" |
239 | R"==(#define APPLY_PO_BINARY(idx, accumulator, acc_elem_dt, x0, x0_s, x1, x1_s, \ )==" "\n" |
240 | R"==(x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, is_burst) \ )==" "\n" |
241 | R"==({ \ )==" "\n" |
242 | R"==(const unsigned bin_arg_size = BINARY_ARG_IS_SCALAR(idx) \ )==" "\n" |
243 | R"==(? 1 \ )==" "\n" |
244 | R"==(: sizeof(accumulator) / sizeof(acc_elem_dt); \ )==" "\n" |
245 | R"==(float bin_arg[bin_arg_size]; \ )==" "\n" |
246 | R"==(float *bin_arg_ptr = &bin_arg[0]; \ )==" "\n" |
247 | R"==(const bool use_burst_read = IS_BURSTABLE(idx, x0, x0_s, x1, x1_s, x2, \ )==" "\n" |
248 | R"==(x2_s, x3, x3_s, x4, x4_s, x5, x5_s, is_burst); \ )==" "\n" |
249 | R"==(const unsigned x1_jump = is_burst ? SUB_GROUP_SIZE : 1; \ )==" "\n" |
250 | R"==(if (use_burst_read) { \ )==" "\n" |
251 | R"==(FILL_BIN_ARG_TRY_BLOCK(idx, bin_arg_ptr, bin_arg_size, x0, x0_s, \ )==" "\n" |
252 | R"==(x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
253 | R"==(x5_s); \ )==" "\n" |
254 | R"==(} else { \ )==" "\n" |
255 | R"==(FILL_BIN_ARG_SERIAL(idx, bin_arg_ptr, x0, x0_s, (x1 + x1_incr), \ )==" "\n" |
256 | R"==(x1_s, x1_jump, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s); \ )==" "\n" |
257 | R"==(} \ )==" "\n" |
258 | R"==(REPLICATE_DATA(bin_arg_ptr, bin_arg_size, x0_s, x1_s, x2_s, x3_s, \ )==" "\n" |
259 | R"==(x4_s, x5_s); \ )==" "\n" |
260 | R"==(FWD_XNARY_GENERIC_DT(PO_BINARY, CONCAT3(PO_, idx, _ALG), accumulator, \ )==" "\n" |
261 | R"==(acc_elem_dt, ((acc_elem_dt *)(&accumulator)), \ )==" "\n" |
262 | R"==((sizeof(accumulator) / sizeof(acc_elem_dt)), bin_arg_ptr, \ )==" "\n" |
263 | R"==(bin_arg_size, 0.0f, 0.0f, 1.0f); \ )==" "\n" |
264 | R"==(} )==" "\n" |
265 | R"==(#define APPLY_PO_SUM(idx, accumulator, acc_elem_dt, sum_src, sum_elem_dt) \ )==" "\n" |
266 | R"==({ \ )==" "\n" |
267 | R"==(unsigned acc_size = sizeof(accumulator) / sizeof(acc_elem_dt); \ )==" "\n" |
268 | R"==(FMA_MIXED(acc_size, sum_src, sum_elem_dt, \ )==" "\n" |
269 | R"==(CONCAT3(PO_, idx, _SUM_SCALE), accumulator, acc_elem_dt); \ )==" "\n" |
270 | R"==(} )==" "\n" |
271 | R"==(#define APPLY_PO_ELTWISE(idx, accumulator, acc_elem_dt) \ )==" "\n" |
272 | R"==({ \ )==" "\n" |
273 | R"==(FWD_XNARY_GENERIC_DT(PO_ELTWISE, CONCAT3(PO_, idx, _ALG), accumulator, \ )==" "\n" |
274 | R"==(acc_elem_dt, ((acc_elem_dt *)(&accumulator)), \ )==" "\n" |
275 | R"==((sizeof(accumulator) / sizeof(acc_elem_dt)), \ )==" "\n" |
276 | R"==(((acc_elem_dt *)(&accumulator)), \ )==" "\n" |
277 | R"==((sizeof(accumulator) / sizeof(acc_elem_dt)), \ )==" "\n" |
278 | R"==(CONCAT3(PO_, idx, _ELTWISE_ALPHA), \ )==" "\n" |
279 | R"==(CONCAT3(PO_, idx, _ELTWISE_BETA), \ )==" "\n" |
280 | R"==(CONCAT3(PO_, idx, _ELTWISE_SCALE)); \ )==" "\n" |
281 | R"==(} )==" "\n" |
282 | R"==(#define APPLY_PO_STAGE(idx, accumulator, acc_elem_dt, sum_src, sum_elem_dt, \ )==" "\n" |
283 | R"==(x0, x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
284 | R"==(is_burst) \ )==" "\n" |
285 | R"==(switch (CONCAT3(PO_, idx, _KIND)) { \ )==" "\n" |
286 | R"==(case PO_BINARY: \ )==" "\n" |
287 | R"==(APPLY_PO_BINARY(idx, accumulator, acc_elem_dt, x0, x0_s, x1, x1_s, \ )==" "\n" |
288 | R"==(x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
289 | R"==(is_burst); \ )==" "\n" |
290 | R"==(break; \ )==" "\n" |
291 | R"==(case PO_ELTWISE: APPLY_PO_ELTWISE(idx, accumulator, acc_elem_dt); \ )==" "\n" |
292 | R"==(break; \ )==" "\n" |
293 | R"==(case PO_SUM: \ )==" "\n" |
294 | R"==(APPLY_PO_SUM(idx, accumulator, acc_elem_dt, sum_src, sum_elem_dt); \ )==" "\n" |
295 | R"==(break; \ )==" "\n" |
296 | R"==(} )==" "\n" |
297 | R"==(#if POST_OP_CHAIN_LENGTH == 0 )==" "\n" |
298 | R"==(#define EMPTY_POST_OPS(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
299 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
300 | R"==(is_burst) \ )==" "\n" |
301 | R"==({} )==" "\n" |
302 | R"==(#endif )==" "\n" |
303 | R"==(#if POST_OP_CHAIN_LENGTH > 0 )==" "\n" |
304 | R"==(#define APPLY_1_PO_STAGE(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
305 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
306 | R"==(is_burst) \ )==" "\n" |
307 | R"==({ \ )==" "\n" |
308 | R"==(APPLY_PO_STAGE(0, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
309 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
310 | R"==(x5_s, is_burst); \ )==" "\n" |
311 | R"==(} )==" "\n" |
312 | R"==(#endif )==" "\n" |
313 | R"==(#if POST_OP_CHAIN_LENGTH > 1 )==" "\n" |
314 | R"==(#define APPLY_2_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
315 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
316 | R"==(is_burst) \ )==" "\n" |
317 | R"==({ \ )==" "\n" |
318 | R"==(APPLY_1_PO_STAGE(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
319 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
320 | R"==(x5_s, is_burst); \ )==" "\n" |
321 | R"==(APPLY_PO_STAGE(1, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
322 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
323 | R"==(x5_s, is_burst); \ )==" "\n" |
324 | R"==(} )==" "\n" |
325 | R"==(#endif )==" "\n" |
326 | R"==(#if POST_OP_CHAIN_LENGTH > 2 )==" "\n" |
327 | R"==(#define APPLY_3_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
328 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
329 | R"==(is_burst) \ )==" "\n" |
330 | R"==({ \ )==" "\n" |
331 | R"==(APPLY_2_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
332 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
333 | R"==(x5_s, is_burst); \ )==" "\n" |
334 | R"==(APPLY_PO_STAGE(2, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
335 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
336 | R"==(x5_s, is_burst); \ )==" "\n" |
337 | R"==(} )==" "\n" |
338 | R"==(#endif )==" "\n" |
339 | R"==(#if POST_OP_CHAIN_LENGTH > 3 )==" "\n" |
340 | R"==(#define APPLY_4_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
341 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
342 | R"==(is_burst) \ )==" "\n" |
343 | R"==({ \ )==" "\n" |
344 | R"==(APPLY_3_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
345 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
346 | R"==(x5_s, is_burst); \ )==" "\n" |
347 | R"==(APPLY_PO_STAGE(3, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
348 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
349 | R"==(x5_s, is_burst); \ )==" "\n" |
350 | R"==(} )==" "\n" |
351 | R"==(#endif )==" "\n" |
352 | R"==(#if POST_OP_CHAIN_LENGTH > 4 )==" "\n" |
353 | R"==(#define APPLY_5_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
354 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
355 | R"==(is_burst) \ )==" "\n" |
356 | R"==({ \ )==" "\n" |
357 | R"==(APPLY_4_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
358 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
359 | R"==(x5_s, is_burst); \ )==" "\n" |
360 | R"==(APPLY_PO_STAGE(4, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
361 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
362 | R"==(x5_s, is_burst); \ )==" "\n" |
363 | R"==(} )==" "\n" |
364 | R"==(#endif )==" "\n" |
365 | R"==(#if POST_OP_CHAIN_LENGTH > 5 )==" "\n" |
366 | R"==(#define APPLY_6_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
367 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
368 | R"==(is_burst) \ )==" "\n" |
369 | R"==({ \ )==" "\n" |
370 | R"==(APPLY_5_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
371 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
372 | R"==(x5_s, is_burst); \ )==" "\n" |
373 | R"==(APPLY_PO_STAGE(5, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
374 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
375 | R"==(x5_s, is_burst); \ )==" "\n" |
376 | R"==(} )==" "\n" |
377 | R"==(#endif )==" "\n" |
378 | R"==(#if POST_OP_CHAIN_LENGTH > 6 )==" "\n" |
379 | R"==(#define APPLY_7_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
380 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
381 | R"==(is_burst) \ )==" "\n" |
382 | R"==({ \ )==" "\n" |
383 | R"==(APPLY_6_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
384 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
385 | R"==(x5_s, is_burst); \ )==" "\n" |
386 | R"==(APPLY_PO_STAGE(6, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
387 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
388 | R"==(x5_s, is_burst); \ )==" "\n" |
389 | R"==(} )==" "\n" |
390 | R"==(#endif )==" "\n" |
391 | R"==(#if POST_OP_CHAIN_LENGTH > 7 )==" "\n" |
392 | R"==(#define APPLY_8_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
393 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
394 | R"==(is_burst) \ )==" "\n" |
395 | R"==({ \ )==" "\n" |
396 | R"==(APPLY_7_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
397 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
398 | R"==(x5_s, is_burst); \ )==" "\n" |
399 | R"==(APPLY_PO_STAGE(7, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
400 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
401 | R"==(x5_s, is_burst); \ )==" "\n" |
402 | R"==(} )==" "\n" |
403 | R"==(#endif )==" "\n" |
404 | R"==(#if POST_OP_CHAIN_LENGTH > 8 )==" "\n" |
405 | R"==(#define APPLY_9_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
406 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
407 | R"==(is_burst) \ )==" "\n" |
408 | R"==({ \ )==" "\n" |
409 | R"==(APPLY_8_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
410 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
411 | R"==(x5_s, is_burst); \ )==" "\n" |
412 | R"==(APPLY_PO_STAGE(8, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
413 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
414 | R"==(x5_s, is_burst); \ )==" "\n" |
415 | R"==(} )==" "\n" |
416 | R"==(#endif )==" "\n" |
417 | R"==(#if POST_OP_CHAIN_LENGTH > 9 )==" "\n" |
418 | R"==(#define APPLY_10_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
419 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
420 | R"==(is_burst) \ )==" "\n" |
421 | R"==({ \ )==" "\n" |
422 | R"==(APPLY_9_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
423 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
424 | R"==(x5_s, is_burst); \ )==" "\n" |
425 | R"==(APPLY_PO_STAGE(9, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
426 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
427 | R"==(x5_s, is_burst); \ )==" "\n" |
428 | R"==(} )==" "\n" |
429 | R"==(#endif )==" "\n" |
430 | R"==(#if POST_OP_CHAIN_LENGTH > 10 )==" "\n" |
431 | R"==(#define APPLY_11_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
432 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
433 | R"==(is_burst) \ )==" "\n" |
434 | R"==({ \ )==" "\n" |
435 | R"==(APPLY_10_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
436 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
437 | R"==(x5_s, is_burst); \ )==" "\n" |
438 | R"==(APPLY_PO_STAGE(10, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
439 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
440 | R"==(x5_s, is_burst); \ )==" "\n" |
441 | R"==(} )==" "\n" |
442 | R"==(#endif )==" "\n" |
443 | R"==(#if POST_OP_CHAIN_LENGTH > 11 )==" "\n" |
444 | R"==(#define APPLY_12_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
445 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
446 | R"==(is_burst) \ )==" "\n" |
447 | R"==({ \ )==" "\n" |
448 | R"==(APPLY_11_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
449 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
450 | R"==(x5_s, is_burst); \ )==" "\n" |
451 | R"==(APPLY_PO_STAGE(11, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
452 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
453 | R"==(x5_s, is_burst); \ )==" "\n" |
454 | R"==(} )==" "\n" |
455 | R"==(#endif )==" "\n" |
456 | R"==(#if POST_OP_CHAIN_LENGTH > 12 )==" "\n" |
457 | R"==(#define APPLY_13_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
458 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
459 | R"==(is_burst) \ )==" "\n" |
460 | R"==({ \ )==" "\n" |
461 | R"==(APPLY_12_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
462 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
463 | R"==(x5_s, is_burst); \ )==" "\n" |
464 | R"==(APPLY_PO_STAGE(12, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
465 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
466 | R"==(x5_s, is_burst); \ )==" "\n" |
467 | R"==(} )==" "\n" |
468 | R"==(#endif )==" "\n" |
469 | R"==(#if POST_OP_CHAIN_LENGTH > 13 )==" "\n" |
470 | R"==(#define APPLY_14_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
471 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
472 | R"==(is_burst) \ )==" "\n" |
473 | R"==({ \ )==" "\n" |
474 | R"==(APPLY_13_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
475 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
476 | R"==(x5_s, is_burst); \ )==" "\n" |
477 | R"==(APPLY_PO_STAGE(13, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
478 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
479 | R"==(x5_s, is_burst); \ )==" "\n" |
480 | R"==(} )==" "\n" |
481 | R"==(#endif )==" "\n" |
482 | R"==(#if POST_OP_CHAIN_LENGTH > 14 )==" "\n" |
483 | R"==(#define APPLY_15_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
484 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
485 | R"==(is_burst) \ )==" "\n" |
486 | R"==({ \ )==" "\n" |
487 | R"==(APPLY_14_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
488 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
489 | R"==(x5_s, is_burst); \ )==" "\n" |
490 | R"==(APPLY_PO_STAGE(14, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
491 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
492 | R"==(x5_s, is_burst); \ )==" "\n" |
493 | R"==(} )==" "\n" |
494 | R"==(#endif )==" "\n" |
495 | R"==(#if POST_OP_CHAIN_LENGTH > 15 )==" "\n" |
496 | R"==(#define APPLY_16_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
497 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
498 | R"==(is_burst) \ )==" "\n" |
499 | R"==({ \ )==" "\n" |
500 | R"==(APPLY_15_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
501 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
502 | R"==(x5_s, is_burst); \ )==" "\n" |
503 | R"==(APPLY_PO_STAGE(15, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
504 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
505 | R"==(x5_s, is_burst); \ )==" "\n" |
506 | R"==(} )==" "\n" |
507 | R"==(#endif )==" "\n" |
508 | R"==(#if POST_OP_CHAIN_LENGTH > 16 )==" "\n" |
509 | R"==(#define APPLY_17_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
510 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
511 | R"==(is_burst) \ )==" "\n" |
512 | R"==({ \ )==" "\n" |
513 | R"==(APPLY_16_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
514 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
515 | R"==(x5_s, is_burst); \ )==" "\n" |
516 | R"==(APPLY_PO_STAGE(16, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
517 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
518 | R"==(x5_s, is_burst); \ )==" "\n" |
519 | R"==(} )==" "\n" |
520 | R"==(#endif )==" "\n" |
521 | R"==(#if POST_OP_CHAIN_LENGTH > 17 )==" "\n" |
522 | R"==(#define APPLY_18_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
523 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
524 | R"==(is_burst) \ )==" "\n" |
525 | R"==({ \ )==" "\n" |
526 | R"==(APPLY_17_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
527 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
528 | R"==(x5_s, is_burst); \ )==" "\n" |
529 | R"==(APPLY_PO_STAGE(17, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
530 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
531 | R"==(x5_s, is_burst); \ )==" "\n" |
532 | R"==(} )==" "\n" |
533 | R"==(#endif )==" "\n" |
534 | R"==(#if POST_OP_CHAIN_LENGTH > 18 )==" "\n" |
535 | R"==(#define APPLY_19_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
536 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
537 | R"==(is_burst) \ )==" "\n" |
538 | R"==({ \ )==" "\n" |
539 | R"==(APPLY_18_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
540 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
541 | R"==(x5_s, is_burst); \ )==" "\n" |
542 | R"==(APPLY_PO_STAGE(18, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
543 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
544 | R"==(x5_s, is_burst); \ )==" "\n" |
545 | R"==(} )==" "\n" |
546 | R"==(#endif )==" "\n" |
547 | R"==(#if POST_OP_CHAIN_LENGTH > 19 )==" "\n" |
548 | R"==(#define APPLY_20_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
549 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
550 | R"==(is_burst) \ )==" "\n" |
551 | R"==({ \ )==" "\n" |
552 | R"==(APPLY_19_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
553 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
554 | R"==(x5_s, is_burst); \ )==" "\n" |
555 | R"==(APPLY_PO_STAGE(19, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
556 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
557 | R"==(x5_s, is_burst); \ )==" "\n" |
558 | R"==(} )==" "\n" |
559 | R"==(#endif )==" "\n" |
560 | R"==(#if POST_OP_CHAIN_LENGTH > 20 )==" "\n" |
561 | R"==(#define APPLY_21_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
562 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
563 | R"==(is_burst) \ )==" "\n" |
564 | R"==({ \ )==" "\n" |
565 | R"==(APPLY_20_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
566 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
567 | R"==(x5_s, is_burst); \ )==" "\n" |
568 | R"==(APPLY_PO_STAGE(20, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
569 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
570 | R"==(x5_s, is_burst); \ )==" "\n" |
571 | R"==(} )==" "\n" |
572 | R"==(#endif )==" "\n" |
573 | R"==(#if POST_OP_CHAIN_LENGTH > 21 )==" "\n" |
574 | R"==(#define APPLY_22_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
575 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
576 | R"==(is_burst) \ )==" "\n" |
577 | R"==({ \ )==" "\n" |
578 | R"==(APPLY_21_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
579 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
580 | R"==(x5_s, is_burst); \ )==" "\n" |
581 | R"==(APPLY_PO_STAGE(21, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
582 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
583 | R"==(x5_s, is_burst); \ )==" "\n" |
584 | R"==(} )==" "\n" |
585 | R"==(#endif )==" "\n" |
586 | R"==(#if POST_OP_CHAIN_LENGTH > 22 )==" "\n" |
587 | R"==(#define APPLY_23_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
588 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
589 | R"==(is_burst) \ )==" "\n" |
590 | R"==({ \ )==" "\n" |
591 | R"==(APPLY_22_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
592 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
593 | R"==(x5_s, is_burst); \ )==" "\n" |
594 | R"==(APPLY_PO_STAGE(22, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
595 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
596 | R"==(x5_s, is_burst); \ )==" "\n" |
597 | R"==(} )==" "\n" |
598 | R"==(#endif )==" "\n" |
599 | R"==(#if POST_OP_CHAIN_LENGTH > 23 )==" "\n" |
600 | R"==(#define APPLY_24_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
601 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
602 | R"==(is_burst) \ )==" "\n" |
603 | R"==({ \ )==" "\n" |
604 | R"==(APPLY_23_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
605 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
606 | R"==(x5_s, is_burst); \ )==" "\n" |
607 | R"==(APPLY_PO_STAGE(23, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
608 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
609 | R"==(x5_s, is_burst); \ )==" "\n" |
610 | R"==(} )==" "\n" |
611 | R"==(#endif )==" "\n" |
612 | R"==(#if POST_OP_CHAIN_LENGTH > 24 )==" "\n" |
613 | R"==(#define APPLY_25_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
614 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
615 | R"==(is_burst) \ )==" "\n" |
616 | R"==({ \ )==" "\n" |
617 | R"==(APPLY_24_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
618 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
619 | R"==(x5_s, is_burst); \ )==" "\n" |
620 | R"==(APPLY_PO_STAGE(24, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
621 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
622 | R"==(x5_s, is_burst); \ )==" "\n" |
623 | R"==(} )==" "\n" |
624 | R"==(#endif )==" "\n" |
625 | R"==(#if POST_OP_CHAIN_LENGTH > 25 )==" "\n" |
626 | R"==(#define APPLY_26_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
627 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
628 | R"==(is_burst) \ )==" "\n" |
629 | R"==({ \ )==" "\n" |
630 | R"==(APPLY_25_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
631 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
632 | R"==(x5_s, is_burst); \ )==" "\n" |
633 | R"==(APPLY_PO_STAGE(25, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
634 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
635 | R"==(x5_s, is_burst); \ )==" "\n" |
636 | R"==(} )==" "\n" |
637 | R"==(#endif )==" "\n" |
638 | R"==(#if POST_OP_CHAIN_LENGTH > 26 )==" "\n" |
639 | R"==(#define APPLY_27_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
640 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
641 | R"==(is_burst) \ )==" "\n" |
642 | R"==({ \ )==" "\n" |
643 | R"==(APPLY_26_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
644 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
645 | R"==(x5_s, is_burst); \ )==" "\n" |
646 | R"==(APPLY_PO_STAGE(26, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
647 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
648 | R"==(x5_s, is_burst); \ )==" "\n" |
649 | R"==(} )==" "\n" |
650 | R"==(#endif )==" "\n" |
651 | R"==(#if POST_OP_CHAIN_LENGTH > 27 )==" "\n" |
652 | R"==(#define APPLY_28_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
653 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
654 | R"==(is_burst) \ )==" "\n" |
655 | R"==({ \ )==" "\n" |
656 | R"==(APPLY_27_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
657 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
658 | R"==(x5_s, is_burst); \ )==" "\n" |
659 | R"==(APPLY_PO_STAGE(27, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
660 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
661 | R"==(x5_s, is_burst); \ )==" "\n" |
662 | R"==(} )==" "\n" |
663 | R"==(#endif )==" "\n" |
664 | R"==(#if POST_OP_CHAIN_LENGTH > 28 )==" "\n" |
665 | R"==(#define APPLY_29_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
666 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
667 | R"==(is_burst) \ )==" "\n" |
668 | R"==({ \ )==" "\n" |
669 | R"==(APPLY_28_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
670 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
671 | R"==(x5_s, is_burst); \ )==" "\n" |
672 | R"==(APPLY_PO_STAGE(28, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
673 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
674 | R"==(x5_s, is_burst); \ )==" "\n" |
675 | R"==(} )==" "\n" |
676 | R"==(#endif )==" "\n" |
677 | R"==(#if POST_OP_CHAIN_LENGTH > 29 )==" "\n" |
678 | R"==(#define APPLY_30_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
679 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
680 | R"==(is_burst) \ )==" "\n" |
681 | R"==({ \ )==" "\n" |
682 | R"==(APPLY_29_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
683 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
684 | R"==(x5_s, is_burst); \ )==" "\n" |
685 | R"==(APPLY_PO_STAGE(29, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
686 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
687 | R"==(x5_s, is_burst); \ )==" "\n" |
688 | R"==(} )==" "\n" |
689 | R"==(#endif )==" "\n" |
690 | R"==(#if POST_OP_CHAIN_LENGTH > 30 )==" "\n" |
691 | R"==(#define APPLY_31_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
692 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
693 | R"==(is_burst) \ )==" "\n" |
694 | R"==({ \ )==" "\n" |
695 | R"==(APPLY_30_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
696 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
697 | R"==(x5_s, is_burst); \ )==" "\n" |
698 | R"==(APPLY_PO_STAGE(30, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
699 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
700 | R"==(x5_s, is_burst); \ )==" "\n" |
701 | R"==(} )==" "\n" |
702 | R"==(#endif )==" "\n" |
703 | R"==(#if POST_OP_CHAIN_LENGTH > 31 )==" "\n" |
704 | R"==(#define APPLY_32_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
705 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
706 | R"==(is_burst) \ )==" "\n" |
707 | R"==({ \ )==" "\n" |
708 | R"==(APPLY_31_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
709 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
710 | R"==(x5_s, is_burst); \ )==" "\n" |
711 | R"==(APPLY_PO_STAGE(31, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
712 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
713 | R"==(x5_s, is_burst); \ )==" "\n" |
714 | R"==(} )==" "\n" |
715 | R"==(#endif )==" "\n" |
716 | R"==(#if POST_OP_CHAIN_LENGTH == 0 )==" "\n" |
717 | R"==(#define APPLY_ALL_PO_STAGES EMPTY_POST_OPS )==" "\n" |
718 | R"==(#elif POST_OP_CHAIN_LENGTH == 1 )==" "\n" |
719 | R"==(#define APPLY_ALL_PO_STAGES APPLY_1_PO_STAGE )==" "\n" |
720 | R"==(#elif POST_OP_CHAIN_LENGTH == 2 )==" "\n" |
721 | R"==(#define APPLY_ALL_PO_STAGES APPLY_2_PO_STAGES )==" "\n" |
722 | R"==(#elif POST_OP_CHAIN_LENGTH == 3 )==" "\n" |
723 | R"==(#define APPLY_ALL_PO_STAGES APPLY_3_PO_STAGES )==" "\n" |
724 | R"==(#elif POST_OP_CHAIN_LENGTH == 4 )==" "\n" |
725 | R"==(#define APPLY_ALL_PO_STAGES APPLY_4_PO_STAGES )==" "\n" |
726 | R"==(#elif POST_OP_CHAIN_LENGTH == 5 )==" "\n" |
727 | R"==(#define APPLY_ALL_PO_STAGES APPLY_5_PO_STAGES )==" "\n" |
728 | R"==(#elif POST_OP_CHAIN_LENGTH == 6 )==" "\n" |
729 | R"==(#define APPLY_ALL_PO_STAGES APPLY_6_PO_STAGES )==" "\n" |
730 | R"==(#elif POST_OP_CHAIN_LENGTH == 7 )==" "\n" |
731 | R"==(#define APPLY_ALL_PO_STAGES APPLY_7_PO_STAGES )==" "\n" |
732 | R"==(#elif POST_OP_CHAIN_LENGTH == 8 )==" "\n" |
733 | R"==(#define APPLY_ALL_PO_STAGES APPLY_8_PO_STAGES )==" "\n" |
734 | R"==(#elif POST_OP_CHAIN_LENGTH == 9 )==" "\n" |
735 | R"==(#define APPLY_ALL_PO_STAGES APPLY_9_PO_STAGES )==" "\n" |
736 | R"==(#elif POST_OP_CHAIN_LENGTH == 10 )==" "\n" |
737 | R"==(#define APPLY_ALL_PO_STAGES APPLY_10_PO_STAGES )==" "\n" |
738 | R"==(#elif POST_OP_CHAIN_LENGTH == 11 )==" "\n" |
739 | R"==(#define APPLY_ALL_PO_STAGES APPLY_11_PO_STAGES )==" "\n" |
740 | R"==(#elif POST_OP_CHAIN_LENGTH == 12 )==" "\n" |
741 | R"==(#define APPLY_ALL_PO_STAGES APPLY_12_PO_STAGES )==" "\n" |
742 | R"==(#elif POST_OP_CHAIN_LENGTH == 13 )==" "\n" |
743 | R"==(#define APPLY_ALL_PO_STAGES APPLY_13_PO_STAGES )==" "\n" |
744 | R"==(#elif POST_OP_CHAIN_LENGTH == 14 )==" "\n" |
745 | R"==(#define APPLY_ALL_PO_STAGES APPLY_14_PO_STAGES )==" "\n" |
746 | R"==(#elif POST_OP_CHAIN_LENGTH == 15 )==" "\n" |
747 | R"==(#define APPLY_ALL_PO_STAGES APPLY_15_PO_STAGES )==" "\n" |
748 | R"==(#elif POST_OP_CHAIN_LENGTH == 16 )==" "\n" |
749 | R"==(#define APPLY_ALL_PO_STAGES APPLY_16_PO_STAGES )==" "\n" |
750 | R"==(#elif POST_OP_CHAIN_LENGTH == 17 )==" "\n" |
751 | R"==(#define APPLY_ALL_PO_STAGES APPLY_17_PO_STAGES )==" "\n" |
752 | R"==(#elif POST_OP_CHAIN_LENGTH == 18 )==" "\n" |
753 | R"==(#define APPLY_ALL_PO_STAGES APPLY_18_PO_STAGES )==" "\n" |
754 | R"==(#elif POST_OP_CHAIN_LENGTH == 19 )==" "\n" |
755 | R"==(#define APPLY_ALL_PO_STAGES APPLY_19_PO_STAGES )==" "\n" |
756 | R"==(#elif POST_OP_CHAIN_LENGTH == 20 )==" "\n" |
757 | R"==(#define APPLY_ALL_PO_STAGES APPLY_20_PO_STAGES )==" "\n" |
758 | R"==(#elif POST_OP_CHAIN_LENGTH == 21 )==" "\n" |
759 | R"==(#define APPLY_ALL_PO_STAGES APPLY_21_PO_STAGES )==" "\n" |
760 | R"==(#elif POST_OP_CHAIN_LENGTH == 22 )==" "\n" |
761 | R"==(#define APPLY_ALL_PO_STAGES APPLY_22_PO_STAGES )==" "\n" |
762 | R"==(#elif POST_OP_CHAIN_LENGTH == 23 )==" "\n" |
763 | R"==(#define APPLY_ALL_PO_STAGES APPLY_23_PO_STAGES )==" "\n" |
764 | R"==(#elif POST_OP_CHAIN_LENGTH == 24 )==" "\n" |
765 | R"==(#define APPLY_ALL_PO_STAGES APPLY_24_PO_STAGES )==" "\n" |
766 | R"==(#elif POST_OP_CHAIN_LENGTH == 25 )==" "\n" |
767 | R"==(#define APPLY_ALL_PO_STAGES APPLY_25_PO_STAGES )==" "\n" |
768 | R"==(#elif POST_OP_CHAIN_LENGTH == 26 )==" "\n" |
769 | R"==(#define APPLY_ALL_PO_STAGES APPLY_26_PO_STAGES )==" "\n" |
770 | R"==(#elif POST_OP_CHAIN_LENGTH == 27 )==" "\n" |
771 | R"==(#define APPLY_ALL_PO_STAGES APPLY_27_PO_STAGES )==" "\n" |
772 | R"==(#elif POST_OP_CHAIN_LENGTH == 28 )==" "\n" |
773 | R"==(#define APPLY_ALL_PO_STAGES APPLY_28_PO_STAGES )==" "\n" |
774 | R"==(#elif POST_OP_CHAIN_LENGTH == 29 )==" "\n" |
775 | R"==(#define APPLY_ALL_PO_STAGES APPLY_29_PO_STAGES )==" "\n" |
776 | R"==(#elif POST_OP_CHAIN_LENGTH == 30 )==" "\n" |
777 | R"==(#define APPLY_ALL_PO_STAGES APPLY_30_PO_STAGES )==" "\n" |
778 | R"==(#elif POST_OP_CHAIN_LENGTH == 31 )==" "\n" |
779 | R"==(#define APPLY_ALL_PO_STAGES APPLY_31_PO_STAGES )==" "\n" |
780 | R"==(#elif POST_OP_CHAIN_LENGTH == 32 )==" "\n" |
781 | R"==(#define APPLY_ALL_PO_STAGES APPLY_32_PO_STAGES )==" "\n" |
782 | R"==(#endif )==" "\n" |
783 | R"==(#define APPLY_POST_OPS_BL(accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
784 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, x5_s, \ )==" "\n" |
785 | R"==(is_burst) \ )==" "\n" |
786 | R"==({ \ )==" "\n" |
787 | R"==(APPLY_ALL_PO_STAGES(accumulator, acc_elem_dt, sum_src, sum_elem_dt, \ )==" "\n" |
788 | R"==(x0, x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
789 | R"==(x5_s, is_burst); \ )==" "\n" |
790 | R"==(/*APPLY_PO_STAGE(0, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
791 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
792 | R"==(x5_s, is_burst); \ )==" "\n" |
793 | R"==(APPLY_PO_STAGE(1, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
794 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
795 | R"==(x5_s, is_burst); \ )==" "\n" |
796 | R"==(APPLY_PO_STAGE(2, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
797 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
798 | R"==(x5_s, is_burst); \ )==" "\n" |
799 | R"==(APPLY_PO_STAGE(3, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
800 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
801 | R"==(x5_s, is_burst); \ )==" "\n" |
802 | R"==(APPLY_PO_STAGE(4, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
803 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
804 | R"==(x5_s, is_burst); \ )==" "\n" |
805 | R"==(APPLY_PO_STAGE(5, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
806 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
807 | R"==(x5_s, is_burst); \ )==" "\n" |
808 | R"==(APPLY_PO_STAGE(6, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
809 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
810 | R"==(x5_s, is_burst); \ )==" "\n" |
811 | R"==(APPLY_PO_STAGE(7, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
812 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
813 | R"==(x5_s, is_burst); \ )==" "\n" |
814 | R"==(APPLY_PO_STAGE(8, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
815 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
816 | R"==(x5_s, is_burst); \ )==" "\n" |
817 | R"==(APPLY_PO_STAGE(9, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
818 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
819 | R"==(x5_s, is_burst); \ )==" "\n" |
820 | R"==(APPLY_PO_STAGE(10, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
821 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
822 | R"==(x5_s, is_burst); \ )==" "\n" |
823 | R"==(APPLY_PO_STAGE(11, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
824 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
825 | R"==(x5_s, is_burst); \ )==" "\n" |
826 | R"==(APPLY_PO_STAGE(12, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
827 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
828 | R"==(x5_s, is_burst); \ )==" "\n" |
829 | R"==(APPLY_PO_STAGE(13, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
830 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
831 | R"==(x5_s, is_burst); \ )==" "\n" |
832 | R"==(APPLY_PO_STAGE(14, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
833 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
834 | R"==(x5_s, is_burst); \ )==" "\n" |
835 | R"==(APPLY_PO_STAGE(15, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
836 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
837 | R"==(x5_s, is_burst); \ )==" "\n" |
838 | R"==(APPLY_PO_STAGE(16, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
839 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
840 | R"==(x5_s, is_burst); \ )==" "\n" |
841 | R"==(APPLY_PO_STAGE(17, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
842 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
843 | R"==(x5_s, is_burst); \ )==" "\n" |
844 | R"==(APPLY_PO_STAGE(18, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
845 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
846 | R"==(x5_s, is_burst); \ )==" "\n" |
847 | R"==(APPLY_PO_STAGE(19, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
848 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
849 | R"==(x5_s, is_burst); \ )==" "\n" |
850 | R"==(APPLY_PO_STAGE(20, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
851 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
852 | R"==(x5_s, is_burst); \ )==" "\n" |
853 | R"==(APPLY_PO_STAGE(21, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
854 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
855 | R"==(x5_s, is_burst); \ )==" "\n" |
856 | R"==(APPLY_PO_STAGE(22, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
857 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
858 | R"==(x5_s, is_burst); \ )==" "\n" |
859 | R"==(APPLY_PO_STAGE(23, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
860 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
861 | R"==(x5_s, is_burst); \ )==" "\n" |
862 | R"==(APPLY_PO_STAGE(24, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
863 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
864 | R"==(x5_s, is_burst); \ )==" "\n" |
865 | R"==(APPLY_PO_STAGE(25, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
866 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
867 | R"==(x5_s, is_burst); \ )==" "\n" |
868 | R"==(APPLY_PO_STAGE(26, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
869 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
870 | R"==(x5_s, is_burst); \ )==" "\n" |
871 | R"==(APPLY_PO_STAGE(27, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
872 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
873 | R"==(x5_s, is_burst); \ )==" "\n" |
874 | R"==(APPLY_PO_STAGE(28, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
875 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
876 | R"==(x5_s, is_burst); \ )==" "\n" |
877 | R"==(APPLY_PO_STAGE(29, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
878 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
879 | R"==(x5_s, is_burst); \ )==" "\n" |
880 | R"==(APPLY_PO_STAGE(30, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
881 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
882 | R"==(x5_s, is_burst); \ )==" "\n" |
883 | R"==(APPLY_PO_STAGE(31, accumulator, acc_elem_dt, sum_src, sum_elem_dt, x0, \ )==" "\n" |
884 | R"==(x0_s, x1, x1_s, x1_incr, x2, x2_s, x3, x3_s, x4, x4_s, x5, \ )==" "\n" |
885 | R"==(x5_s, is_burst); */ \ )==" "\n" |
886 | R"==(} )==" "\n" |
887 | R"==(#define APPLY_POST_OPS_TRY_BURST(accumulator, acc_elem_dt, sum_src, \ )==" "\n" |
888 | R"==(sum_elem_dt, mb_start, mb_size, oc_start, oc_size, oc_serial_incr) \ )==" "\n" |
889 | R"==(APPLY_POST_OPS_BL(accumulator, acc_elem_dt, sum_src, sum_elem_dt, \ )==" "\n" |
890 | R"==(mb_start, mb_size, oc_start, oc_size, oc_serial_incr, 0, 1, 0, 1, \ )==" "\n" |
891 | R"==(0, 1, 0, 1, true) )==" "\n" |
892 | R"==(#define APPLY_POST_OPS_SERIAL(accumulator, acc_elem_dt, sum_src, sum_elem_dt, \ )==" "\n" |
893 | R"==(mb_start, mb_size, oc_start, oc_size, d2_start, d2_size, d3_start, \ )==" "\n" |
894 | R"==(d3_size, d4_start, d4_size, d5_start, d5_size) \ )==" "\n" |
895 | R"==(APPLY_POST_OPS_BL(accumulator, acc_elem_dt, sum_src, sum_elem_dt, \ )==" "\n" |
896 | R"==(mb_start, mb_size, oc_start, oc_size, 0, d2_start, d2_size, \ )==" "\n" |
897 | R"==(d3_start, d3_size, d4_start, d4_size, d5_start, d5_size, false) )==" "\n" |
898 | R"==(#define APPLY_POST_OPS_SERIAL_BINARY_2D(accumulator, acc_elem_dt, sum_src, \ )==" "\n" |
899 | R"==(sum_elem_dt, mb_start, mb_size, oc_start, oc_size) \ )==" "\n" |
900 | R"==(APPLY_POST_OPS_BL(accumulator, acc_elem_dt, sum_src, sum_elem_dt, \ )==" "\n" |
901 | R"==(mb_start, mb_size, oc_start, oc_size, 0, 0, 1, 0, 1, 0, 1, 0, 1, \ )==" "\n" |
902 | R"==(false) )==" "\n" |
903 | R"==(#else )==" "\n" |
904 | R"==(#define APPLY_POST_OPS_SERIAL(accumulator, acc_elem_dt, sum_src, sum_elem_dt, \ )==" "\n" |
905 | R"==(mb_start, mb_size, oc_start, oc_size, d2_start, d2_size, d3_start, \ )==" "\n" |
906 | R"==(d3_size, d4_start, d4_size, d5_start, d5_size) \ )==" "\n" |
907 | R"==({} )==" "\n" |
908 | R"==(#define APPLY_POST_OPS_SERIAL_BINARY_2D(accumulator, acc_elem_dt, sum_src, \ )==" "\n" |
909 | R"==(sum_elem_dt, mb_start, mb_size, oc_start, oc_size) \ )==" "\n" |
910 | R"==({} )==" "\n" |
911 | R"==(#define APPLY_POST_OPS_TRY_BURST(accumulator, acc_elem_dt, sum_src, \ )==" "\n" |
912 | R"==(sum_elem_dt, mb_start, mb_size, oc_start, oc_size, oc_serial_incr) \ )==" "\n" |
913 | R"==({} )==" "\n" |
914 | R"==(#endif )==" "\n" |
915 | R"==(#endif )==" "\n" |
916 | R"==()==" ; |
917 | } |
918 | } |
919 | } |
920 | } |