()
| 2 | use num::Complex; |
| 3 | |
| 4 | fn main() { |
| 5 | set_device(0); |
| 6 | info(); |
| 7 | let samples = 10; |
| 8 | let dims = Dim4::new(&[samples, 1, 1, 1]); |
| 9 | |
| 10 | let values = vec![ |
| 11 | Complex::new(0.0, 2.0), |
| 12 | Complex::new(0.0, 2.0), |
| 13 | Complex::new(0.0, 2.0), |
| 14 | Complex::new(0.0, 2.0), |
| 15 | Complex::new(0.0, 2.0), |
| 16 | Complex::new(0.0, 2.0), |
| 17 | Complex::new(0.0, 2.0), |
| 18 | Complex::new(0.0, 2.0), |
| 19 | Complex::new(0.0, 2.0), |
| 20 | Complex::new(0.0, 2.0), |
| 21 | ]; |
| 22 | |
| 23 | let signal = Array::new(&values, dims); |
| 24 | |
| 25 | af_print!("signal", signal); |
| 26 | |
| 27 | // Used length of input signal as norm_factor |
| 28 | let output = fft(&signal, 0.1, samples as i64); |
| 29 | |
| 30 | af_print!("Output", output); |
| 31 | } |
nothing calls this directly
no test coverage detected