pub struct KStepPointer<T> { /* private fields */ }Expand description
Strided pointer to T. Stride = sizeof(T) << k_step bytes.
Implementations§
Source§impl<T> KStepPointer<T>
impl<T> KStepPointer<T>
Sourcepub const SIGNATURE: AxisMask
pub const SIGNATURE: AxisMask
Direction signature of KStepPointer<T>. Engages the
K_stride axis (stride encoded as log2 shift count, no
runtime stride: usize field).
Sourcepub const unsafe fn new(base: *const T, k_step: u8) -> Self
pub const unsafe fn new(base: *const T, k_step: u8) -> Self
New strided pointer. k_step is the log2 of the stride
multiplier; the actual byte stride is sizeof(T) << k_step.
§Safety
base must point to a valid T and the strided sequence
base + i * stride must remain valid for all indices the
caller will use.
Sourcepub const unsafe fn cache_line(base: *const T) -> Self
pub const unsafe fn cache_line(base: *const T) -> Self
pub const fn base(&self) -> *const T
pub const fn k_step(&self) -> u8
Sourcepub unsafe fn at(&self, i: usize) -> *const T
pub unsafe fn at(&self, i: usize) -> *const T
Pointer to the i-th element under the current stride.
§Safety
The caller must ensure base + i * stride is in bounds.
Trait Implementations§
Source§impl<T> Clone for KStepPointer<T>
impl<T> Clone for KStepPointer<T>
impl<T> Copy for KStepPointer<T>
Source§impl<T: Debug> Debug for KStepPointer<T>
impl<T: Debug> Debug for KStepPointer<T>
impl<T: Send> Send for KStepPointer<T>
impl<T: Sync> Sync for KStepPointer<T>
Auto Trait Implementations§
impl<T> Freeze for KStepPointer<T>
impl<T> RefUnwindSafe for KStepPointer<T>where
T: RefUnwindSafe,
impl<T> Unpin for KStepPointer<T>
impl<T> UnsafeUnpin for KStepPointer<T>
impl<T> UnwindSafe for KStepPointer<T>where
T: RefUnwindSafe,
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