From 99af9480150617f655fe401208c4271a4f9c3737 Mon Sep 17 00:00:00 2001 From: Ohad Agadi Date: Mon, 23 Dec 2024 11:58:26 +0200 Subject: [PATCH] trace to evals --- crates/air_utils/src/trace/component_trace.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/air_utils/src/trace/component_trace.rs b/crates/air_utils/src/trace/component_trace.rs index f14aace91..8023d420c 100644 --- a/crates/air_utils/src/trace/component_trace.rs +++ b/crates/air_utils/src/trace/component_trace.rs @@ -4,10 +4,11 @@ use bytemuck::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, LOG_N_LANES, 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. @@ -96,7 +97,14 @@ impl ComponentTrace { } 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 row_at(&self, row: usize) -> [M31; N] {