Skip to content

Commit

Permalink
Fix segment constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmilson committed Apr 16, 2023
1 parent a9bef52 commit 8c6e22b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions prover/src/matrix/segments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,8 @@ impl<B: StarkField, const N: usize> Segment<B, N> {
assert_eq!(poly_size, twiddles.len() * 2);
assert!(poly_offset < polys.num_base_cols());

// determine the number of polynomials to add to this segment; this number can be either N,
// or smaller than N when there are fewer than N polynomials remaining to be processed
let num_polys_remaining = polys.num_base_cols() - poly_offset;

// allocate memory for the segment
let data = if num_polys_remaining >= N {
let data = if polys.num_base_cols() - poly_offset >= N {
// if we will fill the entire segment, we allocate uninitialized memory
unsafe { uninit_vector::<[B; N]>(domain_size) }
} else {
Expand Down

0 comments on commit 8c6e22b

Please sign in to comment.