Skip to main content

CubeKernel

Trait CubeKernel 

Source
pub trait CubeKernel: KernelMetadata {
    // Required method
    fn define(&self) -> KernelDefinition;

    // Provided method
    fn source(&self) -> Option<PrecompiledSource> { ... }
}
Expand description

Kernel that can be defined

Required Methods§

Source

fn define(&self) -> KernelDefinition

Define the kernel for compilation

Provided Methods§

Source

fn source(&self) -> Option<PrecompiledSource>

The kernel’s own compiled source, for a hand-written kernel that carries target-language text rather than IR to compile.

None, the default, compiles what define returns.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§