Struct burn::backend::wgpu::WgpuStorage
pub struct WgpuStorage { /* private fields */ }
Expand description
Buffer storage for wgpu.
Implementations§
§impl WgpuStorage
impl WgpuStorage
Keeps actual wgpu buffer references in a hashmap with ids as key.
pub fn new(device: Arc<Device>) -> WgpuStorage
pub fn new(device: Arc<Device>) -> WgpuStorage
Create a new storage on the given device.
pub fn perform_deallocations(&mut self)
pub fn perform_deallocations(&mut self)
Actually deallocates buffers tagged to be deallocated.
Trait Implementations§
§impl ComputeStorage for WgpuStorage
impl ComputeStorage for WgpuStorage
§type Resource = WgpuResource
type Resource = WgpuResource
The resource associated type determines the way data is implemented and how
it can be accessed by kernels.
§fn get(
&mut self,
handle: &StorageHandle,
) -> <WgpuStorage as ComputeStorage>::Resource
fn get( &mut self, handle: &StorageHandle, ) -> <WgpuStorage as ComputeStorage>::Resource
Returns the underlying resource for a specified storage handle
Auto Trait Implementations§
impl Freeze for WgpuStorage
impl !RefUnwindSafe for WgpuStorage
impl Send for WgpuStorage
impl Sync for WgpuStorage
impl Unpin for WgpuStorage
impl !UnwindSafe for WgpuStorage
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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