pub trait Engine {
// Required methods
fn fft(
&self,
data: &mut ShardsRefMut<'_>,
pos: usize,
size: usize,
truncated_size: usize,
skew_delta: usize,
);
fn ifft(
&self,
data: &mut ShardsRefMut<'_>,
pos: usize,
size: usize,
truncated_size: usize,
skew_delta: usize,
);
fn mul(&self, x: &mut [[u8; 64]], log_m: GfElement);
// Provided method
fn eval_poly(erasures: &mut [GfElement; 65536], truncated_size: usize)
where Self: Sized { ... }
}
Expand description
Required Methods§
Sourcefn fft(
&self,
data: &mut ShardsRefMut<'_>,
pos: usize,
size: usize,
truncated_size: usize,
skew_delta: usize,
)
fn fft( &self, data: &mut ShardsRefMut<'_>, pos: usize, size: usize, truncated_size: usize, skew_delta: usize, )
In-place decimation-in-time FFT (fast Fourier transform).
- FFT is done on chunk
data[pos .. pos + size]
size
must be2^n
- Before function call
data[pos .. pos + size]
must be valid. - After function call
data[pos .. pos + truncated_size]
contains valid FFT result.data[pos + truncated_size .. pos + size]
contains valid FFT result if this contained only0u8
:s and garbage otherwise.
Sourcefn ifft(
&self,
data: &mut ShardsRefMut<'_>,
pos: usize,
size: usize,
truncated_size: usize,
skew_delta: usize,
)
fn ifft( &self, data: &mut ShardsRefMut<'_>, pos: usize, size: usize, truncated_size: usize, skew_delta: usize, )
In-place decimation-in-time IFFT (inverse fast Fourier transform).
- IFFT is done on chunk
data[pos .. pos + size]
size
must be2^n
- Before function call
data[pos .. pos + size]
must be valid. - After function call
data[pos .. pos + truncated_size]
contains valid IFFT result.data[pos + truncated_size .. pos + size]
contains valid IFFT result if this contained only0u8
:s and garbage otherwise.