Skip to main content

distribute_frames

Function distribute_frames 

Source
pub fn distribute_frames<P, T, F>(
    scheduler: &MultiGpuScheduler,
    frames: &[P],
    work_fn: F,
) -> Vec<Result<T>> 
where P: Send + Sync, T: Send, F: Fn(&GpuDevice, &P) -> Result<T> + Send + Sync,
Expand description

High-level helper that distributes a batch of frames across devices.

frames is a slice of input payloads; work_fn is called once per frame with the selected device and the frame payload.

Returns a Vec<Result<T>> in the same order as frames.