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.

Trait Implementations§

source§

impl Kernel for Box<dyn Kernel>

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.

Implementations on Foreign Types§

source§

impl Kernel for Box<dyn Kernel>

source§

impl Kernel for Arc<dyn Kernel>

Implementors§

source§

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

source§

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