pub struct CpuAllocator;Expand description
CPU allocator using system memory.
Trait Implementations§
Source§impl Allocator for CpuAllocator
impl Allocator for CpuAllocator
fn alloc(&self, size: usize, options: &BufferOptions) -> Result<RawBuffer>
fn name(&self) -> &str
Source§fn device_spec(&self) -> DeviceSpec
fn device_spec(&self) -> DeviceSpec
Get the device specification for this allocator.
fn free(&self, _buffer: RawBuffer, _options: &BufferOptions)
fn synchronize(&self) -> Result<()>
Source§impl Clone for CpuAllocator
impl Clone for CpuAllocator
Source§fn clone(&self) -> CpuAllocator
fn clone(&self) -> CpuAllocator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CpuAllocator
impl RefUnwindSafe for CpuAllocator
impl Send for CpuAllocator
impl Sync for CpuAllocator
impl Unpin for CpuAllocator
impl UnsafeUnpin for CpuAllocator
impl UnwindSafe for CpuAllocator
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