Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookup_into_p_decomposition.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cassert>
4#include <cstdint>
5
8
9namespace bb::avm2::tracegen {
10
11template <typename LookupSettings> class LookupIntoPDecomposition : public IndexedLookupTraceBuilder<LookupSettings> {
12 protected:
14 {
15 const auto& [radix, limb_index, _] = tup;
16 size_t radix_index = static_cast<size_t>(uint64_t(radix));
17 uint32_t row = 0;
18 for (size_t i = 0; i < radix_index; ++i) {
19 row += static_cast<uint32_t>(get_p_limbs_per_radix()[i].size());
20 }
21
22 row += static_cast<uint32_t>(limb_index);
23
24 return row;
25 }
26};
27
28} // namespace bb::avm2::tracegen
uint32_t find_in_dst(const std::array< FF, LookupSettings::LOOKUP_TUPLE_SIZE > &tup) const override
const std::array< std::vector< uint8_t >, 257 > & get_p_limbs_per_radix()
Definition to_radix.cpp:33
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13