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§
Sourcefn define(&self) -> KernelDefinition
fn define(&self) -> KernelDefinition
Define the kernel for compilation
Provided Methods§
Sourcefn source(&self) -> Option<PrecompiledSource>
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".