Skip to navigation

holoscan::schema::create_tensor_metadata

Beta
View as MarkdownOpen in Claude
HOLOSCAN_SCHEMA_EXPORT expected<flatbuffers::Offset<Tensor>, Error> holoscan::schema::create_tensor_metadata(
flatbuffers::FlatBufferBuilder &builder,
const holoscan::Tensor &tensor
) noexcept

Add a metadata-only Tensor table to a FlatBuffer builder.

The returned table contains shape, dtype, device, rank, and optional DLPack strides. Its data vector is always absent, including while a WithTensorMaterialization or WithTensorGather scope is active. The caller owns the builder and therefore controls its storage bound and enclosing FlatBuffer root.

Returns: Tensor table offset on success, or Error for invalid metadata or exhausted builder storage.

Parameters

builder
flatbuffers::FlatBufferBuilder &

FlatBuffer builder that will own the returned table.

tensor
const holoscan::Tensor &

Tensor whose read-only metadata is serialized.