scirs2_fft/
sparse_fft_cuda_kernels.rs1use crate::error::{FFTError, FFTResult};
8use crate::gpu_kernel_stub::MIGRATION_MESSAGE;
9use crate::sparse_fft::{SparseFFTAlgorithm, SparseFFTResult, WindowFunction};
10use scirs2_core::numeric::Complex64;
11use scirs2_core::numeric::NumCast;
12use std::fmt::Debug;
13
14pub struct CUDAWindowKernel;
16
17impl CUDAWindowKernel {
18 pub fn new(_window: WindowFunction) -> Self {
19 Self
20 }
21
22 pub fn apply(&self, _data: &mut [Complex64]) -> FFTResult<()> {
23 Err(FFTError::NotImplementedError(MIGRATION_MESSAGE.to_string()))
24 }
25}
26
27pub struct CUDASublinearSparseFFTKernel;
29
30impl CUDASublinearSparseFFTKernel {
31 pub fn new(_algorithm: SparseFFTAlgorithm) -> Self {
32 Self
33 }
34
35 pub fn execute<T>(&self, _input: &[T], _k: usize) -> FFTResult<SparseFFTResult>
36 where
37 T: NumCast + Copy + Debug,
38 {
39 Err(FFTError::NotImplementedError(MIGRATION_MESSAGE.to_string()))
40 }
41}
42
43#[allow(dead_code)]
45pub fn execute_cuda_sublinear_sparse_fft<T>(
46 _input: &[T],
47 _k: usize,
48 _algorithm: SparseFFTAlgorithm,
49) -> FFTResult<SparseFFTResult>
50where
51 T: NumCast + Copy + Debug,
52{
53 Err(FFTError::NotImplementedError(MIGRATION_MESSAGE.to_string()))
54}
55
56pub struct CUDACompressedSensingSparseFFTKernel;
58
59impl CUDACompressedSensingSparseFFTKernel {
60 pub fn new() -> Self {
61 Self
62 }
63
64 pub fn execute<T>(&self, _input: &[T], _k: usize) -> FFTResult<SparseFFTResult>
65 where
66 T: NumCast + Copy + Debug,
67 {
68 Err(FFTError::NotImplementedError(MIGRATION_MESSAGE.to_string()))
69 }
70}
71
72impl Default for CUDACompressedSensingSparseFFTKernel {
73 fn default() -> Self {
74 Self::new()
75 }
76}
77
78#[allow(dead_code)]
80pub fn execute_cuda_compressed_sensing_sparse_fft<T>(
81 _input: &[T],
82 _k: usize,
83) -> FFTResult<SparseFFTResult>
84where
85 T: NumCast + Copy + Debug,
86{
87 Err(FFTError::NotImplementedError(MIGRATION_MESSAGE.to_string()))
88}