|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <rom_table.hpp>
Public Member Functions | |
| rom_table () | |
| rom_table (const std::vector< field_pt > &table_entries) | |
| Construct a new ROM table (read only array) | |
| rom_table (Builder *builder, const std::vector< field_pt > &table_entries) | |
| Construct a new ROM table (read only array) | |
| rom_table (const rom_table &other) | |
| rom_table (rom_table &&other) | |
| void | initialize_table () const |
| Initialize the table once we perform a read. | |
| rom_table & | operator= (const rom_table &other) |
| rom_table & | operator= (rom_table &&other) |
| field_pt | operator[] (const size_t index) const |
| field_pt | operator[] (const field_pt &index) const |
| size_t | size () const |
| Builder * | get_context () const |
Private Types | |
| using | field_pt = field_t< Builder > |
Private Attributes | |
| std::vector< field_pt > | raw_entries |
| std::vector< field_pt > | entries |
| std::vector< OriginTag > | _tags |
| size_t | length = 0 |
| size_t | rom_id = 0 |
| bool | initialized = false |
| Builder * | context = nullptr |
Definition at line 16 of file rom_table.hpp.
|
private |
Definition at line 18 of file rom_table.hpp.
|
inline |
Definition at line 21 of file rom_table.hpp.
| bb::stdlib::rom_table< Builder >::rom_table | ( | const std::vector< field_pt > & | table_entries | ) |
Construct a new ROM table (read only array)
This constructor is used internally in barretenberg to construct tables without the need to specify the builder. It is especially useful when methods create new rom tables operating on in-circuit values which a priori we don't know whether they are constant or witnesses.
Definition at line 48 of file rom_table.cpp.
| bb::stdlib::rom_table< Builder >::rom_table | ( | Builder * | builder, |
| const std::vector< field_pt > & | table_entries | ||
| ) |
Construct a new ROM table (read only array)
This constructor is used in DSL, where we need to initialize a table with a builder to prevent the case in which a read operation happens before the context has been set.
Definition at line 24 of file rom_table.cpp.
|
default |
|
default |
|
inline |
Definition at line 40 of file rom_table.hpp.
| void bb::stdlib::rom_table< Builder >::initialize_table | ( | ) | const |
Initialize the table once we perform a read.
| Builder |
raw_entries. In particular, we simply don't use the ROM table mechanism under the hood. Definition at line 80 of file rom_table.cpp.
|
default |
|
default |
| field_t< Builder > bb::stdlib::rom_table< Builder >::operator[] | ( | const field_pt & | index | ) | const |
Definition at line 128 of file rom_table.cpp.
| field_t< Builder > bb::stdlib::rom_table< Builder >::operator[] | ( | const size_t | index | ) | const |
Definition at line 118 of file rom_table.cpp.
|
inline |
Definition at line 38 of file rom_table.hpp.
|
mutableprivate |
Definition at line 47 of file rom_table.hpp.
|
mutableprivate |
Definition at line 51 of file rom_table.hpp.
|
mutableprivate |
Definition at line 44 of file rom_table.hpp.
|
mutableprivate |
Definition at line 50 of file rom_table.hpp.
|
private |
Definition at line 48 of file rom_table.hpp.
|
private |
Definition at line 43 of file rom_table.hpp.
|
mutableprivate |
Definition at line 49 of file rom_table.hpp.