Skip to main content

BoundsGenerator

Trait BoundsGenerator 

Source
pub trait BoundsGenerator<K, I: TuneInputs, B: TimeBound>:
    Send
    + Sync
    + 'static {
    // Required method
    fn generate<'a>(&self, key: &K, inputs: &I::At<'a>) -> Bounds<B>;
}
Expand description

Produces a set of AutotuneBounds for a given key and reference inputs.

Required Methods§

Source

fn generate<'a>(&self, key: &K, inputs: &I::At<'a>) -> Bounds<B>

Generate a set of bounds for a given key and reference inputs.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<K, Func, A, B: TimeBound> BoundsGenerator<K, A, B> for Func
where A: Clone + Send + Sync + 'static, K: 'static, Func: Send + Sync + 'static + Fn(&K, &A) -> Bounds<B>,

Fn(&K, &A) -> Bounds<B> acts as a BoundsGenerator when A is an owned type. For multi-input kernels, A is a tuple that the closure destructures internally.