Struct numa_gpu::utils::CachePadded
source · [−]#[repr(align(128))]pub struct CachePadded<T> {
pub value: T,
}
Expand description
Cache pad a value to avoid false sharing between threads.
Pads the value to 128 bytes, because Intel Sandy Bridge and later pre-fetch two 64-byte cache lines, and IBM POWER processors have 128-byte cache lines.
Fields
value: T
Trait Implementations
sourceimpl<T: Clone> Clone for CachePadded<T>
impl<T: Clone> Clone for CachePadded<T>
sourcefn clone(&self) -> CachePadded<T>
fn clone(&self) -> CachePadded<T>
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<T: Debug> Debug for CachePadded<T>
impl<T: Debug> Debug for CachePadded<T>
sourceimpl<T: Default> Default for CachePadded<T>
impl<T: Default> Default for CachePadded<T>
sourcefn default() -> CachePadded<T>
fn default() -> CachePadded<T>
Returns the “default value” for a type. Read more
sourceimpl<T: Hash> Hash for CachePadded<T>
impl<T: Hash> Hash for CachePadded<T>
sourceimpl<T: PartialEq> PartialEq<CachePadded<T>> for CachePadded<T>
impl<T: PartialEq> PartialEq<CachePadded<T>> for CachePadded<T>
sourcefn eq(&self, other: &CachePadded<T>) -> bool
fn eq(&self, other: &CachePadded<T>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CachePadded<T>) -> bool
fn ne(&self, other: &CachePadded<T>) -> bool
This method tests for !=
.
impl<T: Copy> Copy for CachePadded<T>
impl<T: Eq> Eq for CachePadded<T>
impl<T> StructuralEq for CachePadded<T>
impl<T> StructuralPartialEq for CachePadded<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for CachePadded<T> where
T: RefUnwindSafe,
impl<T> Send for CachePadded<T> where
T: Send,
impl<T> Sync for CachePadded<T> where
T: Sync,
impl<T> Unpin for CachePadded<T> where
T: Unpin,
impl<T> UnwindSafe for CachePadded<T> where
T: UnwindSafe,
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
impl<T> Pointable for T
impl<T> Pointable for T
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)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more