File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,17 @@ mod twiddles;
21
21
///
22
22
/// [1] https://inst.eecs.berkeley.edu/~ee123/sp15/Notes/Lecture08_FFT_and_SpectAnalysis.key.pdf
23
23
pub fn fft_dif ( reals : & mut [ Float ] , imags : & mut [ Float ] ) {
24
+ let opts = Options :: guess_options ( reals. len ( ) ) ;
25
+ fft_dif_with_opts ( reals, imags, & opts)
26
+ }
27
+
28
+ /// Same as [fft_dif], but also accepts [`Options`] that control optimization strategies.
29
+ ///
30
+ /// `fft_dif` automatically guesses the best strategy for a given input,
31
+ /// so you only need to call this if you are tuning performance for a specific hardware platform.
32
+ pub fn fft_dif_with_opts ( reals : & mut [ Float ] , imags : & mut [ Float ] , opts : & Options ) {
24
33
assert_eq ! ( reals. len( ) , imags. len( ) ) ;
25
34
let n: usize = reals. len ( ) . ilog2 ( ) as usize ;
26
- let opts = Options :: guess_options ( reals. len ( ) ) ;
27
35
28
36
let dist = 1 << ( n - 1 ) ;
29
37
let chunk_size = dist << 1 ;
You can’t perform that action at this time.
0 commit comments