pub trait DeviceElement:
CudfType
+ Copy
+ 'static {
const DLPACK_CODE: u8;
const DLPACK_BITS: u8;
const INTEROP_TYPE: InteropTypeId;
// Provided methods
fn valid_native_input(_values: &[Self]) -> bool { ... }
fn validate_native_buffer(
_buffer: &CudfDeviceBuffer,
_operation: &'static str,
) -> Result<()> { ... }
}Expand description
Element type of a cuVS device buffer or tensor.
Implemented for f32, f64, i8, u8, i32, and i64. The sealed supertrait
CudfType restricts implementations to this crate.
Required Associated Constants§
Sourceconst DLPACK_CODE: u8
const DLPACK_CODE: u8
DLPack type code used, with DLPACK_BITS and one
lane, to describe tensors of this element to cuVS.
Sourceconst DLPACK_BITS: u8
const DLPACK_BITS: u8
DLPack element width in bits.
Sourceconst INTEROP_TYPE: InteropTypeId
const INTEROP_TYPE: InteropTypeId
RAPIDS interop type a prepared cuDF column must carry to be read as a tensor of this element.
Provided Methods§
Sourcefn valid_native_input(_values: &[Self]) -> bool
fn valid_native_input(_values: &[Self]) -> bool
Returns whether host values are valid native cuVS input.
Floating elements require finite values; integer elements accept every value.
fn validate_native_buffer( _buffer: &CudfDeviceBuffer, _operation: &'static str, ) -> Result<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".