Skip to main content

DeviceSlice

Trait DeviceSlice 

Source
pub trait DeviceSlice<T> {
    // Required methods
    fn len(&self) -> usize;
    fn stream(&self) -> &Arc<CudaStream>;

    // Provided methods
    fn num_bytes(&self) -> usize { ... }
    fn is_empty(&self) -> bool { ... }
}
Expand description

Base trait for abstracting over CudaSlice/CudaView/CudaViewMut.

Don’t use this directly - use DevicePtr/DevicePtrMut.

Required Methods§

Source

fn len(&self) -> usize

Source

fn stream(&self) -> &Arc<CudaStream>

Provided Methods§

Source

fn num_bytes(&self) -> usize

Source

fn is_empty(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§