Skip to content

Commit

Permalink
Add from_simd_vec() to BaseColumn
Browse files Browse the repository at this point in the history
  • Loading branch information
Gali-StarkWare committed Dec 24, 2024
1 parent f24cde6 commit 5c53025
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/prover/src/core/backend/simd/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ impl BaseColumn {
values.into_iter().collect()
}

pub fn from_simd(values: Vec<PackedBaseField>) -> Self {
Self {
length: values.len() * N_LANES,
data: values,
}
}

/// Returns a vector of `BaseColumnMutSlice`s, each mutably owning
/// `chunk_size` `PackedBaseField`s (i.e, `chuck_size` * `N_LANES` elements).
pub fn chunks_mut(&mut self, chunk_size: usize) -> Vec<BaseColumnMutSlice<'_>> {
Expand Down

0 comments on commit 5c53025

Please sign in to comment.