Skip to content

Commit

Permalink
rm redundant code from pow table
Browse files Browse the repository at this point in the history
  • Loading branch information
zemse committed Oct 4, 2024
1 parent 2e7dad9 commit eab23f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ceno_zkvm/src/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub enum ROMType {
Or, // a | b where a, b are bytes
Xor, // a ^ b where a, b are bytes
Ltu, // a <(usign) b where a, b are bytes and the result is 0/1.
Pow, // a ** b where a is a 5-bit number
Pow, // a ** b where a is 2 and b is 5-bit value
Instruction, // Decoded instruction from the fixed program.
}

Expand Down
7 changes: 2 additions & 5 deletions ceno_zkvm/src/tables/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,10 @@ pub struct PowTable;
impl OpsTable for PowTable {
const ROM_TYPE: ROMType = ROMType::Pow;
fn len() -> usize {
(1 << 5) + 1
1 << 5
}

fn content() -> Vec<[u64; 3]> {
(0..Self::len() as u64)
.map(|b| [2, b, 1 << b])
.chain(std::iter::once([0, 0, 0]))
.collect()
(0..Self::len() as u64).map(|b| [2, b, 1 << b]).collect()
}
}

0 comments on commit eab23f6

Please sign in to comment.