27 auto UINT32_XOR = plookup::MultiTableId::UINT32_XOR;
34 auto left_idx =
builder.add_variable(left);
35 auto right_idx =
builder.add_variable(right);
39 builder.create_gates_from_plookup_accumulators(UINT32_XOR, accumulators, left_idx, right_idx);
41 EXPECT_EQ(
builder.get_num_lookup_tables(), 2);
42 EXPECT_EQ(
builder.get_lookup_tables()[0].size(), 4096);
43 EXPECT_EQ(
builder.get_lookup_tables()[1].size(), 16);
45 size_t circuit_size = 8192;
50 builder.blocks.compute_offsets();
51 construct_lookup_read_counts<Flavor>(read_counts, read_tags,
builder);
59 const size_t table_offset =
builder.blocks.lookup.trace_offset();
60 for (
auto [idx, count,
tag] :
zip_polys(read_counts, read_tags)) {
61 if (idx == table_offset + 0) {
64 }
else if (idx == table_offset + 69) {
67 }
else if (idx == table_offset + 64 * 64) {
71 EXPECT_EQ(count, 0) <<
"Unexpected count at index " << idx;
72 EXPECT_EQ(
tag, 0) <<
"Unexpected tag at index " << idx;
ReadData< bb::fr > get_lookup_accumulators(const MultiTableId id, const fr &key_a, const fr &key_b, const bool is_2_to_1_lookup)
Given a table ID and the key(s) for a key-value lookup, return the lookup accumulators.