pub struct ThreadSafeMetalBackend { /* private fields */ }Expand description
Thread-safe Metal backend wrapper
Implementations§
Source§impl ThreadSafeMetalBackend
impl ThreadSafeMetalBackend
pub fn new(config: MetalConfig) -> Result<Self, MetalError>
pub fn allocate( &self, size: usize, memory_type: MetalMemoryType, ) -> Result<*mut c_void, MetalError>
pub fn free( &self, ptr: *mut c_void, memory_type: MetalMemoryType, ) -> Result<(), MetalError>
pub fn get_stats(&self) -> MetalStats
Auto Trait Implementations§
impl Freeze for ThreadSafeMetalBackend
impl RefUnwindSafe for ThreadSafeMetalBackend
impl Send for ThreadSafeMetalBackend
impl Sync for ThreadSafeMetalBackend
impl Unpin for ThreadSafeMetalBackend
impl UnwindSafe for ThreadSafeMetalBackend
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