newer cargo fmt
This commit is contained in:
parent
17ce32d164
commit
abdc97f9de
10
src/main.rs
10
src/main.rs
|
@ -693,11 +693,17 @@ pub extern "C" fn __nac3_cells_fft(reals: *mut List, imags: *mut List) {
|
||||||
let mut planner = rustfft::FftPlanner::<f64>::new();
|
let mut planner = rustfft::FftPlanner::<f64>::new();
|
||||||
let fft = planner.plan_fft_forward(reals_slice.len());
|
let fft = planner.plan_fft_forward(reals_slice.len());
|
||||||
let mut buffer = vec![num_complex::Complex { re: 0.0, im: 0.0 }; reals_slice.len()];
|
let mut buffer = vec![num_complex::Complex { re: 0.0, im: 0.0 }; reals_slice.len()];
|
||||||
for (buf, (re, im)) in buffer.iter_mut().zip(reals_slice.iter().zip(imags_slice.iter())) {
|
for (buf, (re, im)) in buffer
|
||||||
|
.iter_mut()
|
||||||
|
.zip(reals_slice.iter().zip(imags_slice.iter()))
|
||||||
|
{
|
||||||
*buf = num_complex::Complex { re: *re, im: *im };
|
*buf = num_complex::Complex { re: *re, im: *im };
|
||||||
}
|
}
|
||||||
fft.process(&mut buffer);
|
fft.process(&mut buffer);
|
||||||
for (buf, (re, im)) in buffer.iter().zip(reals_slice.iter_mut().zip(imags_slice.iter_mut())) {
|
for (buf, (re, im)) in buffer
|
||||||
|
.iter()
|
||||||
|
.zip(reals_slice.iter_mut().zip(imags_slice.iter_mut()))
|
||||||
|
{
|
||||||
*re = buf.re;
|
*re = buf.re;
|
||||||
*im = buf.im;
|
*im = buf.im;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue