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§
Sourcefn compile_kernel(
&self,
source: &str,
options: &CompilationOptions,
) -> Result<CompiledKernel, KernelError>
fn compile_kernel( &self, source: &str, options: &CompilationOptions, ) -> Result<CompiledKernel, KernelError>
Compile kernel source code for the target backend
Sourcefn backend_type(&self) -> GpuBackend
fn backend_type(&self) -> GpuBackend
Get backend type
Sourcefn supports_feature(&self, feature: KernelFeature) -> bool
fn supports_feature(&self, feature: KernelFeature) -> bool
Check if a feature is supported
Sourcefn get_capabilities(&self) -> CompilerCapabilities
fn get_capabilities(&self) -> CompilerCapabilities
Get compilation capabilities