Skip to main content

KernelCompiler

Trait KernelCompiler 

Source
pub trait KernelCompiler:
    Send
    + Sync
    + Debug {
    // Required methods
    fn compile_kernel(
        &self,
        source: &str,
        options: &CompilationOptions,
    ) -> Result<CompiledKernel, KernelError>;
    fn backend_type(&self) -> GpuBackend;
    fn supports_feature(&self, feature: KernelFeature) -> bool;
    fn get_capabilities(&self) -> CompilerCapabilities;
}
Expand description

Trait for backend-specific kernel compilation

Required Methods§

Source

fn compile_kernel( &self, source: &str, options: &CompilationOptions, ) -> Result<CompiledKernel, KernelError>

Compile kernel source code for the target backend

Source

fn backend_type(&self) -> GpuBackend

Get backend type

Source

fn supports_feature(&self, feature: KernelFeature) -> bool

Check if a feature is supported

Source

fn get_capabilities(&self) -> CompilerCapabilities

Get compilation capabilities

Implementors§