Skip to main content

BoxedStage

Trait BoxedStage 

Source
pub trait BoxedStage: Send + 'static {
    // Required method
    fn enqueue_boxed(
        &mut self,
        stream: &Arc<CudaStream>,
        wait_for: Option<&CudaEvent>,
        input: Box<dyn Any + Send>,
    ) -> Result<(CudaEvent, Box<dyn Any + Send>), GpuError>;
}
Expand description

Heterogeneous N-stage executor.

Each stage’s In and Out types are erased into Box<dyn Any + Send>. Stage adapters wrap their typed PipelineStage impl into a BoxedStage and the executor drives the chain. Dynamic typing gives up some compile-time safety in exchange for arbitrarily-long chains; type mismatches at stage boundaries surface as GpuError::Unrecoverable("…downcast failed…") at runtime.

Required Methods§

Source

fn enqueue_boxed( &mut self, stream: &Arc<CudaStream>, wait_for: Option<&CudaEvent>, input: Box<dyn Any + Send>, ) -> Result<(CudaEvent, Box<dyn Any + Send>), GpuError>

Implementors§