CubeTask

Trait CubeTask 

Source
pub trait CubeTask<C>:
    KernelMetadata
    + Send
    + Sync
where C: Compiler,
{ // Required method fn compile( &self, compiler: &mut C, compilation_options: &<C as Compiler>::CompilationOptions, mode: ExecutionMode, ) -> Result<CompiledKernel<C>, CompilationError>; }
Expand description

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

Required Methods§

Source

fn compile( &self, compiler: &mut C, compilation_options: &<C as Compiler>::CompilationOptions, mode: ExecutionMode, ) -> Result<CompiledKernel<C>, CompilationError>

Compile a kernel and return the compiled form with an optional non-text representation

Trait Implementations§

Source§

impl<C> KernelMetadata for Box<dyn CubeTask<C>>
where C: Compiler,

Source§

fn id(&self) -> KernelId

Identifier for the kernel, used for caching kernel compilation.
Source§

fn name(&self) -> &'static str

Name of the kernel for debugging.

Implementors§

Source§

impl<C, K> CubeTask<C> for KernelTask<C, K>
where C: Compiler, K: CubeKernel,