DeviceStorageStatic

Trait DeviceStorageStatic 

Source
pub trait DeviceStorageStatic: DeviceStorage {
    // Required methods
    fn new(data: Vec<f32>, shape: Vec<usize>) -> Self;
    fn new_with_stride(
        data: Vec<f32>,
        shape: Vec<usize>,
        stride: Vec<usize>,
    ) -> Self;
    fn create(
        data: Arc<RwLock<Vec<f32>>>,
        shape: Vec<usize>,
        stride: Vec<usize>,
    ) -> Self;
    fn compute_strides(shape: &Vec<usize>) -> Vec<usize>;
}

Required Methods§

Source

fn new(data: Vec<f32>, shape: Vec<usize>) -> Self

Source

fn new_with_stride( data: Vec<f32>, shape: Vec<usize>, stride: Vec<usize>, ) -> Self

Source

fn create( data: Arc<RwLock<Vec<f32>>>, shape: Vec<usize>, stride: Vec<usize>, ) -> Self

Source

fn compute_strides(shape: &Vec<usize>) -> Vec<usize>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§