Trait GpuGraphExecutor

Source
pub trait GpuGraphExecutor:
    Debug
    + Send
    + Sync {
    // Required methods
    fn device(&self) -> &GpuDeviceDescriptor;
    fn validate_options(
        &self,
        options: &ExecutionOptions,
    ) -> Result<(), GeomError>;
    fn compile_mesh_batch(
        &self,
        graph: &GeometryGraph,
        roots: &[NodeId],
        options: &ExecutionOptions,
    ) -> Result<Vec<TriMesh>, GeomError>;
}
Expand description

Concrete GPU graph compiler supplied by an API-specific crate.

A CUDA executor for a workstation, a Metal executor for Apple silicon, and a WebGPU executor for integrated graphics can implement this batch contract without leaking vendor types into portable operation contracts.

Required Methods§

Source

fn device(&self) -> &GpuDeviceDescriptor

Hardware/API facts.

Source

fn validate_options(&self, options: &ExecutionOptions) -> Result<(), GeomError>

Validate algorithm-specific precision, determinism, and resource policy before any work is submitted to the device.

Source

fn compile_mesh_batch( &self, graph: &GeometryGraph, roots: &[NodeId], options: &ExecutionOptions, ) -> Result<Vec<TriMesh>, GeomError>

Compile graph roots as one batch to amortize upload and synchronization.

Return exactly one mesh per root, in input order. Honor every forwarded execution policy or return a typed GeomError; never silently reduce precision or determinism.

Implementors§