Skip to main content

Crate spatialrust_tensor

Crate spatialrust_tensor 

Source
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§

DataType
Scalar category, bit width, and vector lane count.
Device
Device category and backend-local ordinal.
DlpackExport
Owner for a versioned DLPack managed tensor exported without copying CPU data.
DlpackImport
Validated owner of a DLPack producer’s managed tensor.
DlpackLegacyExport
Owner for a legacy DLPack managed tensor exported without copying CPU data.
TensorBuffer
Owned host allocation paired with a validated tensor descriptor.
TensorDescriptor
Shape, element strides, type, offset, and device for one tensor.
TensorView
Lifetime-bound, zero-copy view of host-accessible tensor storage.

Enums§

DataTypeCode
DLPack-compatible scalar category without depending on a runtime header.
DeviceKind
Device category represented independently of any execution backend.
DlpackError
Errors raised while validating a DLPack managed tensor.
Ownership
Whether a tensor object owns or borrows its backing allocation.
SpatialTensorBridgeError
Errors raised while exposing a point-cloud column as a generic tensor.
TensorError
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§

HostTensorStorage
Runtime-owned, host-accessible storage retained without a runtime dependency.
TensorElement
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 f32 point field as a zero-copy [point_count] CPU tensor.