Expand description
Small, runtime-independent tensor descriptors and CPU storage views.
Shape, element strides, byte offset, device, and ownership are explicit. This crate never uploads, downloads, or otherwise migrates storage. DLPack FFI and image bridges are additive features built on this data model.
Structs§
- Data
Type - Scalar category, bit width, and vector lane count.
- Device
- Device category and backend-local ordinal.
- Dlpack
Export - Owner for a versioned DLPack managed tensor exported without copying CPU data.
- Dlpack
Import - Validated owner of a DLPack producer’s managed tensor.
- Dlpack
Legacy Export - Owner for a legacy DLPack managed tensor exported without copying CPU data.
- Tensor
Buffer - Owned host allocation paired with a validated tensor descriptor.
- Tensor
Descriptor - Shape, element strides, type, offset, and device for one tensor.
- Tensor
View - Lifetime-bound, zero-copy view of host-accessible tensor storage.
Enums§
- Data
Type Code - DLPack-compatible scalar category without depending on a runtime header.
- Device
Kind - Device category represented independently of any execution backend.
- Dlpack
Error - Errors raised while validating a DLPack managed tensor.
- Ownership
- Whether a tensor object owns or borrows its backing allocation.
- Spatial
Tensor Bridge Error - Errors raised while exposing a point-cloud column as a generic tensor.
- Tensor
Error - Tensor construction and layout errors.
Constants§
- DLPACK_
MAJOR - DLPack ABI major version supported by this boundary.
- DLPACK_
MINOR - Baseline DLPack minor version emitted by this boundary.
Traits§
- Host
Tensor Storage - Runtime-owned, host-accessible storage retained without a runtime dependency.
- Tensor
Element - A native-endian scalar that has a stable tensor dtype and no invalid bit patterns.
Functions§
- interleaved_
image_ view - Borrows a packed interleaved image as a zero-copy
[height, width, channels]tensor. - pack_
interleaved_ image - Explicitly packs a possibly strided interleaved image view into an owned HWC tensor.
- pack_
planar_ image - Explicitly packs a possibly strided planar image view into an owned CHW tensor.
- planar_
image_ view - Borrows a packed planar image as a zero-copy
[channels, height, width]tensor. - release_
dlpack_ ⚠legacy_ raw - Calls the producer deleter for a legacy raw pointer.
- release_
dlpack_ ⚠raw - Calls the producer deleter for a raw pointer previously returned by
DlpackExport::into_raw. - spatial_
f32_ field_ view - Borrows one
f32point field as a zero-copy[point_count]CPU tensor.