Skip to content

Commit

Permalink
doc(fft): readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jborfila authored and sarah committed Mar 10, 2023
1 parent 03a8719 commit f95c843
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Concrete-FFT is a pure Rust high performance fast Fourier transform library
that processes vectors of sizes that are powers of two. It was made to be used
as a backend in Zama's `concrete` library.
as a backend in Zama's [TFHE-rs](https://docs.zama.ai/tfhe-rs) library.

This library provides two FFT modules:
- The ordered module FFT applies a forward/inverse FFT that takes its input in standard
Expand Down Expand Up @@ -66,15 +66,15 @@ for (actual, expected) in transformed_inv.iter().map(|z| z / N as f64).zip(data)
## Links

- [Zama](https://www.zama.ai/)
- [Concrete](https://github.com/zama-ai/concrete)
- [TFHE-rs Sources](https://github.com/zama-ai/tfhe-rs)

## License

This software is distributed under the BSD-3-Clause-Clear license with an
exemption that gives rights to use our patents for research, evaluation and
prototyping purposes, as well as for your personal projects.

If you want to use Concrete in a commercial product however, you will need to
If you want to use concrete-fft in a commercial product however, you will need to
purchase a separate commercial licence.

If you have any questions, please contact us at `[email protected].`
12 changes: 6 additions & 6 deletions benches/fft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ pub fn criterion_benchmark(c: &mut Criterion) {
let (mut dst, stack) = stack.rb_mut().make_aligned_with::<c64, _>(n, 64, |_| z);
let (mut src, mut stack) = stack.make_aligned_with::<c64, _>(n, 64, |_| z);

c.bench_function(&format!("rustfft-fwd-{}", n), |b| {
c.bench_function(&format!("rustfft-fwd-{n}"), |b| {
let mut planner = FftPlannerAvx::<f64>::new().unwrap();
let fwd_rustfft = planner.plan_fft_forward(n);
b.iter(|| fwd_rustfft.process_outofplace_with_scratch(&mut src, &mut dst, &mut scratch))
});

c.bench_function(&format!("fftw-fwd-{}", n), |b| {
c.bench_function(&format!("fftw-fwd-{n}"), |b| {
let fwd_fftw = PlanInterleavedC64::new(n, Sign::Forward);
b.iter(|| {
fwd_fftw.execute(&mut src, &mut dst);
Expand All @@ -138,19 +138,19 @@ pub fn criterion_benchmark(c: &mut Criterion) {
concrete_fft::ordered::Method::Measure(bench_duration),
);

c.bench_function(&format!("concrete-fwd-{}", n), |b| {
c.bench_function(&format!("concrete-fwd-{n}"), |b| {
b.iter(|| ordered.fwd(&mut dst, stack.rb_mut()))
});
}
c.bench_function(&format!("unordered-fwd-{}", n), |b| {
c.bench_function(&format!("unordered-fwd-{n}"), |b| {
b.iter(|| unordered.fwd(&mut dst, stack.rb_mut()));
});
c.bench_function(&format!("unordered-inv-{}", n), |b| {
c.bench_function(&format!("unordered-inv-{n}"), |b| {
b.iter(|| unordered.inv(&mut dst, stack.rb_mut()));
});

// memcpy
c.bench_function(&format!("memcpy-{}", n), |b| {
c.bench_function(&format!("memcpy-{n}"), |b| {
b.iter(|| unsafe {
std::ptr::copy_nonoverlapping(src.as_ptr(), dst.as_mut_ptr(), n);
})
Expand Down

0 comments on commit f95c843

Please sign in to comment.