pub struct SimdAllocator { /* private fields */ }Expand description
SIMD-aware memory allocator with support for different backends
Implementations§
Source§impl SimdAllocator
impl SimdAllocator
Sourcepub fn with_backend(backend: AllocatorBackend) -> Self
pub fn with_backend(backend: AllocatorBackend) -> Self
Create allocator with specific backend
Sourcepub unsafe fn alloc_aligned(
&self,
size: usize,
alignment: usize,
) -> DomainResult<NonNull<u8>>
pub unsafe fn alloc_aligned( &self, size: usize, alignment: usize, ) -> DomainResult<NonNull<u8>>
Allocate aligned memory for SIMD operations
§Safety
Returns raw pointer that must be properly deallocated
Sourcepub unsafe fn realloc_aligned(
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_size: usize,
) -> DomainResult<NonNull<u8>>
pub unsafe fn realloc_aligned( &self, ptr: NonNull<u8>, old_layout: Layout, new_size: usize, ) -> DomainResult<NonNull<u8>>
Sourcepub unsafe fn dealloc_aligned(&self, ptr: NonNull<u8>, layout: Layout)
pub unsafe fn dealloc_aligned(&self, ptr: NonNull<u8>, layout: Layout)
Sourcepub fn stats(&self) -> AllocatorStats
pub fn stats(&self) -> AllocatorStats
Get allocator statistics (if available)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SimdAllocator
impl RefUnwindSafe for SimdAllocator
impl Send for SimdAllocator
impl Sync for SimdAllocator
impl Unpin 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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