docsapi referencedarkforest-core-dispatcher-kernelfn
API Referencecrate: darkforest-coresince v0.1.0-alpha

KernelFn

Function pointer definition for kernel execution routines.

KernelFn

darkforest-core module: dispatcher since v0.1.0-alpha

Signature

rust
pub type KernelFn = fn(operands: &mut [Tensor]) -> Result<(), OpError>;

Overview

Function pointer definition for kernel execution routines.

Invariants & Design Principles

  • Invariant: Must return OpError::IncompatibleDevices if operands cross CPU/CUDA boundaries.

Usage Example

rust
let f: KernelFn = cpu_f32_matmul;

Related Components