File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
- use std:: { f64:: consts:: PI , simd:: f64x8 } ;
1
+ use std:: { f64:: consts:: PI , simd:: Simd } ;
2
2
3
3
use crate :: kernels:: Float ;
4
4
@@ -71,7 +71,7 @@ pub fn generate_twiddles(dist: usize) -> (Vec<f64>, Vec<f64>) {
71
71
}
72
72
73
73
pub ( crate ) fn generate_twiddles_simd ( dist : usize ) -> ( Vec < f64 > , Vec < f64 > ) {
74
- const SIMD_WIDTH : usize = 8 ; // TODO: make this a const generic?
74
+ const SIMD_WIDTH : usize = 8 ; // TODO: make this a const generic and multiversion this function
75
75
assert ! ( dist >= SIMD_WIDTH * 2 ) ;
76
76
assert_eq ! ( dist % SIMD_WIDTH , 0 ) ;
77
77
let mut twiddles_re = vec ! [ 0.0 ; dist] ;
@@ -90,8 +90,8 @@ pub(crate) fn generate_twiddles_simd(dist: usize) -> (Vec<f64>, Vec<f64>) {
90
90
} ;
91
91
92
92
let apply_symmetry_re = |input : & [ Float ] , output : & mut [ Float ] | {
93
- let first_re = f64x8 :: from_slice ( input) ;
94
- let minus_one = f64x8 :: splat ( -1.0 ) ;
93
+ let first_re: Simd < f64 , SIMD_WIDTH > = Simd :: from_slice ( input) ;
94
+ let minus_one: Simd < f64 , SIMD_WIDTH > = Simd :: splat ( -1.0 ) ;
95
95
let negated = ( first_re * minus_one) . reverse ( ) ;
96
96
output. copy_from_slice ( negated. as_array ( ) ) ;
97
97
} ;
You can’t perform that action at this time.
0 commit comments