-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
187 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
barretenberg/cpp/src/barretenberg/vm2/generated/relations/lookup_dummy_dynamic.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
// AUTOGENERATED FILE | ||
#pragma once | ||
|
||
#include "../columns.hpp" | ||
#include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" | ||
|
||
#include <cstddef> | ||
#include <tuple> | ||
|
||
namespace bb::avm2 { | ||
|
||
class lookup_dummy_dynamic_lookup_settings { | ||
public: | ||
static constexpr size_t READ_TERMS = 1; | ||
static constexpr size_t WRITE_TERMS = 1; | ||
static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; | ||
static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; | ||
static constexpr size_t LOOKUP_TUPLE_SIZE = 4; | ||
static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; | ||
static constexpr size_t READ_TERM_DEGREE = 0; | ||
static constexpr size_t WRITE_TERM_DEGREE = 0; | ||
|
||
// Columns using the Column enum. | ||
static constexpr Column SRC_SELECTOR = Column::execution_sel; | ||
static constexpr Column DST_SELECTOR = Column::execution_sel; | ||
static constexpr Column COUNTS = Column::lookup_dummy_dynamic_counts; | ||
static constexpr Column INVERSES = Column::lookup_dummy_dynamic_inv; | ||
static constexpr std::array<Column, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { | ||
Column::execution_op1, Column::execution_op2, Column::execution_op3, Column::execution_op4 | ||
}; | ||
static constexpr std::array<Column, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { | ||
Column::execution_op1, Column::execution_op2, Column::execution_op3, Column::execution_op4 | ||
}; | ||
|
||
template <typename AllEntities> static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) | ||
{ | ||
return (in.execution_sel == 1 || in.execution_sel == 1); | ||
} | ||
|
||
template <typename Accumulator, typename AllEntities> | ||
static inline auto compute_inverse_exists(const AllEntities& in) | ||
{ | ||
using View = typename Accumulator::View; | ||
const auto is_operation = View(in.execution_sel); | ||
const auto is_table_entry = View(in.execution_sel); | ||
return (is_operation + is_table_entry - is_operation * is_table_entry); | ||
} | ||
|
||
template <typename AllEntities> static inline auto get_const_entities(const AllEntities& in) | ||
{ | ||
return get_entities(in); | ||
} | ||
|
||
template <typename AllEntities> static inline auto get_nonconst_entities(AllEntities& in) | ||
{ | ||
return get_entities(in); | ||
} | ||
|
||
template <typename AllEntities> static inline auto get_entities(AllEntities&& in) | ||
{ | ||
return std::forward_as_tuple(in.lookup_dummy_dynamic_inv, | ||
in.lookup_dummy_dynamic_counts, | ||
in.execution_sel, | ||
in.execution_sel, | ||
in.execution_op1, | ||
in.execution_op2, | ||
in.execution_op3, | ||
in.execution_op4, | ||
in.execution_op1, | ||
in.execution_op2, | ||
in.execution_op3, | ||
in.execution_op4); | ||
} | ||
}; | ||
|
||
template <typename FF_> | ||
class lookup_dummy_dynamic_relation : public GenericLookupRelation<lookup_dummy_dynamic_lookup_settings, FF_> { | ||
public: | ||
static constexpr const char* NAME = "LOOKUP_DUMMY_DYNAMIC"; | ||
}; | ||
template <typename FF_> using lookup_dummy_dynamic = GenericLookup<lookup_dummy_dynamic_lookup_settings, FF_>; | ||
|
||
} // namespace bb::avm2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters