scirs2_fft/
sparse_fft_cuda_kernels_iterative.rs1use crate::error::{FFTError, FFTResult};
7use crate::gpu_kernel_stub::MIGRATION_MESSAGE;
8use crate::sparse_fft::SparseFFTResult;
9use scirs2_core::numeric::NumCast;
10use std::fmt::Debug;
11
12pub struct CUDAFrequencyPruningSparseFFTKernel;
16
17impl CUDAFrequencyPruningSparseFFTKernel {
18 pub fn new() -> Self {
19 Self
20 }
21}
22
23impl Default for CUDAFrequencyPruningSparseFFTKernel {
24 fn default() -> Self {
25 Self::new()
26 }
27}
28
29#[allow(dead_code)]
31pub fn execute_cuda_frequency_pruning_sparse_fft<T>(
32 _input: &[T],
33 _k: usize,
34 _threshold: f64,
35) -> FFTResult<SparseFFTResult>
36where
37 T: NumCast + Copy + Debug,
38{
39 Err(FFTError::NotImplementedError(MIGRATION_MESSAGE.to_string()))
40}
41
42pub struct CUDAIterativeSparseFFTKernel;
46
47impl CUDAIterativeSparseFFTKernel {
48 pub fn new() -> Self {
49 Self
50 }
51}
52
53impl Default for CUDAIterativeSparseFFTKernel {
54 fn default() -> Self {
55 Self::new()
56 }
57}
58
59#[allow(dead_code)]
61pub fn execute_cuda_iterative_sparse_fft<T>(
62 _input: &[T],
63 _k: usize,
64 _max_iterations: usize,
65) -> FFTResult<SparseFFTResult>
66where
67 T: NumCast + Copy + Debug,
68{
69 Err(FFTError::NotImplementedError(MIGRATION_MESSAGE.to_string()))
70}
71
72pub struct CUDASpectralFlatnessSparseFFTKernel;
76
77impl CUDASpectralFlatnessSparseFFTKernel {
78 pub fn new() -> Self {
79 Self
80 }
81}
82
83impl Default for CUDASpectralFlatnessSparseFFTKernel {
84 fn default() -> Self {
85 Self::new()
86 }
87}
88
89#[allow(dead_code)]
91pub fn execute_cuda_spectral_flatness_sparse_fft<T>(
92 _input: &[T],
93 _k: usize,
94 _flatness_threshold: f64,
95) -> FFTResult<SparseFFTResult>
96where
97 T: NumCast + Copy + Debug,
98{
99 Err(FFTError::NotImplementedError(MIGRATION_MESSAGE.to_string()))
100}