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>where
ID: Send,
impl<AK, ID> Sync for LocalTuner<AK, ID>where
ID: Send,
impl<AK, ID> Unpin for LocalTuner<AK, ID>where
ID: Unpin,
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