pub struct KeyedPtxModuleCache<K> { /* private fields */ }Expand description
A per-key family of compiled modules: one CudaModule per value of a
kernel-shape parameter that is baked into the source (a row width P,
say), each compiled with the shared device-keyed NVRTC options on first
use and shared thereafter. The keyed twin of PtxModuleCache.
Implementations§
Source§impl<K: Eq + Hash + Copy + Display> KeyedPtxModuleCache<K>
impl<K: Eq + Hash + Copy + Display> KeyedPtxModuleCache<K>
pub fn new() -> Self
Sourcepub fn get_or_compile<S>(
&self,
ctx: &Arc<CudaContext>,
key: K,
label: &'static str,
source: S,
) -> Result<Arc<CudaModule>, GpuError>
pub fn get_or_compile<S>( &self, ctx: &Arc<CudaContext>, key: K, label: &'static str, source: S, ) -> Result<Arc<CudaModule>, GpuError>
The module for key, compiling source(key) and loading it on
ctx the first time that key is seen.
Trait Implementations§
Auto Trait Implementations§
impl<K> !Freeze for KeyedPtxModuleCache<K>
impl<K> RefUnwindSafe for KeyedPtxModuleCache<K>
impl<K> Send for KeyedPtxModuleCache<K>
impl<K> Sync for KeyedPtxModuleCache<K>
impl<K> Unpin for KeyedPtxModuleCache<K>
impl<K> UnsafeUnpin for KeyedPtxModuleCache<K>
impl<K> UnwindSafe for KeyedPtxModuleCache<K>
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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