pub trait HostTensorStorage:
Any
+ Debug
+ Send
+ Sync {
// Required methods
fn dtype(&self) -> DataType;
fn allocation_bytes(&self) -> &[u8] ⓘ;
fn as_any(&self) -> &dyn Any;
}Expand description
Runtime-owned, host-accessible storage retained without a runtime dependency.
Backend crates use this boundary to keep an allocator or runtime value alive while exposing its stable CPU allocation. Implementations must keep the returned allocation address and length unchanged for their entire lifetime.
Required Methods§
Sourcefn allocation_bytes(&self) -> &[u8] ⓘ
fn allocation_bytes(&self) -> &[u8] ⓘ
Returns the complete host-accessible allocation.