mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-09 09:13:09 +00:00
PR feedback
This commit is contained in:
parent
6a13ecf164
commit
0d8461d66d
@ -144,14 +144,12 @@ mod tests {
|
||||
.map(keccak::registers::reg_input_limb)
|
||||
.collect::<Vec<_>>();
|
||||
keccak_keccak_input_output.extend(Column::singles(
|
||||
(0..2 * NUM_INPUTS)
|
||||
.map(keccak::registers::reg_output_limb)
|
||||
.collect(),
|
||||
(0..2 * NUM_INPUTS).map(keccak::registers::reg_output_limb),
|
||||
));
|
||||
let cross_table_lookups = vec![CrossTableLookup::new(
|
||||
vec![TableWithColumns::new(
|
||||
Table::Cpu,
|
||||
Column::singles(cpu_keccak_input_output),
|
||||
Column::singles(cpu_keccak_input_output).collect(),
|
||||
Some(Column::single(cpu::columns::IS_KECCAK)),
|
||||
)],
|
||||
TableWithColumns::new(
|
||||
|
||||
@ -38,8 +38,8 @@ impl<F: Field> Column<F> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn singles(cs: Vec<usize>) -> Vec<Self> {
|
||||
cs.into_iter().map(Self::single).collect()
|
||||
pub fn singles<I: IntoIterator<Item = usize>>(cs: I) -> impl Iterator<Item = Self> {
|
||||
cs.into_iter().map(Self::single)
|
||||
}
|
||||
|
||||
pub fn linear_combination_with_constant<I: IntoIterator<Item = (usize, F)>>(
|
||||
@ -67,8 +67,8 @@ impl<F: Field> Column<F> {
|
||||
Self::linear_combination(cs.into_iter().zip(F::TWO.powers()))
|
||||
}
|
||||
|
||||
pub fn sum(cs: &[usize]) -> Self {
|
||||
Self::linear_combination(cs.iter().copied().zip(repeat(F::ONE)))
|
||||
pub fn sum<I: IntoIterator<Item = usize>>(cs: I) -> Self {
|
||||
Self::linear_combination(cs.into_iter().zip(repeat(F::ONE)))
|
||||
}
|
||||
|
||||
pub fn eval<FE, P, const D: usize>(&self, v: &[P]) -> P
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user