Skip to main content

KernelDispatch

Trait KernelDispatch 

Source
pub trait KernelDispatch<K: Kernel> {
    // Required method
    fn dispatch(&self, input: K::Input<'_>) -> Result<K::Output, GpuError>;
}
Expand description

Execute kernel K on self.

Implemented by:

  • Backend devices (CudaDevice, CpuDevice), the actual upload / launch / download logic lives here.
  • DeviceBackend, a thin match that delegates to the active variant.

Callers should go through DeviceBackend::run rather than calling dispatch directly.

Required Methods§

Source

fn dispatch(&self, input: K::Input<'_>) -> Result<K::Output, GpuError>

Implementors§