JitBackendImpl

Trait JitBackendImpl 

Source
pub trait JitBackendImpl: Send + Sync {
    // Required methods
    fn compile_kernel(
        &self,
        source: &KernelSource,
        config: &JitConfig,
    ) -> Result<CompiledKernel, JitError>;
    fn execute_kernel(
        &self,
        kernel: &CompiledKernel,
        inputs: &[&dyn Any],
        outputs: &mut [&mut dyn Any],
    ) -> Result<ExecutionProfile, JitError>;
    fn is_available(&self) -> bool;
    fn get_capabilities(&self) -> BackendCapabilities;
}
Expand description

JIT backend implementation trait

Required Methods§

Source

fn compile_kernel( &self, source: &KernelSource, config: &JitConfig, ) -> Result<CompiledKernel, JitError>

Compile kernel source to binary

Source

fn execute_kernel( &self, kernel: &CompiledKernel, inputs: &[&dyn Any], outputs: &mut [&mut dyn Any], ) -> Result<ExecutionProfile, JitError>

Execute compiled kernel

Source

fn is_available(&self) -> bool

Check if backend is available

Source

fn get_capabilities(&self) -> BackendCapabilities

Get backend capabilities

Implementors§