pub trait GpuKernel:
Send
+ Sync
+ Debug {
// Required method
fn metadata(&self) -> &KernelMetadata;
// Provided methods
fn validate(&self) -> Result<()> { ... }
fn id(&self) -> &str { ... }
fn requires_gpu_native(&self) -> bool { ... }
}Expand description
Base trait for all GPU kernels.
Provides access to kernel metadata and input validation.
Required Methods§
Sourcefn metadata(&self) -> &KernelMetadata
fn metadata(&self) -> &KernelMetadata
Returns the kernel metadata.
Provided Methods§
Sourcefn validate(&self) -> Result<()>
fn validate(&self) -> Result<()>
Validate kernel configuration.
Called before kernel launch to ensure configuration is valid.
Sourcefn requires_gpu_native(&self) -> bool
fn requires_gpu_native(&self) -> bool
Returns true if this kernel requires GPU-native execution.