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 25, 2024
1 parent 7262dec commit 4693009
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
15 changes: 10 additions & 5 deletions crates/air_utils/src/trace/component_trace.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
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;

use super::row_iterator::{ParRowIterMut, RowIterMut};
Expand Down Expand Up @@ -82,7 +80,14 @@ impl<const N: usize> ComponentTrace<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 row_at(&self, row: usize) -> [M31; N] {
Expand Down
2 changes: 1 addition & 1 deletion crates/air_utils/src/trace/examle_lookup_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ mod tests {
use stwo_prover::core::backend::simd::m31::{PackedM31, N_LANES};
use stwo_prover::core::fields::m31::M31;

use crate::trace::examle_lookup_data::LookupData;
use crate::trace::component_trace::ComponentTrace;
use crate::trace::examle_lookup_data::LookupData;

#[test]
fn test_lookup_data() {
Expand Down
2 changes: 1 addition & 1 deletion crates/air_utils/src/trace/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pub mod component_trace;
mod row_iterator;
pub mod examle_lookup_data;
mod row_iterator;

0 comments on commit 4693009

Please sign in to comment.