40 static constexpr int LCNT = (INP_W - OUT_W) / (OUT_W - OVERLAP) + 1;
43 adf::port<input> pin[1];
44 adf::port<output> pout[LCNT];
47 static_assert(LCNT <= 8);
48 k[0] = adf::kernel::create_object<SPLIT<TT, H, INP_W, OUT_W, OVERLAP>>();
49 adf::source(k[0]) =
"split.cc";
50 adf::headers(k[0]) = {
"split.h"};
51 adf::runtime<ratio>(k[0]) = 0.6;
53 adf::connect<adf::stream> (pin[0], k[0].in[0]);
54 adf::samples_per_iteration(k[0].in[0]) = H*INP_W;
56 for (
int i = 0; i < LCNT; i++) {
57 adf::connect<adf::window<H*OUT_W*
sizeof(TT)>> (k[0].out[i], pout[i]);
58 adf::single_buffer(k[0].out[i]);
78 static constexpr int LCNT = (INP_W - OUT_W) / (OUT_W - OVERLAP) + 1;
80 adf::port<input> pin[1];
81 adf::port<output> pout[2];
84 k[0] = adf::kernel::create_object<SPLIT<TT, H, INP_W, OUT_W, OVERLAP>>();
85 adf::source(k[0]) =
"split.cc";
86 adf::headers(k[0]) = {
"split.h"};
87 adf::runtime<ratio>(k[0]) = 0.6;
89 adf::connect<adf::stream> (pin[0], k[0].in[0]);
90 adf::connect<adf::stream> (k[0].out[0], pout[0]);
91 adf::connect<adf::stream> (k[0].out[1], pout[1]);
93 adf::samples_per_iteration(k[0].in[0]) = H*INP_W;
94 adf::samples_per_iteration(k[0].out[0]) = H*OUT_W* ((LCNT+1)/2);
95 adf::samples_per_iteration(k[0].out[1]) = H*OUT_W* (LCNT/2);
114 static constexpr int LCNT = (INP_W - OUT_W) / (OUT_W - OVERLAP) + 1;
116 adf::port<input> pin[1];
117 adf::port<output> pout[1];
122 k[0] = adf::kernel::create_object<SPLIT<TT, H, INP_W, OUT_W, OVERLAP>>(lane_idx);
123 adf::source(k[0]) =
"split.cc";
124 adf::headers(k[0]) = {
"split.h"};
125 adf::runtime<ratio>(k[0]) = 0.6;
127 adf::connect<adf::stream> (pin[0], k[0].in[0]);
128 adf::connect<adf::stream> (k[0].out[0], pout[0]);
130 adf::samples_per_iteration(k[0].in[0]) = H*INP_W;
131 adf::samples_per_iteration(k[0].out[0]) = H*OUT_W;
150 static constexpr int LCNT = (INP_W - OUT_W) / (OUT_W - OVERLAP) + 1;
152 adf::port<input> pin[1];
153 adf::port<output> pout[2];
158 k[0] = adf::kernel::create_object<SPLIT<TT, H, INP_W, OUT_W, OVERLAP>>(lane_idx);
159 adf::source(k[0]) =
"split.cc";
160 adf::headers(k[0]) = {
"split.h"};
161 adf::runtime<ratio>(k[0]) = 0.6;
163 adf::connect<adf::stream> (pin[0], k[0].in[0]);
164 adf::connect<adf::stream> (k[0].out[0], pout[0]);
165 adf::connect<adf::stream> (k[0].out[1], pout[1]);
167 adf::samples_per_iteration(k[0].in[0]) = H*INP_W;
168 adf::samples_per_iteration(k[0].out[0]) = H*OUT_W;
169 adf::samples_per_iteration(k[0].out[1]) = H*OUT_W;
188 static constexpr int LCNT = (INP_W - OUT_W) / (OUT_W - OVERLAP) + 1;
190 adf::port<input> pin[1];
191 adf::port<output> pout[LCNT];
193 adf::pktsplit<(LCNT+1)/2> sp0;
194 adf::pktsplit<LCNT/2> sp1;
197 k[0] = adf::kernel::create_object<SPLIT<TT, H, INP_W, OUT_W, OVERLAP>>();
198 adf::source(k[0]) =
"split.cc";
199 adf::headers(k[0]) = {
"split.h"};
200 adf::runtime<ratio>(k[0]) = 0.6;
202 adf::connect<adf::stream> (pin[0], k[0].in[0]);
203 adf::samples_per_iteration(k[0].in[0]) = H*INP_W;
205 sp0 = adf::pktsplit<(LCNT+1)/2>::create();
206 for (
int i = 0; i < (LCNT+1)/2; i++) {
207 adf::connect<adf::pktstream, adf::stream> (sp0.out[i], pout[2*i]);
208 adf::samples_per_iteration(sp0.out[i]) = H*OUT_W;
210 adf::connect<adf::pktstream> (k[0].out[0], sp0.in[0]);
212 sp1 = adf::pktsplit<LCNT/2>::create();
213 for (
int i = 0; i < LCNT/2; i++) {
214 adf::connect<adf::pktstream, adf::stream> (sp1.out[i], pout[2*i+1]);
215 adf::samples_per_iteration(sp1.out[i]) = H*OUT_W;
217 adf::connect<adf::pktstream> (k[0].out[1], sp1.in[0]);