pub struct Tuner<K>where
K: AutotuneKey,{ /* private fields */ }
Expand description
Executes autotune benchmarking and caching
Implementations§
Source§impl<K> Tuner<K>where
K: AutotuneKey,
impl<K> Tuner<K>where
K: AutotuneKey,
Sourcepub fn new(name: &str, device_id: &str) -> Tuner<K>
pub fn new(name: &str, device_id: &str) -> Tuner<K>
Returns a tuner with cache initialized from persistent cache
Sourcepub fn fastest(&self, key: &K) -> TuneCacheResult
pub fn fastest(&self, key: &K) -> TuneCacheResult
Fetch the fastest autotune operation index for an autotune key.
Sourcepub fn register_autotune<Out>(&mut self, result: AutotuneResult<K, Out>) -> Outwhere
Out: Send,
pub fn register_autotune<Out>(&mut self, result: AutotuneResult<K, Out>) -> Outwhere
Out: Send,
Registers the results from execute_autotune().
Sourcepub fn fastest_with_checksum<Out>(
&mut self,
set: &dyn AutotuneOperationSet<K, Out>,
) -> TuneCacheResultwhere
Out: Send,
pub fn fastest_with_checksum<Out>(
&mut self,
set: &dyn AutotuneOperationSet<K, Out>,
) -> TuneCacheResultwhere
Out: Send,
Fetch the fastest autotune operation index for an autotune key and validate the checksum.
Sourcepub fn execute_autotune<S, C, Out>(
&self,
set: Box<dyn AutotuneOperationSet<K, Out>>,
client: &ComputeClient<S, C>,
) -> AutotuneResult<K, Out>
pub fn execute_autotune<S, C, Out>( &self, set: Box<dyn AutotuneOperationSet<K, Out>>, client: &ComputeClient<S, C>, ) -> AutotuneResult<K, Out>
Execute the fastest autotune operation if known, otherwise perform some benchmarks before.
Trait Implementations§
Auto Trait Implementations§
impl<K> Freeze for Tuner<K>
impl<K> RefUnwindSafe for Tuner<K>where
K: RefUnwindSafe,
impl<K> Send for Tuner<K>
impl<K> Sync for Tuner<K>
impl<K> Unpin for Tuner<K>where
K: Unpin,
impl<K> UnwindSafe for Tuner<K>where
K: UnwindSafe,
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