Skip to content

Commit

Permalink
trace to evals
Browse files Browse the repository at this point in the history
  • Loading branch information
ohad-starkware committed Dec 23, 2024
1 parent e681b1c commit 7c8cce7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions crates/air_utils/src/trace/iterable_trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ use bytemuck::{cast_slice, Zeroable};
use itertools::Itertools;
use rayon::iter::plumbing::{bridge, Consumer, Producer, ProducerCallback, UnindexedConsumer};
use rayon::prelude::*;
use stwo_prover::core::backend::simd::column::BaseColumn;
use stwo_prover::core::backend::simd::m31::{PackedM31, N_LANES};
use stwo_prover::core::backend::simd::SimdBackend;
use stwo_prover::core::fields::m31::M31;
use stwo_prover::core::poly::circle::CircleEvaluation;
use stwo_prover::core::poly::circle::{CanonicCoset, CircleEvaluation};
use stwo_prover::core::poly::BitReversedOrder;

/// A 2D Matrix of [`PackedM31`] values.
Expand Down Expand Up @@ -97,7 +98,14 @@ impl<const N: usize> IterableTrace<N> {
}

pub fn to_evals(self) -> [CircleEvaluation<SimdBackend, M31, BitReversedOrder>; N] {
todo!()
let domain = CanonicCoset::new(self.log_size).circle_domain();
self.data.map(|column| {
let eval = BaseColumn {
data: column,
length: 1 << self.log_size,
};
CircleEvaluation::<SimdBackend, M31, BitReversedOrder>::new(domain, eval)
})
}

pub fn pretty_print(&self, row_limit: usize) -> String {
Expand Down

0 comments on commit 7c8cce7

Please sign in to comment.