Trait BackendStorage
pub trait BackendStorage:
Clone
+ Send
+ Sync
+ 'static {
// Required methods
fn dtype(&self) -> DType;
fn len(&self) -> usize;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
Re-export core types. A storage buffer that holds tensor data on a specific device.
For CPU, this is a Vec<f32> (or enum over dtypes).
For CUDA, this is a device memory allocation (CudaSlice).
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".