Trait CubeTask

Source
pub trait CubeTask<C: Compiler>: Send + Sync {
    // Required methods
    fn id(&self) -> KernelId;
    fn compile(
        &self,
        compiler: &mut C,
        compilation_options: &C::CompilationOptions,
        mode: ExecutionMode,
    ) -> CompiledKernel<C>;

    // Provided method
    fn name(&self) -> &'static str { ... }
}
Expand description

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

Required Methods§

Source

fn id(&self) -> KernelId

Identifier for the kernel, used for caching kernel compilation.

Source

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

Compile the kernel into source

Provided Methods§

Source

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

Trait Implementations§

Source§

impl<C: Compiler> CubeTask<C> for Box<dyn CubeTask<C>>

Source§

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

Compile the kernel into source
Source§

fn id(&self) -> KernelId

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

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

Implementations on Foreign Types§

Source§

impl<C: Compiler> CubeTask<C> for Box<dyn CubeTask<C>>

Source§

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

Source§

fn id(&self) -> KernelId

Source§

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

Source§

impl<C: Compiler> CubeTask<C> for Arc<dyn CubeTask<C>>

Source§

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

Source§

fn id(&self) -> KernelId

Source§

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

Implementors§

Source§

impl<C: Compiler, K: Kernel> CubeTask<C> for KernelTask<C, K>