pub struct WgpuResidentStorage { /* private fields */ }Expand description
Resident storage that records a validated wgpu pipeline result.
Implementations§
Source§impl WgpuResidentStorage
impl WgpuResidentStorage
Sourcepub fn new(
site: Symbol,
allocation: WgpuArenaAllocation,
pipeline: Symbol,
segments: Vec<WgpuResidentSegment>,
shape: Vec<usize>,
dtype: Symbol,
cells: Arc<[Value]>,
) -> Self
pub fn new( site: Symbol, allocation: WgpuArenaAllocation, pipeline: Symbol, segments: Vec<WgpuResidentSegment>, shape: Vec<usize>, dtype: Symbol, cells: Arc<[Value]>, ) -> Self
Builds resident storage around host-equivalent cells.
Sourcepub fn allocation(&self) -> &WgpuArenaAllocation
pub fn allocation(&self) -> &WgpuArenaAllocation
Returns the resident allocation.
Sourcepub fn segments(&self) -> &[WgpuResidentSegment]
pub fn segments(&self) -> &[WgpuResidentSegment]
Returns the segmented resident layout.
Sourcepub fn resident_tensor(&self) -> Option<Tensor>
pub fn resident_tensor(&self) -> Option<Tensor>
Rebuilds a canonical tensor without counting a user materialization.
Trait Implementations§
Source§impl TensorStorage for WgpuResidentStorage
impl TensorStorage for WgpuResidentStorage
Source§fn location(&self) -> TensorLocation
fn location(&self) -> TensorLocation
The current storage placement.
Source§fn materialize(&self) -> Result<Arc<dyn TensorStorage>>
fn materialize(&self) -> Result<Arc<dyn TensorStorage>>
Returns a host-observable form of this storage. Read more
Auto Trait Implementations§
impl !Freeze for WgpuResidentStorage
impl !RefUnwindSafe for WgpuResidentStorage
impl !UnwindSafe for WgpuResidentStorage
impl Send for WgpuResidentStorage
impl Sync for WgpuResidentStorage
impl Unpin for WgpuResidentStorage
impl UnsafeUnpin for WgpuResidentStorage
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