Enum cust::context::CacheConfig
source · [−]#[repr(u32)]
#[non_exhaustive]
pub enum CacheConfig {
PreferNone,
PreferShared,
PreferL1,
PreferEqual,
}
Expand description
This enumeration represents configuration settings for devices which share hardware resources between L1 cache and shared memory.
Note that this is only a preference - the driver will use the requested configuration if possible, but it is free to choose a different configuration if required to execute functions.
See CurrentContext::get_cache_config and CurrentContext::set_cache_config to get and set the cache config for the current context.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
PreferNone
No preference for shared memory or L1 (default)
PreferShared
Prefer larger shared memory and smaller L1 cache
PreferL1
Prefer larger L1 cache and smaller shared memory
PreferEqual
Prefer equal-sized L1 cache and shared memory
Trait Implementations
sourceimpl Clone for CacheConfig
impl Clone for CacheConfig
sourcefn clone(&self) -> CacheConfig
fn clone(&self) -> CacheConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CacheConfig
impl Debug for CacheConfig
sourceimpl Hash for CacheConfig
impl Hash for CacheConfig
sourceimpl PartialEq<CacheConfig> for CacheConfig
impl PartialEq<CacheConfig> for CacheConfig
impl Copy for CacheConfig
impl Eq for CacheConfig
impl StructuralEq for CacheConfig
impl StructuralPartialEq for CacheConfig
Auto Trait Implementations
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnwindSafe for CacheConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more