pub trait GpuGraphExecutor:
Debug
+ Send
+ Sync {
// Required methods
fn device(&self) -> &GpuDeviceDescriptor;
fn validate_options(&self, options: &ExecutionOptions) -> GeomResult<()>;
fn compile_mesh_batch(
&self,
graph: &GeometryGraph,
roots: &[NodeId],
options: &ExecutionOptions,
) -> GeomResult<Vec<TriMesh>>;
}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§
Sourcefn device(&self) -> &GpuDeviceDescriptor
fn device(&self) -> &GpuDeviceDescriptor
Hardware/API facts.
Sourcefn validate_options(&self, options: &ExecutionOptions) -> GeomResult<()>
fn validate_options(&self, options: &ExecutionOptions) -> GeomResult<()>
Validate algorithm-specific precision, determinism, and resource policy before any work is submitted to the device.
Sourcefn compile_mesh_batch(
&self,
graph: &GeometryGraph,
roots: &[NodeId],
options: &ExecutionOptions,
) -> GeomResult<Vec<TriMesh>>
fn compile_mesh_batch( &self, graph: &GeometryGraph, roots: &[NodeId], options: &ExecutionOptions, ) -> GeomResult<Vec<TriMesh>>
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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".