Skip to content

Commit

Permalink
example lookup data
Browse files Browse the repository at this point in the history
derive lookup data impl

trace to evals

uninitialized trace
  • Loading branch information
ohad-starkware committed Dec 26, 2024
1 parent 5b514b2 commit 5a3e44f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/air_utils/src/trace/component_trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,14 @@ impl<const N: usize> ComponentTrace<N> {
/// # Safety
/// The caller must ensure that the column is populated before being used.
#[allow(clippy::uninit_vec)]
pub unsafe fn uninitialized(_log_size: u32) -> Self {
todo!()
pub unsafe fn uninitialized(log_size: u32) -> Self {
let data = [(); N].map(|_| {
let n_simd_elems = (1 << log_size) / N_LANES;
let mut vec = Vec::with_capacity(n_simd_elems);
vec.set_len(n_simd_elems);
vec
});
Self { data, log_size }
}

pub fn log_size(&self) -> u32 {
Expand Down

0 comments on commit 5a3e44f

Please sign in to comment.