process_in_chunks

Function process_in_chunks 

Source
pub fn process_in_chunks<T, F>(
    input: &[T],
    chunk_size: usize,
    op: F,
) -> FFTResult<Vec<Complex64>>
where T: NumCast + Copy + Debug + 'static, F: FnMut(&[T]) -> FFTResult<Vec<Complex64>>,
Expand description

Process large arrays in chunks to minimize memory usage

This function processes a large array in chunks using the provided operation function, which reduces memory usage for very large arrays.

§Arguments

  • input - Input array
  • chunk_size - Size of each chunk to process
  • op - Operation to apply to each chunk

§Returns

  • Result with the processed array

§Errors

Returns an error if the computation fails.