pub struct KernelCacheKey {
pub id: u128,
pub ir: u128,
}Expand description
Key for an entry in the persistent compilation cache.
The id alone doesn’t describe what a kernel does: it covers the kernel type, its comptime arguments and its launch settings, but nothing of the body. Pairing it with a hash of the expanded IR is what lets a cached artifact be invalidated when the code behind it changes.
Fields§
§id: u128Hash of the kernel id.
ir: u128Hash of the kernel definition.
Implementations§
Source§impl KernelCacheKey
impl KernelCacheKey
Sourcepub fn new(id: &KernelId, definition: &KernelDefinition) -> Self
pub fn new(id: &KernelId, definition: &KernelDefinition) -> Self
Create a key from a kernel id and its expanded definition.
Trait Implementations§
Source§impl Clone for KernelCacheKey
impl Clone for KernelCacheKey
Source§fn clone(&self) -> KernelCacheKey
fn clone(&self) -> KernelCacheKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for KernelCacheKey
Source§impl Debug for KernelCacheKey
impl Debug for KernelCacheKey
Source§impl<'de> Deserialize<'de> for KernelCacheKey
impl<'de> Deserialize<'de> for KernelCacheKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for KernelCacheKey
Source§impl Hash for KernelCacheKey
impl Hash for KernelCacheKey
Source§impl PartialEq for KernelCacheKey
impl PartialEq for KernelCacheKey
Source§impl Serialize for KernelCacheKey
impl Serialize for KernelCacheKey
impl StructuralPartialEq for KernelCacheKey
Auto Trait Implementations§
impl Freeze for KernelCacheKey
impl RefUnwindSafe for KernelCacheKey
impl Send for KernelCacheKey
impl Sync for KernelCacheKey
impl Unpin for KernelCacheKey
impl UnsafeUnpin for KernelCacheKey
impl UnwindSafe for KernelCacheKey
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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