DeviceBuffer

Trait DeviceBuffer 

Source
pub trait DeviceBuffer:
    'static
    + Send
    + Sync
    + Debug
    + DynEq
    + DynHash {
    // Required methods
    fn len(&self) -> usize;
    fn to_host(self: Arc<Self>) -> VortexResult<ByteBuffer>;

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

A buffer that is stored on a device (e.g. GPU).

Required Methods§

Source

fn len(&self) -> usize

Returns the length of the buffer in bytes.

Source

fn to_host(self: Arc<Self>) -> VortexResult<ByteBuffer>

Attempts to copy the device buffer to a host ByteBuffer.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns true if the buffer is empty.

Trait Implementations§

Source§

impl Hash for dyn DeviceBuffer

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl PartialEq for dyn DeviceBuffer

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for dyn DeviceBuffer

Implementors§