Struct burn_wgpu::compute::WgpuServer
source · pub struct WgpuServer<MM: MemoryManagement<WgpuStorage>> { /* private fields */ }Expand description
Wgpu compute server.
Implementations§
source§impl<MM> WgpuServer<MM>where
MM: MemoryManagement<WgpuStorage>,
impl<MM> WgpuServer<MM>where MM: MemoryManagement<WgpuStorage>,
Trait Implementations§
source§impl<MM> ComputeServer for WgpuServer<MM>where
MM: MemoryManagement<WgpuStorage>,
impl<MM> ComputeServer for WgpuServer<MM>where MM: MemoryManagement<WgpuStorage>,
source§fn create(&mut self, data: &[u8]) -> Handle<Self>
fn create(&mut self, data: &[u8]) -> Handle<Self>
When we create a new handle from existing data, we use custom allocations so that we don’t have to execute the current pending tasks.
This is important, otherwise the compute passes are going to be too small and we won’t be able to fully utilize the GPU.
§type Storage = WgpuStorage
type Storage = WgpuStorage
The storage type defines how data is stored and accessed.
§type MemoryManagement = MM
type MemoryManagement = MM
The memory management type defines strategies for allocation in the storage type.
§type AutotuneKey = WgpuAutotuneKey
type AutotuneKey = WgpuAutotuneKey
The key used to cache operations used on specific inputs in autotune
source§fn read(&mut self, handle: &Handle<Self>) -> Reader<Vec<u8>>
fn read(&mut self, handle: &Handle<Self>) -> Reader<Vec<u8>>
Given a handle, returns the owned resource as bytes.
source§fn empty(&mut self, size: usize) -> Handle<Self>
fn empty(&mut self, size: usize) -> Handle<Self>
Reserves
size bytes in the storage, and returns a handle over them.source§impl<MM: Debug + MemoryManagement<WgpuStorage>> Debug for WgpuServer<MM>
impl<MM: Debug + MemoryManagement<WgpuStorage>> Debug for WgpuServer<MM>
Auto Trait Implementations§
impl<MM> !RefUnwindSafe for WgpuServer<MM>
impl<MM> Send for WgpuServer<MM>
impl<MM> Sync for WgpuServer<MM>where MM: Sync, <MM as MemoryManagement<WgpuStorage>>::Handle: Sync,
impl<MM> Unpin for WgpuServer<MM>where MM: Unpin, <MM as MemoryManagement<WgpuStorage>>::Handle: Unpin,
impl<MM> !UnwindSafe for WgpuServer<MM>
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