Skip to content

Commit

Permalink
chore: use constant “lookup table height” more
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Apr 16, 2024
1 parent 67fa295 commit 22834b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions triton-vm/src/aet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub struct AlgebraicExecutionTrace {
pub cascade_table_lookup_multiplicities: HashMap<u16, u64>,

/// Records how often each entry in the lookup table was looked up.
pub lookup_table_lookup_multiplicities: [u64; 1 << 8],
pub lookup_table_lookup_multiplicities: [u64; AlgebraicExecutionTrace::LOOKUP_TABLE_HEIGHT],
}

#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Arbitrary)]
Expand All @@ -84,7 +84,7 @@ pub struct TableHeight {
}

impl AlgebraicExecutionTrace {
const LOOKUP_TABLE_HEIGHT: usize = 1 << 8;
pub(crate) const LOOKUP_TABLE_HEIGHT: usize = 1 << 8;

pub fn new(program: Program) -> Self {
let program_len = program.len_bwords();
Expand Down
2 changes: 1 addition & 1 deletion triton-vm/src/table/master_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ impl MasterBaseTable {
jump_stack_table_len,
self.hash_coprocessor_execution_len,
self.cascade_table_len,
1 << 8,
AlgebraicExecutionTrace::LOOKUP_TABLE_HEIGHT,
self.u32_coprocesor_execution_len,
]
}
Expand Down

0 comments on commit 22834b0

Please sign in to comment.