Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::plookup::ReadData< DataType > Class Template Reference

Container type for lookup table reads. More...

#include <types.hpp>

Public Member Functions

 ReadData ()=default
 
std::vector< DataType > & operator[] (ColumnIdx idx)
 
const std::vector< DataType > & operator[] (ColumnIdx idx) const
 

Public Attributes

std::vector< BasicTable::LookupEntrylookup_entries
 

Private Attributes

std::array< std::vector< DataType >, 3 > columns
 

Detailed Description

template<class DataType>
class bb::plookup::ReadData< DataType >

Container type for lookup table reads.

Template Parameters
DataTypea native or stdlib field type, or the witness index type uint32_t

We us this approach to indexing, using enums, rather than to make member variables column_i, to minimize code changes; both non-const and const versions are in use.

The inner index, i.e., the index of each vector v in the array columns, could also be treated as an enum, but that might be messier. Note that v[0] represents a full accumulated sum, v[1] represents one step before that, and so on. See the documentation of the native version of get_lookup_accumulators.

Definition at line 418 of file types.hpp.

Constructor & Destructor Documentation

◆ ReadData()

template<class DataType >
bb::plookup::ReadData< DataType >::ReadData ( )
default

Member Function Documentation

◆ operator[]() [1/2]

template<class DataType >
std::vector< DataType > & bb::plookup::ReadData< DataType >::operator[] ( ColumnIdx  idx)
inline

Definition at line 421 of file types.hpp.

◆ operator[]() [2/2]

template<class DataType >
const std::vector< DataType > & bb::plookup::ReadData< DataType >::operator[] ( ColumnIdx  idx) const
inline

Definition at line 422 of file types.hpp.

Member Data Documentation

◆ columns

template<class DataType >
std::array<std::vector<DataType>, 3> bb::plookup::ReadData< DataType >::columns
private

Definition at line 428 of file types.hpp.

◆ lookup_entries

template<class DataType >
std::vector<BasicTable::LookupEntry> bb::plookup::ReadData< DataType >::lookup_entries

Definition at line 424 of file types.hpp.


The documentation for this class was generated from the following file: