Skip to content

Commit

Permalink
Fix CTL grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasgoergens committed Apr 25, 2024
1 parent d48ce9c commit 43057d1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions starky/src/cross_table_lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,14 +396,14 @@ fn ctl_helper_zs_cols<F: Field, const N: usize>(
challenge: GrandProductChallenge<F>,
constraint_degree: usize,
) -> Vec<(usize, Vec<PolynomialValues<F>>)> {
let grouped_lookups = looking_tables.iter().group_by(|a| a.table);

grouped_lookups
looking_tables
.iter()
.map(|a| (a.table, (&a.columns[..], &a.filter)))
.into_group_map()
.into_iter()
.map(|(table, group)| {
let columns_filters = group
.map(|table| (&table.columns[..], &table.filter))
.collect::<Vec<(&[Column<F>], &Filter<F>)>>();
// We sort for determinism:
.sorted_by_key(|(table, _)| *table)
.map(|(table, columns_filters)| {
(
table,
partial_sums(
Expand Down

0 comments on commit 43057d1

Please sign in to comment.