Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
addressing_impl.hpp
Go to the documentation of this file.
1// AUTOGENERATED FILE
2#pragma once
3
5
6namespace bb::avm2 {
7
8template <typename FF_>
9template <typename ContainerOverSubrelations, typename AllEntities>
10void addressingImpl<FF_>::accumulate(ContainerOverSubrelations& evals,
11 const AllEntities& in,
12 [[maybe_unused]] const RelationParameters<FF_>&,
13 [[maybe_unused]] const FF_& scaling_factor)
14{
15 using C = ColumnAndShifts;
16
17 PROFILE_THIS_NAME("accumulate/addressing");
18
19 const auto constants_MEM_TAG_U32 = FF(4);
20 const auto execution_SEL_OP_IS_INDIRECT_EFFECTIVE_0_ =
21 in.get(C::execution_sel_op_is_indirect_wire_0_) * in.get(C::execution_sel_op_is_address_0_);
22 const auto execution_SEL_OP_IS_INDIRECT_EFFECTIVE_1_ =
23 in.get(C::execution_sel_op_is_indirect_wire_1_) * in.get(C::execution_sel_op_is_address_1_);
24 const auto execution_SEL_OP_IS_INDIRECT_EFFECTIVE_2_ =
25 in.get(C::execution_sel_op_is_indirect_wire_2_) * in.get(C::execution_sel_op_is_address_2_);
26 const auto execution_SEL_OP_IS_INDIRECT_EFFECTIVE_3_ =
27 in.get(C::execution_sel_op_is_indirect_wire_3_) * in.get(C::execution_sel_op_is_address_3_);
28 const auto execution_SEL_OP_IS_INDIRECT_EFFECTIVE_4_ =
29 in.get(C::execution_sel_op_is_indirect_wire_4_) * in.get(C::execution_sel_op_is_address_4_);
30 const auto execution_SEL_OP_IS_INDIRECT_EFFECTIVE_5_ =
31 in.get(C::execution_sel_op_is_indirect_wire_5_) * in.get(C::execution_sel_op_is_address_5_);
32 const auto execution_SEL_OP_IS_INDIRECT_EFFECTIVE_6_ =
33 in.get(C::execution_sel_op_is_indirect_wire_6_) * in.get(C::execution_sel_op_is_address_6_);
34 const auto execution_NUM_RELATIVE_OPERANDS =
35 in.get(C::execution_sel_op_is_relative_effective_0_) + in.get(C::execution_sel_op_is_relative_effective_1_) +
36 in.get(C::execution_sel_op_is_relative_effective_2_) + in.get(C::execution_sel_op_is_relative_effective_3_) +
37 in.get(C::execution_sel_op_is_relative_effective_4_) + in.get(C::execution_sel_op_is_relative_effective_5_) +
38 in.get(C::execution_sel_op_is_relative_effective_6_);
39 const auto execution_NUM_RELATIVE_X = execution_NUM_RELATIVE_OPERANDS;
40 const auto execution_NUM_RELATIVE_Y = in.get(C::execution_num_relative_operands_inv);
41 const auto execution_NUM_RELATIVE_E = (FF(1) - in.get(C::execution_sel_do_base_check));
42 const auto execution_BASE_CHECK_X =
43 in.get(C::execution_sel_do_base_check) * (in.get(C::execution_base_address_tag) - constants_MEM_TAG_U32);
44 const auto execution_BASE_CHECK_Y = in.get(C::execution_base_address_tag_diff_inv);
45 const auto execution_BASE_CHECK_E = (FF(1) - in.get(C::execution_sel_base_address_failure));
46 const auto execution_RELATIVE_RESOLUTION_FILTER =
47 (FF(1) - in.get(C::execution_sel_base_address_failure)) * in.get(C::execution_base_address_val);
48 const auto execution_BATCHED_TAGS_DIFF = in.get(C::execution_sel_should_apply_indirection_0_) * FF(1) *
49 (in.get(C::execution_rop_tag_0_) - constants_MEM_TAG_U32) +
50 in.get(C::execution_sel_should_apply_indirection_1_) * FF(8) *
51 (in.get(C::execution_rop_tag_1_) - constants_MEM_TAG_U32) +
52 in.get(C::execution_sel_should_apply_indirection_2_) * FF(64) *
53 (in.get(C::execution_rop_tag_2_) - constants_MEM_TAG_U32) +
54 in.get(C::execution_sel_should_apply_indirection_3_) * FF(512) *
55 (in.get(C::execution_rop_tag_3_) - constants_MEM_TAG_U32) +
56 in.get(C::execution_sel_should_apply_indirection_4_) * FF(4096) *
57 (in.get(C::execution_rop_tag_4_) - constants_MEM_TAG_U32) +
58 in.get(C::execution_sel_should_apply_indirection_5_) * FF(32768) *
59 (in.get(C::execution_rop_tag_5_) - constants_MEM_TAG_U32) +
60 in.get(C::execution_sel_should_apply_indirection_6_) * FF(262144) *
61 (in.get(C::execution_rop_tag_6_) - constants_MEM_TAG_U32);
62 const auto execution_BATCHED_TAGS_DIFF_X = execution_BATCHED_TAGS_DIFF;
63 const auto execution_BATCHED_TAGS_DIFF_Y = in.get(C::execution_batched_tags_diff_inv);
64 const auto execution_BATCHED_TAGS_DIFF_E = (FF(1) - in.get(C::execution_sel_some_final_check_failed));
65 const auto execution_BATCHED_TAGS_DIFF_EQ =
66 (execution_BATCHED_TAGS_DIFF_X *
67 (execution_BATCHED_TAGS_DIFF_E * (FF(1) - execution_BATCHED_TAGS_DIFF_Y) + execution_BATCHED_TAGS_DIFF_Y) -
68 FF(1)) +
69 execution_BATCHED_TAGS_DIFF_E;
70 const auto execution_ADDRESSING_ERROR_COLLECTION =
71 in.get(C::execution_sel_base_address_failure) + in.get(C::execution_sel_relative_overflow_0_) +
72 in.get(C::execution_sel_relative_overflow_1_) + in.get(C::execution_sel_relative_overflow_2_) +
73 in.get(C::execution_sel_relative_overflow_3_) + in.get(C::execution_sel_relative_overflow_4_) +
74 in.get(C::execution_sel_relative_overflow_5_) + in.get(C::execution_sel_relative_overflow_6_) +
75 in.get(C::execution_sel_some_final_check_failed);
76 const auto execution_ADDRESSING_COLLECTION_X = execution_ADDRESSING_ERROR_COLLECTION;
77 const auto execution_ADDRESSING_COLLECTION_Y = in.get(C::execution_addressing_error_collection_inv);
78 const auto execution_ADDRESSING_COLLECTION_E = (FF(1) - in.get(C::execution_sel_addressing_error));
79 const auto execution_ADDRESSING_COLLECTION_EQ =
80 (execution_ADDRESSING_COLLECTION_X *
81 (execution_ADDRESSING_COLLECTION_E * (FF(1) - execution_ADDRESSING_COLLECTION_Y) +
82 execution_ADDRESSING_COLLECTION_Y) -
83 FF(1)) +
84 execution_ADDRESSING_COLLECTION_E;
85 const auto execution_SEL_SHOULD_RESOLVE_ADDRESS =
86 in.get(C::execution_sel_bytecode_retrieval_success) * in.get(C::execution_sel_instruction_fetching_success);
87
88 {
89 using Accumulator = typename std::tuple_element_t<0, ContainerOverSubrelations>;
90 auto tmp =
91 in.get(C::execution_sel_op_is_relative_wire_0_) * (FF(1) - in.get(C::execution_sel_op_is_relative_wire_0_));
92 tmp *= scaling_factor;
93 std::get<0>(evals) += typename Accumulator::View(tmp);
94 }
95 {
96 using Accumulator = typename std::tuple_element_t<1, ContainerOverSubrelations>;
97 auto tmp =
98 in.get(C::execution_sel_op_is_relative_wire_1_) * (FF(1) - in.get(C::execution_sel_op_is_relative_wire_1_));
99 tmp *= scaling_factor;
100 std::get<1>(evals) += typename Accumulator::View(tmp);
101 }
102 {
103 using Accumulator = typename std::tuple_element_t<2, ContainerOverSubrelations>;
104 auto tmp =
105 in.get(C::execution_sel_op_is_relative_wire_2_) * (FF(1) - in.get(C::execution_sel_op_is_relative_wire_2_));
106 tmp *= scaling_factor;
107 std::get<2>(evals) += typename Accumulator::View(tmp);
108 }
109 {
110 using Accumulator = typename std::tuple_element_t<3, ContainerOverSubrelations>;
111 auto tmp =
112 in.get(C::execution_sel_op_is_relative_wire_3_) * (FF(1) - in.get(C::execution_sel_op_is_relative_wire_3_));
113 tmp *= scaling_factor;
114 std::get<3>(evals) += typename Accumulator::View(tmp);
115 }
116 {
117 using Accumulator = typename std::tuple_element_t<4, ContainerOverSubrelations>;
118 auto tmp =
119 in.get(C::execution_sel_op_is_relative_wire_4_) * (FF(1) - in.get(C::execution_sel_op_is_relative_wire_4_));
120 tmp *= scaling_factor;
121 std::get<4>(evals) += typename Accumulator::View(tmp);
122 }
123 {
124 using Accumulator = typename std::tuple_element_t<5, ContainerOverSubrelations>;
125 auto tmp =
126 in.get(C::execution_sel_op_is_relative_wire_5_) * (FF(1) - in.get(C::execution_sel_op_is_relative_wire_5_));
127 tmp *= scaling_factor;
128 std::get<5>(evals) += typename Accumulator::View(tmp);
129 }
130 {
131 using Accumulator = typename std::tuple_element_t<6, ContainerOverSubrelations>;
132 auto tmp =
133 in.get(C::execution_sel_op_is_relative_wire_6_) * (FF(1) - in.get(C::execution_sel_op_is_relative_wire_6_));
134 tmp *= scaling_factor;
135 std::get<6>(evals) += typename Accumulator::View(tmp);
136 }
137 {
138 using Accumulator = typename std::tuple_element_t<7, ContainerOverSubrelations>;
139 auto tmp =
140 in.get(C::execution_sel_op_is_relative_wire_7_) * (FF(1) - in.get(C::execution_sel_op_is_relative_wire_7_));
141 tmp *= scaling_factor;
142 std::get<7>(evals) += typename Accumulator::View(tmp);
143 }
144 {
145 using Accumulator = typename std::tuple_element_t<8, ContainerOverSubrelations>;
146 auto tmp =
147 in.get(C::execution_sel_op_is_indirect_wire_0_) * (FF(1) - in.get(C::execution_sel_op_is_indirect_wire_0_));
148 tmp *= scaling_factor;
149 std::get<8>(evals) += typename Accumulator::View(tmp);
150 }
151 {
152 using Accumulator = typename std::tuple_element_t<9, ContainerOverSubrelations>;
153 auto tmp =
154 in.get(C::execution_sel_op_is_indirect_wire_1_) * (FF(1) - in.get(C::execution_sel_op_is_indirect_wire_1_));
155 tmp *= scaling_factor;
156 std::get<9>(evals) += typename Accumulator::View(tmp);
157 }
158 {
159 using Accumulator = typename std::tuple_element_t<10, ContainerOverSubrelations>;
160 auto tmp =
161 in.get(C::execution_sel_op_is_indirect_wire_2_) * (FF(1) - in.get(C::execution_sel_op_is_indirect_wire_2_));
162 tmp *= scaling_factor;
163 std::get<10>(evals) += typename Accumulator::View(tmp);
164 }
165 {
166 using Accumulator = typename std::tuple_element_t<11, ContainerOverSubrelations>;
167 auto tmp =
168 in.get(C::execution_sel_op_is_indirect_wire_3_) * (FF(1) - in.get(C::execution_sel_op_is_indirect_wire_3_));
169 tmp *= scaling_factor;
170 std::get<11>(evals) += typename Accumulator::View(tmp);
171 }
172 {
173 using Accumulator = typename std::tuple_element_t<12, ContainerOverSubrelations>;
174 auto tmp =
175 in.get(C::execution_sel_op_is_indirect_wire_4_) * (FF(1) - in.get(C::execution_sel_op_is_indirect_wire_4_));
176 tmp *= scaling_factor;
177 std::get<12>(evals) += typename Accumulator::View(tmp);
178 }
179 {
180 using Accumulator = typename std::tuple_element_t<13, ContainerOverSubrelations>;
181 auto tmp =
182 in.get(C::execution_sel_op_is_indirect_wire_5_) * (FF(1) - in.get(C::execution_sel_op_is_indirect_wire_5_));
183 tmp *= scaling_factor;
184 std::get<13>(evals) += typename Accumulator::View(tmp);
185 }
186 {
187 using Accumulator = typename std::tuple_element_t<14, ContainerOverSubrelations>;
188 auto tmp =
189 in.get(C::execution_sel_op_is_indirect_wire_6_) * (FF(1) - in.get(C::execution_sel_op_is_indirect_wire_6_));
190 tmp *= scaling_factor;
191 std::get<14>(evals) += typename Accumulator::View(tmp);
192 }
193 {
194 using Accumulator = typename std::tuple_element_t<15, ContainerOverSubrelations>;
195 auto tmp =
196 in.get(C::execution_sel_op_is_indirect_wire_7_) * (FF(1) - in.get(C::execution_sel_op_is_indirect_wire_7_));
197 tmp *= scaling_factor;
198 std::get<15>(evals) += typename Accumulator::View(tmp);
199 }
200 { // INDIRECT_RECONSTRUCTION
201 using Accumulator = typename std::tuple_element_t<16, ContainerOverSubrelations>;
202 auto tmp = (execution_SEL_SHOULD_RESOLVE_ADDRESS * in.get(C::execution_indirect) -
203 (FF(1) * in.get(C::execution_sel_op_is_indirect_wire_0_) +
204 FF(2) * in.get(C::execution_sel_op_is_relative_wire_0_) +
205 FF(4) * in.get(C::execution_sel_op_is_indirect_wire_1_) +
206 FF(8) * in.get(C::execution_sel_op_is_relative_wire_1_) +
207 FF(16) * in.get(C::execution_sel_op_is_indirect_wire_2_) +
208 FF(32) * in.get(C::execution_sel_op_is_relative_wire_2_) +
209 FF(64) * in.get(C::execution_sel_op_is_indirect_wire_3_) +
210 FF(128) * in.get(C::execution_sel_op_is_relative_wire_3_) +
211 FF(256) * in.get(C::execution_sel_op_is_indirect_wire_4_) +
212 FF(512) * in.get(C::execution_sel_op_is_relative_wire_4_) +
213 FF(1024) * in.get(C::execution_sel_op_is_indirect_wire_5_) +
214 FF(2048) * in.get(C::execution_sel_op_is_relative_wire_5_) +
215 FF(4096) * in.get(C::execution_sel_op_is_indirect_wire_6_) +
216 FF(8192) * in.get(C::execution_sel_op_is_relative_wire_6_) +
217 FF(16384) * in.get(C::execution_sel_op_is_indirect_wire_7_) +
218 FF(32768) * in.get(C::execution_sel_op_is_relative_wire_7_)));
219 tmp *= scaling_factor;
220 std::get<16>(evals) += typename Accumulator::View(tmp);
221 }
222 {
223 using Accumulator = typename std::tuple_element_t<17, ContainerOverSubrelations>;
224 auto tmp = (in.get(C::execution_sel_op_is_relative_effective_0_) -
225 in.get(C::execution_sel_op_is_relative_wire_0_) * in.get(C::execution_sel_op_is_address_0_));
226 tmp *= scaling_factor;
227 std::get<17>(evals) += typename Accumulator::View(tmp);
228 }
229 {
230 using Accumulator = typename std::tuple_element_t<18, ContainerOverSubrelations>;
231 auto tmp = (in.get(C::execution_sel_op_is_relative_effective_1_) -
232 in.get(C::execution_sel_op_is_relative_wire_1_) * in.get(C::execution_sel_op_is_address_1_));
233 tmp *= scaling_factor;
234 std::get<18>(evals) += typename Accumulator::View(tmp);
235 }
236 {
237 using Accumulator = typename std::tuple_element_t<19, ContainerOverSubrelations>;
238 auto tmp = (in.get(C::execution_sel_op_is_relative_effective_2_) -
239 in.get(C::execution_sel_op_is_relative_wire_2_) * in.get(C::execution_sel_op_is_address_2_));
240 tmp *= scaling_factor;
241 std::get<19>(evals) += typename Accumulator::View(tmp);
242 }
243 {
244 using Accumulator = typename std::tuple_element_t<20, ContainerOverSubrelations>;
245 auto tmp = (in.get(C::execution_sel_op_is_relative_effective_3_) -
246 in.get(C::execution_sel_op_is_relative_wire_3_) * in.get(C::execution_sel_op_is_address_3_));
247 tmp *= scaling_factor;
248 std::get<20>(evals) += typename Accumulator::View(tmp);
249 }
250 {
251 using Accumulator = typename std::tuple_element_t<21, ContainerOverSubrelations>;
252 auto tmp = (in.get(C::execution_sel_op_is_relative_effective_4_) -
253 in.get(C::execution_sel_op_is_relative_wire_4_) * in.get(C::execution_sel_op_is_address_4_));
254 tmp *= scaling_factor;
255 std::get<21>(evals) += typename Accumulator::View(tmp);
256 }
257 {
258 using Accumulator = typename std::tuple_element_t<22, ContainerOverSubrelations>;
259 auto tmp = (in.get(C::execution_sel_op_is_relative_effective_5_) -
260 in.get(C::execution_sel_op_is_relative_wire_5_) * in.get(C::execution_sel_op_is_address_5_));
261 tmp *= scaling_factor;
262 std::get<22>(evals) += typename Accumulator::View(tmp);
263 }
264 {
265 using Accumulator = typename std::tuple_element_t<23, ContainerOverSubrelations>;
266 auto tmp = (in.get(C::execution_sel_op_is_relative_effective_6_) -
267 in.get(C::execution_sel_op_is_relative_wire_6_) * in.get(C::execution_sel_op_is_address_6_));
268 tmp *= scaling_factor;
269 std::get<23>(evals) += typename Accumulator::View(tmp);
270 }
271 { // NUM_RELATIVE_INV_CHECK
272 using Accumulator = typename std::tuple_element_t<24, ContainerOverSubrelations>;
273 auto tmp = ((execution_NUM_RELATIVE_X *
274 (execution_NUM_RELATIVE_E * (FF(1) - execution_NUM_RELATIVE_Y) + execution_NUM_RELATIVE_Y) -
275 FF(1)) +
276 execution_NUM_RELATIVE_E);
277 tmp *= scaling_factor;
278 std::get<24>(evals) += typename Accumulator::View(tmp);
279 }
280 { // BASE_ADDRESS_CHECK
281 using Accumulator = typename std::tuple_element_t<25, ContainerOverSubrelations>;
282 auto tmp = ((execution_BASE_CHECK_X *
283 (execution_BASE_CHECK_E * (FF(1) - execution_BASE_CHECK_Y) + execution_BASE_CHECK_Y) -
284 FF(1)) +
285 execution_BASE_CHECK_E);
286 tmp *= scaling_factor;
287 std::get<25>(evals) += typename Accumulator::View(tmp);
288 }
289 {
290 using Accumulator = typename std::tuple_element_t<26, ContainerOverSubrelations>;
291 auto tmp =
292 in.get(C::execution_sel_relative_overflow_0_) * (FF(1) - in.get(C::execution_sel_relative_overflow_0_));
293 tmp *= scaling_factor;
294 std::get<26>(evals) += typename Accumulator::View(tmp);
295 }
296 {
297 using Accumulator = typename std::tuple_element_t<27, ContainerOverSubrelations>;
298 auto tmp =
299 in.get(C::execution_sel_relative_overflow_1_) * (FF(1) - in.get(C::execution_sel_relative_overflow_1_));
300 tmp *= scaling_factor;
301 std::get<27>(evals) += typename Accumulator::View(tmp);
302 }
303 {
304 using Accumulator = typename std::tuple_element_t<28, ContainerOverSubrelations>;
305 auto tmp =
306 in.get(C::execution_sel_relative_overflow_2_) * (FF(1) - in.get(C::execution_sel_relative_overflow_2_));
307 tmp *= scaling_factor;
308 std::get<28>(evals) += typename Accumulator::View(tmp);
309 }
310 {
311 using Accumulator = typename std::tuple_element_t<29, ContainerOverSubrelations>;
312 auto tmp =
313 in.get(C::execution_sel_relative_overflow_3_) * (FF(1) - in.get(C::execution_sel_relative_overflow_3_));
314 tmp *= scaling_factor;
315 std::get<29>(evals) += typename Accumulator::View(tmp);
316 }
317 {
318 using Accumulator = typename std::tuple_element_t<30, ContainerOverSubrelations>;
319 auto tmp =
320 in.get(C::execution_sel_relative_overflow_4_) * (FF(1) - in.get(C::execution_sel_relative_overflow_4_));
321 tmp *= scaling_factor;
322 std::get<30>(evals) += typename Accumulator::View(tmp);
323 }
324 {
325 using Accumulator = typename std::tuple_element_t<31, ContainerOverSubrelations>;
326 auto tmp =
327 in.get(C::execution_sel_relative_overflow_5_) * (FF(1) - in.get(C::execution_sel_relative_overflow_5_));
328 tmp *= scaling_factor;
329 std::get<31>(evals) += typename Accumulator::View(tmp);
330 }
331 {
332 using Accumulator = typename std::tuple_element_t<32, ContainerOverSubrelations>;
333 auto tmp =
334 in.get(C::execution_sel_relative_overflow_6_) * (FF(1) - in.get(C::execution_sel_relative_overflow_6_));
335 tmp *= scaling_factor;
336 std::get<32>(evals) += typename Accumulator::View(tmp);
337 }
338 { // NOT_RELATIVE_NO_OVERFLOW_0
339 using Accumulator = typename std::tuple_element_t<33, ContainerOverSubrelations>;
340 auto tmp = in.get(C::execution_sel_relative_overflow_0_) *
341 (FF(1) - in.get(C::execution_sel_op_is_relative_effective_0_));
342 tmp *= scaling_factor;
343 std::get<33>(evals) += typename Accumulator::View(tmp);
344 }
345 { // NOT_RELATIVE_NO_OVERFLOW_1
346 using Accumulator = typename std::tuple_element_t<34, ContainerOverSubrelations>;
347 auto tmp = in.get(C::execution_sel_relative_overflow_1_) *
348 (FF(1) - in.get(C::execution_sel_op_is_relative_effective_1_));
349 tmp *= scaling_factor;
350 std::get<34>(evals) += typename Accumulator::View(tmp);
351 }
352 { // NOT_RELATIVE_NO_OVERFLOW_2
353 using Accumulator = typename std::tuple_element_t<35, ContainerOverSubrelations>;
354 auto tmp = in.get(C::execution_sel_relative_overflow_2_) *
355 (FF(1) - in.get(C::execution_sel_op_is_relative_effective_2_));
356 tmp *= scaling_factor;
357 std::get<35>(evals) += typename Accumulator::View(tmp);
358 }
359 { // NOT_RELATIVE_NO_OVERFLOW_3
360 using Accumulator = typename std::tuple_element_t<36, ContainerOverSubrelations>;
361 auto tmp = in.get(C::execution_sel_relative_overflow_3_) *
362 (FF(1) - in.get(C::execution_sel_op_is_relative_effective_3_));
363 tmp *= scaling_factor;
364 std::get<36>(evals) += typename Accumulator::View(tmp);
365 }
366 { // NOT_RELATIVE_NO_OVERFLOW_4
367 using Accumulator = typename std::tuple_element_t<37, ContainerOverSubrelations>;
368 auto tmp = in.get(C::execution_sel_relative_overflow_4_) *
369 (FF(1) - in.get(C::execution_sel_op_is_relative_effective_4_));
370 tmp *= scaling_factor;
371 std::get<37>(evals) += typename Accumulator::View(tmp);
372 }
373 { // NOT_RELATIVE_NO_OVERFLOW_5
374 using Accumulator = typename std::tuple_element_t<38, ContainerOverSubrelations>;
375 auto tmp = in.get(C::execution_sel_relative_overflow_5_) *
376 (FF(1) - in.get(C::execution_sel_op_is_relative_effective_5_));
377 tmp *= scaling_factor;
378 std::get<38>(evals) += typename Accumulator::View(tmp);
379 }
380 { // NOT_RELATIVE_NO_OVERFLOW_6
381 using Accumulator = typename std::tuple_element_t<39, ContainerOverSubrelations>;
382 auto tmp = in.get(C::execution_sel_relative_overflow_6_) *
383 (FF(1) - in.get(C::execution_sel_op_is_relative_effective_6_));
384 tmp *= scaling_factor;
385 std::get<39>(evals) += typename Accumulator::View(tmp);
386 }
387 { // RELATIVE_RESOLUTION_0
388 using Accumulator = typename std::tuple_element_t<40, ContainerOverSubrelations>;
389 auto tmp = (in.get(C::execution_op_after_relative_0_) -
390 (in.get(C::execution_op_0_) +
391 in.get(C::execution_sel_op_is_relative_effective_0_) * execution_RELATIVE_RESOLUTION_FILTER));
392 tmp *= scaling_factor;
393 std::get<40>(evals) += typename Accumulator::View(tmp);
394 }
395 { // RELATIVE_RESOLUTION_1
396 using Accumulator = typename std::tuple_element_t<41, ContainerOverSubrelations>;
397 auto tmp = (in.get(C::execution_op_after_relative_1_) -
398 (in.get(C::execution_op_1_) +
399 in.get(C::execution_sel_op_is_relative_effective_1_) * execution_RELATIVE_RESOLUTION_FILTER));
400 tmp *= scaling_factor;
401 std::get<41>(evals) += typename Accumulator::View(tmp);
402 }
403 { // RELATIVE_RESOLUTION_2
404 using Accumulator = typename std::tuple_element_t<42, ContainerOverSubrelations>;
405 auto tmp = (in.get(C::execution_op_after_relative_2_) -
406 (in.get(C::execution_op_2_) +
407 in.get(C::execution_sel_op_is_relative_effective_2_) * execution_RELATIVE_RESOLUTION_FILTER));
408 tmp *= scaling_factor;
409 std::get<42>(evals) += typename Accumulator::View(tmp);
410 }
411 { // RELATIVE_RESOLUTION_3
412 using Accumulator = typename std::tuple_element_t<43, ContainerOverSubrelations>;
413 auto tmp = (in.get(C::execution_op_after_relative_3_) -
414 (in.get(C::execution_op_3_) +
415 in.get(C::execution_sel_op_is_relative_effective_3_) * execution_RELATIVE_RESOLUTION_FILTER));
416 tmp *= scaling_factor;
417 std::get<43>(evals) += typename Accumulator::View(tmp);
418 }
419 { // RELATIVE_RESOLUTION_4
420 using Accumulator = typename std::tuple_element_t<44, ContainerOverSubrelations>;
421 auto tmp = (in.get(C::execution_op_after_relative_4_) -
422 (in.get(C::execution_op_4_) +
423 in.get(C::execution_sel_op_is_relative_effective_4_) * execution_RELATIVE_RESOLUTION_FILTER));
424 tmp *= scaling_factor;
425 std::get<44>(evals) += typename Accumulator::View(tmp);
426 }
427 { // RELATIVE_RESOLUTION_5
428 using Accumulator = typename std::tuple_element_t<45, ContainerOverSubrelations>;
429 auto tmp = (in.get(C::execution_op_after_relative_5_) -
430 (in.get(C::execution_op_5_) +
431 in.get(C::execution_sel_op_is_relative_effective_5_) * execution_RELATIVE_RESOLUTION_FILTER));
432 tmp *= scaling_factor;
433 std::get<45>(evals) += typename Accumulator::View(tmp);
434 }
435 { // RELATIVE_RESOLUTION_6
436 using Accumulator = typename std::tuple_element_t<46, ContainerOverSubrelations>;
437 auto tmp = (in.get(C::execution_op_after_relative_6_) -
438 (in.get(C::execution_op_6_) +
439 in.get(C::execution_sel_op_is_relative_effective_6_) * execution_RELATIVE_RESOLUTION_FILTER));
440 tmp *= scaling_factor;
441 std::get<46>(evals) += typename Accumulator::View(tmp);
442 }
443 {
444 using Accumulator = typename std::tuple_element_t<47, ContainerOverSubrelations>;
445 auto tmp = execution_SEL_SHOULD_RESOLVE_ADDRESS * (in.get(C::execution_two_to_32) - FF(4294967296UL));
446 tmp *= scaling_factor;
447 std::get<47>(evals) += typename Accumulator::View(tmp);
448 }
449 { // RELATIVE_OVERFLOW_RESULT_0
450 using Accumulator = typename std::tuple_element_t<48, ContainerOverSubrelations>;
451 auto tmp =
452 (in.get(C::execution_overflow_range_check_result_0_) -
453 in.get(C::execution_sel_op_is_relative_effective_0_) *
454 (((FF(1) - in.get(C::execution_sel_relative_overflow_0_)) *
455 ((FF(2) * in.get(C::execution_two_to_32) - FF(2) * in.get(C::execution_op_after_relative_0_)) -
456 FF(1)) +
457 in.get(C::execution_op_after_relative_0_)) -
458 in.get(C::execution_two_to_32)));
459 tmp *= scaling_factor;
460 std::get<48>(evals) += typename Accumulator::View(tmp);
461 }
462 { // RELATIVE_OVERFLOW_RESULT_1
463 using Accumulator = typename std::tuple_element_t<49, ContainerOverSubrelations>;
464 auto tmp =
465 (in.get(C::execution_overflow_range_check_result_1_) -
466 in.get(C::execution_sel_op_is_relative_effective_1_) *
467 (((FF(1) - in.get(C::execution_sel_relative_overflow_1_)) *
468 ((FF(2) * in.get(C::execution_two_to_32) - FF(2) * in.get(C::execution_op_after_relative_1_)) -
469 FF(1)) +
470 in.get(C::execution_op_after_relative_1_)) -
471 in.get(C::execution_two_to_32)));
472 tmp *= scaling_factor;
473 std::get<49>(evals) += typename Accumulator::View(tmp);
474 }
475 { // RELATIVE_OVERFLOW_RESULT_2
476 using Accumulator = typename std::tuple_element_t<50, ContainerOverSubrelations>;
477 auto tmp =
478 (in.get(C::execution_overflow_range_check_result_2_) -
479 in.get(C::execution_sel_op_is_relative_effective_2_) *
480 (((FF(1) - in.get(C::execution_sel_relative_overflow_2_)) *
481 ((FF(2) * in.get(C::execution_two_to_32) - FF(2) * in.get(C::execution_op_after_relative_2_)) -
482 FF(1)) +
483 in.get(C::execution_op_after_relative_2_)) -
484 in.get(C::execution_two_to_32)));
485 tmp *= scaling_factor;
486 std::get<50>(evals) += typename Accumulator::View(tmp);
487 }
488 { // RELATIVE_OVERFLOW_RESULT_3
489 using Accumulator = typename std::tuple_element_t<51, ContainerOverSubrelations>;
490 auto tmp =
491 (in.get(C::execution_overflow_range_check_result_3_) -
492 in.get(C::execution_sel_op_is_relative_effective_3_) *
493 (((FF(1) - in.get(C::execution_sel_relative_overflow_3_)) *
494 ((FF(2) * in.get(C::execution_two_to_32) - FF(2) * in.get(C::execution_op_after_relative_3_)) -
495 FF(1)) +
496 in.get(C::execution_op_after_relative_3_)) -
497 in.get(C::execution_two_to_32)));
498 tmp *= scaling_factor;
499 std::get<51>(evals) += typename Accumulator::View(tmp);
500 }
501 { // RELATIVE_OVERFLOW_RESULT_4
502 using Accumulator = typename std::tuple_element_t<52, ContainerOverSubrelations>;
503 auto tmp =
504 (in.get(C::execution_overflow_range_check_result_4_) -
505 in.get(C::execution_sel_op_is_relative_effective_4_) *
506 (((FF(1) - in.get(C::execution_sel_relative_overflow_4_)) *
507 ((FF(2) * in.get(C::execution_two_to_32) - FF(2) * in.get(C::execution_op_after_relative_4_)) -
508 FF(1)) +
509 in.get(C::execution_op_after_relative_4_)) -
510 in.get(C::execution_two_to_32)));
511 tmp *= scaling_factor;
512 std::get<52>(evals) += typename Accumulator::View(tmp);
513 }
514 { // RELATIVE_OVERFLOW_RESULT_5
515 using Accumulator = typename std::tuple_element_t<53, ContainerOverSubrelations>;
516 auto tmp =
517 (in.get(C::execution_overflow_range_check_result_5_) -
518 in.get(C::execution_sel_op_is_relative_effective_5_) *
519 (((FF(1) - in.get(C::execution_sel_relative_overflow_5_)) *
520 ((FF(2) * in.get(C::execution_two_to_32) - FF(2) * in.get(C::execution_op_after_relative_5_)) -
521 FF(1)) +
522 in.get(C::execution_op_after_relative_5_)) -
523 in.get(C::execution_two_to_32)));
524 tmp *= scaling_factor;
525 std::get<53>(evals) += typename Accumulator::View(tmp);
526 }
527 { // RELATIVE_OVERFLOW_RESULT_6
528 using Accumulator = typename std::tuple_element_t<54, ContainerOverSubrelations>;
529 auto tmp =
530 (in.get(C::execution_overflow_range_check_result_6_) -
531 in.get(C::execution_sel_op_is_relative_effective_6_) *
532 (((FF(1) - in.get(C::execution_sel_relative_overflow_6_)) *
533 ((FF(2) * in.get(C::execution_two_to_32) - FF(2) * in.get(C::execution_op_after_relative_6_)) -
534 FF(1)) +
535 in.get(C::execution_op_after_relative_6_)) -
536 in.get(C::execution_two_to_32)));
537 tmp *= scaling_factor;
538 std::get<54>(evals) += typename Accumulator::View(tmp);
539 }
540 { // INDIRECT_GATING_0
541 using Accumulator = typename std::tuple_element_t<55, ContainerOverSubrelations>;
542 auto tmp =
543 (in.get(C::execution_sel_should_apply_indirection_0_) -
544 execution_SEL_OP_IS_INDIRECT_EFFECTIVE_0_ * (FF(1) - in.get(C::execution_sel_relative_overflow_0_)) *
545 (FF(1) - in.get(C::execution_sel_base_address_failure)));
546 tmp *= scaling_factor;
547 std::get<55>(evals) += typename Accumulator::View(tmp);
548 }
549 { // INDIRECT_GATING_1
550 using Accumulator = typename std::tuple_element_t<56, ContainerOverSubrelations>;
551 auto tmp =
552 (in.get(C::execution_sel_should_apply_indirection_1_) -
553 execution_SEL_OP_IS_INDIRECT_EFFECTIVE_1_ * (FF(1) - in.get(C::execution_sel_relative_overflow_1_)) *
554 (FF(1) - in.get(C::execution_sel_base_address_failure)));
555 tmp *= scaling_factor;
556 std::get<56>(evals) += typename Accumulator::View(tmp);
557 }
558 { // INDIRECT_GATING_2
559 using Accumulator = typename std::tuple_element_t<57, ContainerOverSubrelations>;
560 auto tmp =
561 (in.get(C::execution_sel_should_apply_indirection_2_) -
562 execution_SEL_OP_IS_INDIRECT_EFFECTIVE_2_ * (FF(1) - in.get(C::execution_sel_relative_overflow_2_)) *
563 (FF(1) - in.get(C::execution_sel_base_address_failure)));
564 tmp *= scaling_factor;
565 std::get<57>(evals) += typename Accumulator::View(tmp);
566 }
567 { // INDIRECT_GATING_3
568 using Accumulator = typename std::tuple_element_t<58, ContainerOverSubrelations>;
569 auto tmp =
570 (in.get(C::execution_sel_should_apply_indirection_3_) -
571 execution_SEL_OP_IS_INDIRECT_EFFECTIVE_3_ * (FF(1) - in.get(C::execution_sel_relative_overflow_3_)) *
572 (FF(1) - in.get(C::execution_sel_base_address_failure)));
573 tmp *= scaling_factor;
574 std::get<58>(evals) += typename Accumulator::View(tmp);
575 }
576 { // INDIRECT_GATING_4
577 using Accumulator = typename std::tuple_element_t<59, ContainerOverSubrelations>;
578 auto tmp =
579 (in.get(C::execution_sel_should_apply_indirection_4_) -
580 execution_SEL_OP_IS_INDIRECT_EFFECTIVE_4_ * (FF(1) - in.get(C::execution_sel_relative_overflow_4_)) *
581 (FF(1) - in.get(C::execution_sel_base_address_failure)));
582 tmp *= scaling_factor;
583 std::get<59>(evals) += typename Accumulator::View(tmp);
584 }
585 { // INDIRECT_GATING_5
586 using Accumulator = typename std::tuple_element_t<60, ContainerOverSubrelations>;
587 auto tmp =
588 (in.get(C::execution_sel_should_apply_indirection_5_) -
589 execution_SEL_OP_IS_INDIRECT_EFFECTIVE_5_ * (FF(1) - in.get(C::execution_sel_relative_overflow_5_)) *
590 (FF(1) - in.get(C::execution_sel_base_address_failure)));
591 tmp *= scaling_factor;
592 std::get<60>(evals) += typename Accumulator::View(tmp);
593 }
594 { // INDIRECT_GATING_6
595 using Accumulator = typename std::tuple_element_t<61, ContainerOverSubrelations>;
596 auto tmp =
597 (in.get(C::execution_sel_should_apply_indirection_6_) -
598 execution_SEL_OP_IS_INDIRECT_EFFECTIVE_6_ * (FF(1) - in.get(C::execution_sel_relative_overflow_6_)) *
599 (FF(1) - in.get(C::execution_sel_base_address_failure)));
600 tmp *= scaling_factor;
601 std::get<61>(evals) += typename Accumulator::View(tmp);
602 }
603 { // INDIRECT_PROPAGATION_0
604 using Accumulator = typename std::tuple_element_t<62, ContainerOverSubrelations>;
605 auto tmp = (FF(1) - in.get(C::execution_sel_should_apply_indirection_0_)) *
606 (in.get(C::execution_rop_0_) - in.get(C::execution_op_after_relative_0_));
607 tmp *= scaling_factor;
608 std::get<62>(evals) += typename Accumulator::View(tmp);
609 }
610 { // INDIRECT_PROPAGATION_1
611 using Accumulator = typename std::tuple_element_t<63, ContainerOverSubrelations>;
612 auto tmp = (FF(1) - in.get(C::execution_sel_should_apply_indirection_1_)) *
613 (in.get(C::execution_rop_1_) - in.get(C::execution_op_after_relative_1_));
614 tmp *= scaling_factor;
615 std::get<63>(evals) += typename Accumulator::View(tmp);
616 }
617 { // INDIRECT_PROPAGATION_2
618 using Accumulator = typename std::tuple_element_t<64, ContainerOverSubrelations>;
619 auto tmp = (FF(1) - in.get(C::execution_sel_should_apply_indirection_2_)) *
620 (in.get(C::execution_rop_2_) - in.get(C::execution_op_after_relative_2_));
621 tmp *= scaling_factor;
622 std::get<64>(evals) += typename Accumulator::View(tmp);
623 }
624 { // INDIRECT_PROPAGATION_3
625 using Accumulator = typename std::tuple_element_t<65, ContainerOverSubrelations>;
626 auto tmp = (FF(1) - in.get(C::execution_sel_should_apply_indirection_3_)) *
627 (in.get(C::execution_rop_3_) - in.get(C::execution_op_after_relative_3_));
628 tmp *= scaling_factor;
629 std::get<65>(evals) += typename Accumulator::View(tmp);
630 }
631 { // INDIRECT_PROPAGATION_4
632 using Accumulator = typename std::tuple_element_t<66, ContainerOverSubrelations>;
633 auto tmp = (FF(1) - in.get(C::execution_sel_should_apply_indirection_4_)) *
634 (in.get(C::execution_rop_4_) - in.get(C::execution_op_after_relative_4_));
635 tmp *= scaling_factor;
636 std::get<66>(evals) += typename Accumulator::View(tmp);
637 }
638 { // INDIRECT_PROPAGATION_5
639 using Accumulator = typename std::tuple_element_t<67, ContainerOverSubrelations>;
640 auto tmp = (FF(1) - in.get(C::execution_sel_should_apply_indirection_5_)) *
641 (in.get(C::execution_rop_5_) - in.get(C::execution_op_after_relative_5_));
642 tmp *= scaling_factor;
643 std::get<67>(evals) += typename Accumulator::View(tmp);
644 }
645 { // INDIRECT_PROPAGATION_6
646 using Accumulator = typename std::tuple_element_t<68, ContainerOverSubrelations>;
647 auto tmp = (FF(1) - in.get(C::execution_sel_should_apply_indirection_6_)) *
648 (in.get(C::execution_rop_6_) - in.get(C::execution_op_after_relative_6_));
649 tmp *= scaling_factor;
650 std::get<68>(evals) += typename Accumulator::View(tmp);
651 }
652 { // BATCHED_TAGS_DIFF_CHECK
653 using Accumulator = typename std::tuple_element_t<69, ContainerOverSubrelations>;
654 auto tmp = execution_BATCHED_TAGS_DIFF_EQ;
655 tmp *= scaling_factor;
656 std::get<69>(evals) += typename Accumulator::View(tmp);
657 }
658 { // ADDRESSING_COLLECTION_INV_CHECK
659 using Accumulator = typename std::tuple_element_t<70, ContainerOverSubrelations>;
660 auto tmp = execution_ADDRESSING_COLLECTION_EQ;
661 tmp *= scaling_factor;
662 std::get<70>(evals) += typename Accumulator::View(tmp);
663 }
664 {
665 using Accumulator = typename std::tuple_element_t<71, ContainerOverSubrelations>;
666 auto tmp = (FF(1) - execution_SEL_SHOULD_RESOLVE_ADDRESS) * in.get(C::execution_sel_addressing_error);
667 tmp *= scaling_factor;
668 std::get<71>(evals) += typename Accumulator::View(tmp);
669 }
670}
671
672} // namespace bb::avm2
static void accumulate(ContainerOverSubrelations &evals, const AllEntities &in, const RelationParameters< FF > &, const FF &scaling_factor)
ColumnAndShifts
Definition columns.hpp:35
AvmFlavorSettings::FF FF
Definition field.hpp:10
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
#define PROFILE_THIS_NAME(name)
Definition op_count.hpp:16
Container for parameters used by the grand product (permutation, lookup) Honk relations.