From 295d6d946da98c401ebdc12019eb3ecf89b0d2bc Mon Sep 17 00:00:00 2001 From: Ohad Agadi Date: Mon, 23 Dec 2024 13:15:15 +0200 Subject: [PATCH] trace to evals --- crates/air_utils/src/trace/iterable_trace.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/air_utils/src/trace/iterable_trace.rs b/crates/air_utils/src/trace/iterable_trace.rs index 4e7394471..6c64d5be5 100644 --- a/crates/air_utils/src/trace/iterable_trace.rs +++ b/crates/air_utils/src/trace/iterable_trace.rs @@ -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. @@ -97,7 +98,14 @@ impl IterableTrace { } pub fn to_evals(self) -> [CircleEvaluation; 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::::new(domain, eval) + }) } pub fn pretty_print(&self, row_limit: usize) -> String {