pub struct AlignedMemoryOps { /* private fields */ }Expand description
Memory-aligned operations for optimal performance
Implementations§
Source§impl AlignedMemoryOps
impl AlignedMemoryOps
Sourcepub fn new(alignment: usize) -> Self
pub fn new(alignment: usize) -> Self
Create new aligned memory operations with specified alignment
Sourcepub fn create_aligned_array(&self, size: usize) -> AlignedBuffer
pub fn create_aligned_array(&self, size: usize) -> AlignedBuffer
Create aligned array with specified size
Sourcepub fn is_aligned(&self, data: &[Float]) -> bool
pub fn is_aligned(&self, data: &[Float]) -> bool
Check if array is properly aligned
Sourcepub fn ensure_aligned(&self, data: &Array1<Float>) -> AlignedBuffer
pub fn ensure_aligned(&self, data: &Array1<Float>) -> AlignedBuffer
Copy data to aligned buffer if necessary
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AlignedMemoryOps
impl RefUnwindSafe for AlignedMemoryOps
impl Send for AlignedMemoryOps
impl Sync for AlignedMemoryOps
impl Unpin for AlignedMemoryOps
impl UnwindSafe for AlignedMemoryOps
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
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