Skip to content

Commit

Permalink
stash
Browse files Browse the repository at this point in the history
  • Loading branch information
SuccinctPaul committed Oct 24, 2023
1 parent aff88e4 commit 744298f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions starky/src/fft_p.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use crate::constant::{get_max_workers, MAX_OPS_PER_THREAD, MIN_OPS_PER_THREAD, S
use crate::fft_worker::{fft_block, interpolate_prepare_block};
use crate::helper::log2_any;
use crate::traits::FieldExtension;
use crate::utils::parallells::parallelize;
use core::cmp::min;
use lazy_static::lazy_static;
use rayon::prelude::*;
Expand Down Expand Up @@ -95,11 +96,13 @@ pub fn bit_reverse<F: FieldExtension>(
let n = 1 << nbits;
let ris = BRs(0, n, nbits); // move it outside the loop. obtain it from cache.

// todo remove the double loop, and parallel
for i in 0..n {
for k in 0..n_pols {
buffdst[i * n_pols + k] = buffsrc[ris[i] * n_pols + k];
}
// todo parallel. Does the buffdst
let len = n * n_pols;
assert_eq!(len, buffdst.len()); // is ok?
for j in 0..len {
let i = j / n_pols;
let k = j % n_pols;
buffdst[j] = buffsrc[ris[i] * n_pols + k];
}
}

Expand Down

0 comments on commit 744298f

Please sign in to comment.