Struct futuredsp::fir::NonResamplingFirKernel
source · [−]pub struct NonResamplingFirKernel<InputType, OutputType, TA, TT> where
TA: TapsAccessor<TapType = TT>, { /* private fields */ }
Expand description
A non-resampling FIR filter. Calling work()
on this struct always
produces exactly as many samples as it consumes.
Implementations of this core exist for the following combinations:
f32
samples,f32
taps.Complex<f32>
samples,f32
taps.
Example usage:
use futuredsp::UnaryKernel;
use futuredsp::fir::NonResamplingFirKernel;
let fir = NonResamplingFirKernel::<f32, f32, _, _>::new([1.0, 2.0, 3.0]);
let input = [1.0, 2.0, 3.0];
let mut output = [0.0];
fir.work(&input, &mut output);
Implementations
sourceimpl<InputType, OutputType, TA, TT> NonResamplingFirKernel<InputType, OutputType, TA, TT> where
TA: TapsAccessor<TapType = TT>,
impl<InputType, OutputType, TA, TT> NonResamplingFirKernel<InputType, OutputType, TA, TT> where
TA: TapsAccessor<TapType = TT>,
Trait Implementations
sourceimpl<TA: TapsAccessor<TapType = Complex<f32>>> UnaryKernel<Complex<f32>, Complex<f32>> for NonResamplingFirKernel<Complex<f32>, Complex<f32>, TA, Complex<f32>>
impl<TA: TapsAccessor<TapType = Complex<f32>>> UnaryKernel<Complex<f32>, Complex<f32>> for NonResamplingFirKernel<Complex<f32>, Complex<f32>, TA, Complex<f32>>
sourcefn work(
&self,
i: &[Complex<f32>],
o: &mut [Complex<f32>]
) -> (usize, usize, ComputationStatus)
fn work(
&self,
i: &[Complex<f32>],
o: &mut [Complex<f32>]
) -> (usize, usize, ComputationStatus)
Computes the kernel on the given input, outputting into the given
output. For a UnaryKernel
, kernels will not have internal memory - in
particular, this means that a single instantiated kernel does not need
to be reserved for a single stream of data. Read more
sourceimpl<TA: TapsAccessor<TapType = f32>> UnaryKernel<Complex<f32>, Complex<f32>> for NonResamplingFirKernel<Complex<f32>, Complex<f32>, TA, f32>
impl<TA: TapsAccessor<TapType = f32>> UnaryKernel<Complex<f32>, Complex<f32>> for NonResamplingFirKernel<Complex<f32>, Complex<f32>, TA, f32>
sourcefn work(
&self,
i: &[Complex<f32>],
o: &mut [Complex<f32>]
) -> (usize, usize, ComputationStatus)
fn work(
&self,
i: &[Complex<f32>],
o: &mut [Complex<f32>]
) -> (usize, usize, ComputationStatus)
Computes the kernel on the given input, outputting into the given
output. For a UnaryKernel
, kernels will not have internal memory - in
particular, this means that a single instantiated kernel does not need
to be reserved for a single stream of data. Read more
sourceimpl<TA: TapsAccessor<TapType = f32>> UnaryKernel<f32, f32> for NonResamplingFirKernel<f32, f32, TA, f32>
impl<TA: TapsAccessor<TapType = f32>> UnaryKernel<f32, f32> for NonResamplingFirKernel<f32, f32, TA, f32>
sourcefn work(&self, i: &[f32], o: &mut [f32]) -> (usize, usize, ComputationStatus)
fn work(&self, i: &[f32], o: &mut [f32]) -> (usize, usize, ComputationStatus)
Computes the kernel on the given input, outputting into the given
output. For a UnaryKernel
, kernels will not have internal memory - in
particular, this means that a single instantiated kernel does not need
to be reserved for a single stream of data. Read more
Auto Trait Implementations
impl<InputType, OutputType, TA, TT> RefUnwindSafe for NonResamplingFirKernel<InputType, OutputType, TA, TT> where
InputType: RefUnwindSafe,
OutputType: RefUnwindSafe,
TA: RefUnwindSafe,
impl<InputType, OutputType, TA, TT> Send for NonResamplingFirKernel<InputType, OutputType, TA, TT> where
InputType: Send,
OutputType: Send,
impl<InputType, OutputType, TA, TT> Sync for NonResamplingFirKernel<InputType, OutputType, TA, TT> where
InputType: Sync,
OutputType: Sync,
TA: Sync,
impl<InputType, OutputType, TA, TT> Unpin for NonResamplingFirKernel<InputType, OutputType, TA, TT> where
InputType: Unpin,
OutputType: Unpin,
TA: Unpin,
impl<InputType, OutputType, TA, TT> UnwindSafe for NonResamplingFirKernel<InputType, OutputType, TA, TT> where
InputType: UnwindSafe,
OutputType: UnwindSafe,
TA: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more