pub struct LocalTuner<AK: AutotuneKey, ID> { /* private fields */ }Expand description
A local tuner allows to create a tuner for a specific key that can be different from the server key.
Implementations§
Source§impl<AK, ID> LocalTuner<AK, ID>
impl<AK, ID> LocalTuner<AK, ID>
Sourcepub fn init<I, Out, F>(&self, init_set: F) -> Arc<TunableSet<AK, I, Out>> ⓘwhere
F: Fn() -> TunableSet<AK, I, Out> + 'static + Send + Sync,
I: TuneInputs,
Out: AutotuneOutput,
pub fn init<I, Out, F>(&self, init_set: F) -> Arc<TunableSet<AK, I, Out>> ⓘwhere
F: Fn() -> TunableSet<AK, I, Out> + 'static + Send + Sync,
I: TuneInputs,
Out: AutotuneOutput,
Get or initialize the TunableSet for this tuner.
Returns a cached Arc<TunableSet> keyed by the TypeId of init_set. The
initializer runs at most once per process.
Sourcepub fn execute<'a, R: Runtime, I: TuneInputs, Out>(
&self,
id: &ID,
client: &ComputeClient<R>,
operations: Arc<TunableSet<AK, I, Out>>,
inputs: <I as TuneInputs>::At<'a>,
) -> Out
pub fn execute<'a, R: Runtime, I: TuneInputs, Out>( &self, id: &ID, client: &ComputeClient<R>, operations: Arc<TunableSet<AK, I, Out>>, inputs: <I as TuneInputs>::At<'a>, ) -> Out
Execute the fastest operation in a TunableSet, triggering a tuning pass on
the first call for a given key.
Auto Trait Implementations§
impl<AK, ID> !Freeze for LocalTuner<AK, ID>
impl<AK, ID> RefUnwindSafe for LocalTuner<AK, ID>
impl<AK, ID> Send for LocalTuner<AK, ID>
impl<AK, ID> Sync for LocalTuner<AK, ID>
impl<AK, ID> Unpin for LocalTuner<AK, ID>
impl<AK, ID> UnsafeUnpin for LocalTuner<AK, ID>
impl<AK, ID> UnwindSafe for LocalTuner<AK, ID>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more