Trait burn_wgpu::compute::Kernel

source ·
pub trait Kernel: 'static + Send + Sync {
    // Required methods
    fn source(&self) -> SourceTemplate;
    fn id(&self) -> String;
    fn workgroup(&self) -> WorkGroup;
}
Expand description

Kernel trait with the source that will be compiled and cached based on the provided id.

The kernel will be launched with the given workgroup.

Required Methods§

source

fn source(&self) -> SourceTemplate

Source template for the kernel.

source

fn id(&self) -> String

Identifier for the kernel, used for caching kernel compilation.

source

fn workgroup(&self) -> WorkGroup

Launch information.

Implementors§

source§

impl<K> Kernel for DynamicKernel<K>where K: DynamicKernelSource + 'static,

source§

impl<K> Kernel for StaticKernel<K>where K: StaticKernelSource + 'static,