Skip to content

Commit

Permalink
Testing rig now uses all empty constant columns for lookup table pack…
Browse files Browse the repository at this point in the history
…ing.
  • Loading branch information
Iluvmagick committed Dec 8, 2023
1 parent 9da6da0 commit 0bd5368
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/test_plonk_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,13 @@ namespace nil {
}

if constexpr (nil::blueprint::use_lookups<component_type>()) {
// Components with lookups may use constant columns.
// But now all constants are placed in the first column.
// So we reserve the first column for non-lookup constants.
// Rather universal for testing
// We may start from zero if component doesn't use ordinary constants.
// Use all of the unused constant columns for lookups
std::vector<size_t> lookup_columns_indices;
for( std::size_t i = 1; i < ArithmetizationParams::constant_columns; i++ ) lookup_columns_indices.push_back(i);
for(std::size_t i = 0; i < ArithmetizationParams::constant_columns; i++) {
if(assignment.constants()[i].size() == 0) {
lookup_columns_indices.push_back(i);
}
}
desc.usable_rows_amount = zk::snark::pack_lookup_tables_horizontal(
bp.get_reserved_indices(),
bp.get_reserved_tables(),
Expand Down

0 comments on commit 0bd5368

Please sign in to comment.