pub struct SimdAllocator { /* private fields */ }Expand description
SIMD-optimized allocator with alignment guarantees
Implementations§
Source§impl SimdAllocator
impl SimdAllocator
Sourcepub const fn with_alignment(alignment: usize) -> Self
pub const fn with_alignment(alignment: usize) -> Self
Create a new SIMD allocator with custom alignment
Sourcepub fn stats(&self) -> &AllocatorStats
pub fn stats(&self) -> &AllocatorStats
Get allocator statistics
Sourcepub fn allocate_simd<T>(&self, count: usize) -> Option<NonNull<T>>
pub fn allocate_simd<T>(&self, count: usize) -> Option<NonNull<T>>
Allocate aligned memory for SIMD operations
Sourcepub unsafe fn deallocate_simd<T>(&self, ptr: NonNull<T>, count: usize)
pub unsafe fn deallocate_simd<T>(&self, ptr: NonNull<T>, count: usize)
Deallocate SIMD memory
Trait Implementations§
Source§impl Default for SimdAllocator
impl Default for SimdAllocator
Source§impl GlobalAlloc for SimdAllocator
impl GlobalAlloc for SimdAllocator
Source§unsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocates memory as described by the given
layout. Read moreAuto Trait Implementations§
impl !Freeze for SimdAllocator
impl RefUnwindSafe for SimdAllocator
impl Send for SimdAllocator
impl Sync for SimdAllocator
impl Unpin for SimdAllocator
impl UnsafeUnpin for SimdAllocator
impl UnwindSafe for SimdAllocator
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