Skip to main content

BackendTimer

Trait BackendTimer 

Source
pub trait BackendTimer {
    type Error;

    // Required method
    fn measure_candidate_ns(
        &mut self,
        program: &Program,
        workgroup_size: [u32; 3],
    ) -> Result<u64, Self::Error>;
}
Expand description

Backend timing hook used by the generic best-of-N framework.

Required Associated Types§

Source

type Error

Error type returned by a concrete timing implementation.

Required Methods§

Source

fn measure_candidate_ns( &mut self, program: &Program, workgroup_size: [u32; 3], ) -> Result<u64, Self::Error>

Measure one workgroup-size candidate and return elapsed nanoseconds.

§Errors

Returns the concrete backend timing error when the dispatch or timer instrumentation fails.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§