Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ultra_flavor_generated.hpp
Go to the documentation of this file.
1// AUTOGENERATED FILE — do not edit. Regenerate via:
2// node barretenberg/cpp/scripts/flavor-codegen/dist/main.js
3//
4// Source: barretenberg/cpp/scripts/flavor-codegen/src/flavors/ultra.ts
5#pragma once
6
7#include <array>
8#include <cstddef>
9#include <cstdint>
10#include <span>
11#include <string>
12#include <tuple>
13#include <vector>
14
28
29namespace bb {
30
32 public:
33 // Dense flavor-local entity index. Layout: [masking | precomputed | witness | shifted].
34 enum class EntityId : uint16_t {
35 sigma_1 = 0,
36 sigma_2 = 1,
37 sigma_3 = 2,
38 sigma_4 = 3,
39 id_1 = 4,
40 id_2 = 5,
41 id_3 = 6,
42 id_4 = 7,
44 lagrange_last = 9,
45 q_lookup = 10,
46 table_1 = 11,
47 table_2 = 12,
48 table_3 = 13,
49 table_4 = 14,
50 q_m = 15,
51 q_r = 16,
52 q_o = 17,
53 q_c = 18,
54 q_l = 19,
55 q_4 = 20,
56 q_arith = 21,
57 q_delta_range = 22,
58 q_elliptic = 23,
59 q_memory = 24,
60 q_nnf = 25,
63 w_l = 28,
64 w_r = 29,
65 w_o = 30,
66 w_4 = 31,
67 z_perm = 32,
68 lookup_inverses = 33,
71 w_l_shift = 36,
72 w_r_shift = 37,
73 w_o_shift = 38,
74 w_4_shift = 39,
75 z_perm_shift = 40,
76 };
77
78 // Sumcheck relation tuple. Source of truth is
79 // flavor-codegen/src/flavors/ultra.ts; structural relations are omitted.
80 template <typename FF>
90
91 static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 28;
92 static constexpr size_t NUM_WITNESS_ENTITIES = 8;
93 static constexpr size_t NUM_MASKING_ENTITIES = 0;
94 static constexpr size_t NUM_SHIFTED_ENTITIES = 5;
95 static constexpr bool HasDataBus = false;
96 static constexpr size_t NUM_BUS_COLUMNS = 0;
97 static constexpr bool HasLogDerivLookup = true;
98 static constexpr bool HasElliptic = true;
99 static constexpr bool HasMemory = true;
100 static constexpr bool HasNonNativeField = true;
101 static constexpr bool HasEccOpQueue = false;
105
106 // Per-shifted-entity (original, duplicate) index pairs in AllEntities, one per shifted
107 // entity. Collapsed into `RepeatedCommitmentsData` below for Shplemini compatibility.
109 DuplicatePair{ 28, 36 }, DuplicatePair{ 29, 37 }, DuplicatePair{ 30, 38 },
110 DuplicatePair{ 31, 39 }, DuplicatePair{ 32, 40 },
111 };
114
115 // Gate-selector blocks, parallel to `get_gate_selectors()`.
116 template <typename TraceBlocks> static auto get_gate_blocks(TraceBlocks& blocks)
117 {
118 using BlockBase = typename TraceBlocks::BlockBase;
120 &blocks.lookup,
121 &blocks.arithmetic,
122 &blocks.delta_range,
123 &blocks.elliptic,
124 &blocks.memory,
125 &blocks.nnf,
126 &blocks.poseidon2_external,
127 &blocks.poseidon2_internal,
128 });
129 }
130
131 template <typename TraceBlocks> static auto get_gate_blocks(TraceBlocks const& blocks)
132 {
133 using BlockBase = typename TraceBlocks::BlockBase;
135 &blocks.lookup,
136 &blocks.arithmetic,
137 &blocks.delta_range,
138 &blocks.elliptic,
139 &blocks.memory,
140 &blocks.nnf,
141 &blocks.poseidon2_external,
142 &blocks.poseidon2_internal,
143 });
144 }
145
146 // GateKind for each gate selector, parallel to `get_gate_blocks()`.
151
152 // Non-gate selectors in `get_non_gate_selectors()` order, as references into a single block.
153 template <typename TraceBlock> static auto get_block_non_gate_selectors(TraceBlock& block)
154 {
155 using SelT = std::remove_reference_t<decltype(block.q_m())>;
156 return RefArray<SelT, 6>{
157 block.q_m(), block.q_1(), block.q_2(), block.q_3(), block.q_4(), block.q_c(),
158 };
159 }
160
161 // AllEntities: flat `std::array` storage with EntityId-keyed access and named accessors.
162 template <typename DataType> class AllEntities {
163 public:
165 std::array<DataType, NUM_ALL_ENTITIES> data{};
166
167 DataType& operator[](EntityId id) { return data[static_cast<size_t>(id)]; }
168 const DataType& operator[](EntityId id) const { return data[static_cast<size_t>(id)]; }
169
172
173 // Named accessors (unshifted + shifted): mutable + const overloads.
174 DataType& sigma_1() { return data[static_cast<size_t>(EntityId::sigma_1)]; }
175 const DataType& sigma_1() const { return data[static_cast<size_t>(EntityId::sigma_1)]; }
176 DataType& sigma_2() { return data[static_cast<size_t>(EntityId::sigma_2)]; }
177 const DataType& sigma_2() const { return data[static_cast<size_t>(EntityId::sigma_2)]; }
178 DataType& sigma_3() { return data[static_cast<size_t>(EntityId::sigma_3)]; }
179 const DataType& sigma_3() const { return data[static_cast<size_t>(EntityId::sigma_3)]; }
180 DataType& sigma_4() { return data[static_cast<size_t>(EntityId::sigma_4)]; }
181 const DataType& sigma_4() const { return data[static_cast<size_t>(EntityId::sigma_4)]; }
182 DataType& id_1() { return data[static_cast<size_t>(EntityId::id_1)]; }
183 const DataType& id_1() const { return data[static_cast<size_t>(EntityId::id_1)]; }
184 DataType& id_2() { return data[static_cast<size_t>(EntityId::id_2)]; }
185 const DataType& id_2() const { return data[static_cast<size_t>(EntityId::id_2)]; }
186 DataType& id_3() { return data[static_cast<size_t>(EntityId::id_3)]; }
187 const DataType& id_3() const { return data[static_cast<size_t>(EntityId::id_3)]; }
188 DataType& id_4() { return data[static_cast<size_t>(EntityId::id_4)]; }
189 const DataType& id_4() const { return data[static_cast<size_t>(EntityId::id_4)]; }
190 DataType& lagrange_first() { return data[static_cast<size_t>(EntityId::lagrange_first)]; }
191 const DataType& lagrange_first() const { return data[static_cast<size_t>(EntityId::lagrange_first)]; }
192 DataType& lagrange_last() { return data[static_cast<size_t>(EntityId::lagrange_last)]; }
193 const DataType& lagrange_last() const { return data[static_cast<size_t>(EntityId::lagrange_last)]; }
194 DataType& q_lookup() { return data[static_cast<size_t>(EntityId::q_lookup)]; }
195 const DataType& q_lookup() const { return data[static_cast<size_t>(EntityId::q_lookup)]; }
196 DataType& table_1() { return data[static_cast<size_t>(EntityId::table_1)]; }
197 const DataType& table_1() const { return data[static_cast<size_t>(EntityId::table_1)]; }
198 DataType& table_2() { return data[static_cast<size_t>(EntityId::table_2)]; }
199 const DataType& table_2() const { return data[static_cast<size_t>(EntityId::table_2)]; }
200 DataType& table_3() { return data[static_cast<size_t>(EntityId::table_3)]; }
201 const DataType& table_3() const { return data[static_cast<size_t>(EntityId::table_3)]; }
202 DataType& table_4() { return data[static_cast<size_t>(EntityId::table_4)]; }
203 const DataType& table_4() const { return data[static_cast<size_t>(EntityId::table_4)]; }
204 DataType& q_m() { return data[static_cast<size_t>(EntityId::q_m)]; }
205 const DataType& q_m() const { return data[static_cast<size_t>(EntityId::q_m)]; }
206 DataType& q_r() { return data[static_cast<size_t>(EntityId::q_r)]; }
207 const DataType& q_r() const { return data[static_cast<size_t>(EntityId::q_r)]; }
208 DataType& q_o() { return data[static_cast<size_t>(EntityId::q_o)]; }
209 const DataType& q_o() const { return data[static_cast<size_t>(EntityId::q_o)]; }
210 DataType& q_c() { return data[static_cast<size_t>(EntityId::q_c)]; }
211 const DataType& q_c() const { return data[static_cast<size_t>(EntityId::q_c)]; }
212 DataType& q_l() { return data[static_cast<size_t>(EntityId::q_l)]; }
213 const DataType& q_l() const { return data[static_cast<size_t>(EntityId::q_l)]; }
214 DataType& q_4() { return data[static_cast<size_t>(EntityId::q_4)]; }
215 const DataType& q_4() const { return data[static_cast<size_t>(EntityId::q_4)]; }
216 DataType& q_arith() { return data[static_cast<size_t>(EntityId::q_arith)]; }
217 const DataType& q_arith() const { return data[static_cast<size_t>(EntityId::q_arith)]; }
218 DataType& q_delta_range() { return data[static_cast<size_t>(EntityId::q_delta_range)]; }
219 const DataType& q_delta_range() const { return data[static_cast<size_t>(EntityId::q_delta_range)]; }
220 DataType& q_elliptic() { return data[static_cast<size_t>(EntityId::q_elliptic)]; }
221 const DataType& q_elliptic() const { return data[static_cast<size_t>(EntityId::q_elliptic)]; }
222 DataType& q_memory() { return data[static_cast<size_t>(EntityId::q_memory)]; }
223 const DataType& q_memory() const { return data[static_cast<size_t>(EntityId::q_memory)]; }
224 DataType& q_nnf() { return data[static_cast<size_t>(EntityId::q_nnf)]; }
225 const DataType& q_nnf() const { return data[static_cast<size_t>(EntityId::q_nnf)]; }
226 DataType& q_poseidon2_external() { return data[static_cast<size_t>(EntityId::q_poseidon2_external)]; }
227 const DataType& q_poseidon2_external() const
228 {
229 return data[static_cast<size_t>(EntityId::q_poseidon2_external)];
230 }
231 DataType& q_poseidon2_internal() { return data[static_cast<size_t>(EntityId::q_poseidon2_internal)]; }
232 const DataType& q_poseidon2_internal() const
233 {
234 return data[static_cast<size_t>(EntityId::q_poseidon2_internal)];
235 }
236 DataType& w_l() { return data[static_cast<size_t>(EntityId::w_l)]; }
237 const DataType& w_l() const { return data[static_cast<size_t>(EntityId::w_l)]; }
238 DataType& w_r() { return data[static_cast<size_t>(EntityId::w_r)]; }
239 const DataType& w_r() const { return data[static_cast<size_t>(EntityId::w_r)]; }
240 DataType& w_o() { return data[static_cast<size_t>(EntityId::w_o)]; }
241 const DataType& w_o() const { return data[static_cast<size_t>(EntityId::w_o)]; }
242 DataType& w_4() { return data[static_cast<size_t>(EntityId::w_4)]; }
243 const DataType& w_4() const { return data[static_cast<size_t>(EntityId::w_4)]; }
244 DataType& z_perm() { return data[static_cast<size_t>(EntityId::z_perm)]; }
245 const DataType& z_perm() const { return data[static_cast<size_t>(EntityId::z_perm)]; }
246 DataType& lookup_inverses() { return data[static_cast<size_t>(EntityId::lookup_inverses)]; }
247 const DataType& lookup_inverses() const { return data[static_cast<size_t>(EntityId::lookup_inverses)]; }
248 DataType& lookup_read_counts() { return data[static_cast<size_t>(EntityId::lookup_read_counts)]; }
249 const DataType& lookup_read_counts() const { return data[static_cast<size_t>(EntityId::lookup_read_counts)]; }
250 DataType& lookup_read_tags() { return data[static_cast<size_t>(EntityId::lookup_read_tags)]; }
251 const DataType& lookup_read_tags() const { return data[static_cast<size_t>(EntityId::lookup_read_tags)]; }
252 DataType& w_l_shift() { return data[static_cast<size_t>(EntityId::w_l_shift)]; }
253 const DataType& w_l_shift() const { return data[static_cast<size_t>(EntityId::w_l_shift)]; }
254 DataType& w_r_shift() { return data[static_cast<size_t>(EntityId::w_r_shift)]; }
255 const DataType& w_r_shift() const { return data[static_cast<size_t>(EntityId::w_r_shift)]; }
256 DataType& w_o_shift() { return data[static_cast<size_t>(EntityId::w_o_shift)]; }
257 const DataType& w_o_shift() const { return data[static_cast<size_t>(EntityId::w_o_shift)]; }
258 DataType& w_4_shift() { return data[static_cast<size_t>(EntityId::w_4_shift)]; }
259 const DataType& w_4_shift() const { return data[static_cast<size_t>(EntityId::w_4_shift)]; }
260 DataType& z_perm_shift() { return data[static_cast<size_t>(EntityId::z_perm_shift)]; }
261 const DataType& z_perm_shift() const { return data[static_cast<size_t>(EntityId::z_perm_shift)]; }
262
263 // Kind/shift partitions: contiguous slices of `data`.
312
313 // Subset views (relation-declared groupings in layout order).
315 {
316 return { (*this)[EntityId::sigma_1],
317 (*this)[EntityId::sigma_2],
318 (*this)[EntityId::sigma_3],
319 (*this)[EntityId::sigma_4] };
320 }
322 {
323 return { (*this)[EntityId::sigma_1],
324 (*this)[EntityId::sigma_2],
325 (*this)[EntityId::sigma_3],
326 (*this)[EntityId::sigma_4] };
327 }
329 {
330 return {
331 (*this)[EntityId::id_1], (*this)[EntityId::id_2], (*this)[EntityId::id_3], (*this)[EntityId::id_4]
332 };
333 }
335 {
336 return {
337 (*this)[EntityId::id_1], (*this)[EntityId::id_2], (*this)[EntityId::id_3], (*this)[EntityId::id_4]
338 };
339 }
341 {
342 return { (*this)[EntityId::q_lookup],
343 (*this)[EntityId::q_arith],
344 (*this)[EntityId::q_delta_range],
345 (*this)[EntityId::q_elliptic],
346 (*this)[EntityId::q_memory],
347 (*this)[EntityId::q_nnf],
348 (*this)[EntityId::q_poseidon2_external],
349 (*this)[EntityId::q_poseidon2_internal] };
350 }
352 {
353 return { (*this)[EntityId::q_lookup],
354 (*this)[EntityId::q_arith],
355 (*this)[EntityId::q_delta_range],
356 (*this)[EntityId::q_elliptic],
357 (*this)[EntityId::q_memory],
358 (*this)[EntityId::q_nnf],
359 (*this)[EntityId::q_poseidon2_external],
360 (*this)[EntityId::q_poseidon2_internal] };
361 }
363 {
364 return { (*this)[EntityId::table_1],
365 (*this)[EntityId::table_2],
366 (*this)[EntityId::table_3],
367 (*this)[EntityId::table_4] };
368 }
370 {
371 return { (*this)[EntityId::table_1],
372 (*this)[EntityId::table_2],
373 (*this)[EntityId::table_3],
374 (*this)[EntityId::table_4] };
375 }
377 {
378 return { (*this)[EntityId::w_l], (*this)[EntityId::w_r], (*this)[EntityId::w_o], (*this)[EntityId::w_4] };
379 }
381 {
382 return { (*this)[EntityId::w_l], (*this)[EntityId::w_r], (*this)[EntityId::w_o], (*this)[EntityId::w_4] };
383 }
385 {
386 return { (*this)[EntityId::q_m], (*this)[EntityId::q_l], (*this)[EntityId::q_r],
387 (*this)[EntityId::q_o], (*this)[EntityId::q_4], (*this)[EntityId::q_c] };
388 }
390 {
391 return { (*this)[EntityId::q_m], (*this)[EntityId::q_l], (*this)[EntityId::q_r],
392 (*this)[EntityId::q_o], (*this)[EntityId::q_4], (*this)[EntityId::q_c] };
393 }
394
395 // Composite views: concatenations of subset views.
398
399 // Labels — uppercase, layout order.
400 static const std::vector<std::string>& get_labels()
401 {
402 static const std::vector<std::string> labels = {
403 "SIGMA_1",
404 "SIGMA_2",
405 "SIGMA_3",
406 "SIGMA_4",
407 "ID_1",
408 "ID_2",
409 "ID_3",
410 "ID_4",
411 "LAGRANGE_FIRST",
412 "LAGRANGE_LAST",
413 "Q_LOOKUP",
414 "TABLE_1",
415 "TABLE_2",
416 "TABLE_3",
417 "TABLE_4",
418 "Q_M",
419 "Q_R",
420 "Q_O",
421 "Q_C",
422 "Q_L",
423 "Q_4",
424 "Q_ARITH",
425 "Q_DELTA_RANGE",
426 "Q_ELLIPTIC",
427 "Q_MEMORY",
428 "Q_NNF",
429 "Q_POSEIDON2_EXTERNAL",
430 "Q_POSEIDON2_INTERNAL",
431 "W_L",
432 "W_R",
433 "W_O",
434 "W_4",
435 "Z_PERM",
436 "LOOKUP_INVERSES",
437 "LOOKUP_READ_COUNTS",
438 "LOOKUP_READ_TAGS",
439 "W_L_SHIFT",
440 "W_R_SHIFT",
441 "W_O_SHIFT",
442 "W_4_SHIFT",
443 "Z_PERM_SHIFT",
444 };
445 return labels;
446 }
447 };
448
449 // Verification-key transport class. Owns its own storage; not a slice of AllEntities.
450 template <typename DataType_> class PrecomputedEntities {
451 public:
452 using DataType = DataType_;
453 std::array<DataType, NUM_PRECOMPUTED_ENTITIES> data{};
454
455 bool operator==(const PrecomputedEntities&) const = default;
456
459
460 static constexpr size_t size() { return NUM_PRECOMPUTED_ENTITIES; }
461
462 // Named accessor methods — index into local `data` (NOT the AllEntities layout).
463 DataType& sigma_1() { return data[0]; }
464 const DataType& sigma_1() const { return data[0]; }
465 DataType& sigma_2() { return data[1]; }
466 const DataType& sigma_2() const { return data[1]; }
467 DataType& sigma_3() { return data[2]; }
468 const DataType& sigma_3() const { return data[2]; }
469 DataType& sigma_4() { return data[3]; }
470 const DataType& sigma_4() const { return data[3]; }
471 DataType& id_1() { return data[4]; }
472 const DataType& id_1() const { return data[4]; }
473 DataType& id_2() { return data[5]; }
474 const DataType& id_2() const { return data[5]; }
475 DataType& id_3() { return data[6]; }
476 const DataType& id_3() const { return data[6]; }
477 DataType& id_4() { return data[7]; }
478 const DataType& id_4() const { return data[7]; }
479 DataType& lagrange_first() { return data[8]; }
480 const DataType& lagrange_first() const { return data[8]; }
481 DataType& lagrange_last() { return data[9]; }
482 const DataType& lagrange_last() const { return data[9]; }
483 DataType& q_lookup() { return data[10]; }
484 const DataType& q_lookup() const { return data[10]; }
485 DataType& table_1() { return data[11]; }
486 const DataType& table_1() const { return data[11]; }
487 DataType& table_2() { return data[12]; }
488 const DataType& table_2() const { return data[12]; }
489 DataType& table_3() { return data[13]; }
490 const DataType& table_3() const { return data[13]; }
491 DataType& table_4() { return data[14]; }
492 const DataType& table_4() const { return data[14]; }
493 DataType& q_m() { return data[15]; }
494 const DataType& q_m() const { return data[15]; }
495 DataType& q_r() { return data[16]; }
496 const DataType& q_r() const { return data[16]; }
497 DataType& q_o() { return data[17]; }
498 const DataType& q_o() const { return data[17]; }
499 DataType& q_c() { return data[18]; }
500 const DataType& q_c() const { return data[18]; }
501 DataType& q_l() { return data[19]; }
502 const DataType& q_l() const { return data[19]; }
503 DataType& q_4() { return data[20]; }
504 const DataType& q_4() const { return data[20]; }
505 DataType& q_arith() { return data[21]; }
506 const DataType& q_arith() const { return data[21]; }
507 DataType& q_delta_range() { return data[22]; }
508 const DataType& q_delta_range() const { return data[22]; }
509 DataType& q_elliptic() { return data[23]; }
510 const DataType& q_elliptic() const { return data[23]; }
511 DataType& q_memory() { return data[24]; }
512 const DataType& q_memory() const { return data[24]; }
513 DataType& q_nnf() { return data[25]; }
514 const DataType& q_nnf() const { return data[25]; }
516 const DataType& q_poseidon2_external() const { return data[26]; }
518 const DataType& q_poseidon2_internal() const { return data[27]; }
519
520 // Subset views.
522 {
523 return { this->sigma_1(), this->sigma_2(), this->sigma_3(), this->sigma_4() };
524 }
526 {
527 return { this->sigma_1(), this->sigma_2(), this->sigma_3(), this->sigma_4() };
528 }
529 RefArray<DataType, 4> get_ids() { return { this->id_1(), this->id_2(), this->id_3(), this->id_4() }; }
531 {
532 return { this->id_1(), this->id_2(), this->id_3(), this->id_4() };
533 }
535 {
536 return { this->q_lookup(), this->q_arith(), this->q_delta_range(), this->q_elliptic(),
537 this->q_memory(), this->q_nnf(), this->q_poseidon2_external(), this->q_poseidon2_internal() };
538 }
540 {
541 return { this->q_lookup(), this->q_arith(), this->q_delta_range(), this->q_elliptic(),
542 this->q_memory(), this->q_nnf(), this->q_poseidon2_external(), this->q_poseidon2_internal() };
543 }
545 {
546 return { this->table_1(), this->table_2(), this->table_3(), this->table_4() };
547 }
549 {
550 return { this->table_1(), this->table_2(), this->table_3(), this->table_4() };
551 }
553 {
554 return { this->q_m(), this->q_l(), this->q_r(), this->q_o(), this->q_4(), this->q_c() };
555 }
557 {
558 return { this->q_m(), this->q_l(), this->q_r(), this->q_o(), this->q_4(), this->q_c() };
559 }
560
561 // Composite views.
564
565 static const std::vector<std::string>& get_labels()
566 {
567 static const std::vector<std::string> labels = {
568 "SIGMA_1",
569 "SIGMA_2",
570 "SIGMA_3",
571 "SIGMA_4",
572 "ID_1",
573 "ID_2",
574 "ID_3",
575 "ID_4",
576 "LAGRANGE_FIRST",
577 "LAGRANGE_LAST",
578 "Q_LOOKUP",
579 "TABLE_1",
580 "TABLE_2",
581 "TABLE_3",
582 "TABLE_4",
583 "Q_M",
584 "Q_R",
585 "Q_O",
586 "Q_C",
587 "Q_L",
588 "Q_4",
589 "Q_ARITH",
590 "Q_DELTA_RANGE",
591 "Q_ELLIPTIC",
592 "Q_MEMORY",
593 "Q_NNF",
594 "Q_POSEIDON2_EXTERNAL",
595 "Q_POSEIDON2_INTERNAL",
596 };
597 return labels;
598 }
599 };
600
601 // Prover-commitment transport class (witness only). Owns its own storage.
602 template <typename DataType_> class WitnessEntities {
603 public:
604 using DataType = DataType_;
605 std::array<DataType, NUM_WITNESS_ENTITIES> data{};
606
607 bool operator==(const WitnessEntities&) const = default;
608
611
612 static constexpr size_t size() { return NUM_WITNESS_ENTITIES; }
613
614 // Named accessor methods — index into local `data` (NOT the AllEntities layout).
615 DataType& w_l() { return data[0]; }
616 const DataType& w_l() const { return data[0]; }
617 DataType& w_r() { return data[1]; }
618 const DataType& w_r() const { return data[1]; }
619 DataType& w_o() { return data[2]; }
620 const DataType& w_o() const { return data[2]; }
621 DataType& w_4() { return data[3]; }
622 const DataType& w_4() const { return data[3]; }
623 DataType& z_perm() { return data[4]; }
624 const DataType& z_perm() const { return data[4]; }
625 DataType& lookup_inverses() { return data[5]; }
626 const DataType& lookup_inverses() const { return data[5]; }
628 const DataType& lookup_read_counts() const { return data[6]; }
630 const DataType& lookup_read_tags() const { return data[7]; }
631
632 // Subset views.
633 RefArray<DataType, 4> get_wires() { return { this->w_l(), this->w_r(), this->w_o(), this->w_4() }; }
634 RefArray<const DataType, 4> get_wires() const { return { this->w_l(), this->w_r(), this->w_o(), this->w_4() }; }
635
637 {
638 return { this->w_l(), this->w_r(), this->w_o(), this->w_4(), this->z_perm() };
639 }
641 {
642 return { this->w_l(), this->w_r(), this->w_o(), this->w_4(), this->z_perm() };
643 }
644
645 static const std::vector<std::string>& get_labels()
646 {
647 static const std::vector<std::string> labels = {
648 "W_L", "W_R", "W_O", "W_4", "Z_PERM", "LOOKUP_INVERSES", "LOOKUP_READ_COUNTS", "LOOKUP_READ_TAGS",
649 };
650 return labels;
651 }
652 };
653};
654
655} // namespace bb
A template class for a reference array. Behaves as if std::array<T&, N> was possible.
Definition ref_array.hpp:23
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
std::span< DataType, NUM_PRECOMPUTED_ENTITIES > get_precomputed()
std::span< DataType, NUM_ALL_ENTITIES > get_all()
RefArray< const DataType, 6 > get_non_gate_selectors() const
const DataType & operator[](EntityId id) const
static const std::vector< std::string > & get_labels()
std::array< DataType, NUM_ALL_ENTITIES > data
std::span< DataType, NUM_WITNESS_ENTITIES > get_witness()
std::span< DataType, NUM_UNSHIFTED_ENTITIES > get_unshifted()
RefArray< const DataType, 4 > get_ids() const
std::span< DataType, NUM_SHIFTED_ENTITIES > get_shifted()
std::span< const DataType, NUM_UNSHIFTED_ENTITIES > get_unshifted() const
RefArray< const DataType, 8 > get_gate_selectors() const
std::span< DataType, NUM_SHIFTED_ENTITIES > get_to_be_shifted()
std::span< const DataType, NUM_SHIFTED_ENTITIES > get_shifted() const
RefArray< const DataType, 4 > get_wires() const
RefArray< const DataType, 4 > get_tables() const
RefArray< const DataType, 4 > get_sigmas() const
std::span< const DataType, NUM_SHIFTED_ENTITIES > get_to_be_shifted() const
std::span< const DataType, NUM_PRECOMPUTED_ENTITIES > get_precomputed() const
std::span< const DataType, NUM_WITNESS_ENTITIES > get_witness() const
std::span< const DataType, NUM_ALL_ENTITIES > get_all() const
RefArray< const DataType, 8 > get_gate_selectors() const
RefArray< const DataType, 4 > get_sigmas() const
std::span< const DataType, NUM_PRECOMPUTED_ENTITIES > get_all() const
std::array< DataType, NUM_PRECOMPUTED_ENTITIES > data
RefArray< const DataType, 4 > get_tables() const
static const std::vector< std::string > & get_labels()
std::span< DataType, NUM_PRECOMPUTED_ENTITIES > get_all()
RefArray< const DataType, 6 > get_non_gate_selectors() const
bool operator==(const PrecomputedEntities &) const =default
static const std::vector< std::string > & get_labels()
RefArray< const DataType, 5 > get_to_be_shifted() const
bool operator==(const WitnessEntities &) const =default
std::array< DataType, NUM_WITNESS_ENTITIES > data
std::span< DataType, NUM_WITNESS_ENTITIES > get_all()
std::span< const DataType, NUM_WITNESS_ENTITIES > get_all() const
RefArray< const DataType, 4 > get_wires() const
static constexpr size_t NUM_SHIFTED_ENTITIES
static auto get_gate_blocks(TraceBlocks &blocks)
static constexpr size_t NUM_MASKING_ENTITIES
static constexpr size_t NUM_PRECOMPUTED_ENTITIES
std::tuple< bb::UltraPermutationRelation< FF >, bb::LogDerivLookupRelation< FF >, bb::ArithmeticRelation< FF >, bb::DeltaRangeConstraintRelation< FF >, bb::EllipticRelation< FF >, bb::MemoryRelation< FF >, bb::NonNativeFieldRelation< FF >, bb::Poseidon2ExternalRelation< FF >, bb::Poseidon2InternalRelation< FF > > Relations_
static constexpr RepeatedCommitmentsData REPEATED_COMMITMENTS
static constexpr bool HasLogDerivLookup
static constexpr std::array< GateKind, 8 > GATE_KINDS
static constexpr size_t NUM_UNSHIFTED_ENTITIES
static constexpr bool HasNonNativeField
static constexpr size_t NUM_COMMITTED_WITNESS_ENTITIES
static constexpr size_t NUM_ALL_ENTITIES
static constexpr std::array< DuplicatePair, NUM_SHIFTED_ENTITIES > REPEATED_COMMITMENT_PAIRS
static constexpr size_t NUM_WITNESS_ENTITIES
static auto get_block_non_gate_selectors(TraceBlock &block)
static constexpr size_t NUM_BUS_COLUMNS
static auto get_gate_blocks(TraceBlocks const &blocks)
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
constexpr RepeatedCommitmentsData repeated_commitments_from_pairs(std::span< const DuplicatePair > pairs)
Collapse a span of (original, duplicate) pairs into a RepeatedCommitmentsData of up to two contiguous...
RefArray< T,(Ns+...)> constexpr concatenate(const RefArray< T, Ns > &... ref_arrays)
Concatenates multiple RefArray objects into a single RefArray.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
One commitment shared by an unshifted polynomial and its shifted copy.