pub struct NdTensorInput {
pub tensor_id: String,
pub representation_id: RepresentationId,
pub container: String,
pub dtype: NdTensorDType,
pub shape: Vec<usize>,
pub observation_ids: Vec<ObservationId>,
pub sample_ids: Option<Vec<SampleId>>,
pub data: Vec<u8>,
pub row_presence: Option<Vec<bool>>,
}Expand description
A canonical (contiguous row-major) N-D tensor handed to the store. The C ABI layer copies any strided borrowed input into this shape before calling in.
Fields§
§tensor_id: String§representation_id: RepresentationId§container: String§dtype: NdTensorDType§shape: Vec<usize>Full shape; shape[0] is the sample/observation axis.
observation_ids: Vec<ObservationId>One id per axis-0 row; len == shape[0].
sample_ids: Option<Vec<SampleId>>Optional advisory sample ids (validated for length only; the authoritative sample mapping comes from the coordinator relations at export time).
data: Vec<u8>Contiguous row-major bytes; len == product(shape) * dtype.element_size().
Multibyte elements (F64/F32/I32) MUST be encoded little-endian.
This layer copies the bytes verbatim and never reinterprets them as
native-endian values, so the byte order is part of the input contract,
not something the layer can fix up. The content fingerprint hashes these
bytes as-is; pinning little-endian here is what makes the fingerprint
platform-independent (a big-endian host must canonicalize to LE before
constructing the input).
row_presence: Option<Vec<bool>>Optional per-axis-0-row presence mask; len == shape[0].
Trait Implementations§
Source§impl Clone for NdTensorInput
impl Clone for NdTensorInput
Source§fn clone(&self) -> NdTensorInput
fn clone(&self) -> NdTensorInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NdTensorInput
impl Debug for NdTensorInput
Source§impl PartialEq for NdTensorInput
impl PartialEq for NdTensorInput
Source§fn eq(&self, other: &NdTensorInput) -> bool
fn eq(&self, other: &NdTensorInput) -> bool
self and other values to be equal, and is used by ==.