6#include "../collection.hpp"
7#include "../component_batch.hpp"
8#include "../component_column.hpp"
9#include "../components/tensor_data.hpp"
10#include "../components/value_range.hpp"
11#include "../result.hpp"
56 std::optional<ComponentBatch>
data;
73 static constexpr const char ArchetypeName[] =
"rerun.archetypes.Tensor";
86 RR_DISABLE_MAYBE_UNINITIALIZED_PUSH
92 RR_DISABLE_MAYBE_UNINITIALIZED_POP
101 template <
typename TElement>
137 return std::move(*
this);
146 return std::move(*
this);
163 return std::move(*
this);
174 return std::move(*
this);
198 template <
typename T>
203 struct AsComponents<archetypes::
Tensor> {
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
A class for representing either a usable value, or an error.
Definition result.hpp:14
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:76
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Arrow-encoded data of a single batch of components together with a component descriptor.
Definition component_batch.hpp:28
static Result< ComponentBatch > from_loggable(const rerun::Collection< T > &components, const ComponentDescriptor &descriptor)
Creates a new component batch from a collection of component instances.
Definition component_batch.hpp:46
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:16
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Archetype: An N-dimensional array of numbers.
Definition tensor.hpp:54
RR_DISABLE_MAYBE_UNINITIALIZED_PUSH Tensor(Collection< uint64_t > shape, datatypes::TensorBuffer buffer)
New Tensor from dimensions and tensor buffer.
Definition tensor.hpp:89
Tensor with_many_value_range(const Collection< rerun::components::ValueRange > &_value_range) &&
This method makes it possible to pack multiple value_range in a single component batch.
Definition tensor.hpp:170
static constexpr auto Descriptor_value_range
ComponentDescriptor for the value_range field.
Definition tensor.hpp:80
static Tensor clear_fields()
Clear all the fields of a Tensor.
RR_DISABLE_MAYBE_UNINITIALIZED_POP Tensor(Collection< uint64_t > shape, const TElement *data_)
New tensor from dimensions and pointer to tensor data.
Definition tensor.hpp:102
Tensor with_many_data(const Collection< rerun::components::TensorData > &_data) &&
This method makes it possible to pack multiple data in a single component batch.
Definition tensor.hpp:144
static Tensor update_fields()
Update only some specific fields of a Tensor.
Definition tensor.hpp:127
Tensor with_data(const rerun::components::TensorData &_data) &&
The tensor data.
Definition tensor.hpp:135
Tensor with_dim_names(Collection< std::string > names) &&
Update the names of the contained TensorData dimensions.
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
Tensor with_value_range(const rerun::components::ValueRange &_value_range) &&
The expected range of values.
Definition tensor.hpp:160
std::optional< ComponentBatch > value_range
The expected range of values.
Definition tensor.hpp:69
std::optional< ComponentBatch > data
The tensor data.
Definition tensor.hpp:56
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition tensor.hpp:73
static constexpr auto Descriptor_data
ComponentDescriptor for the data field.
Definition tensor.hpp:76
Component: An N-dimensional array of numbers.
Definition tensor_data.hpp:22
Component: Range of expected or valid values, specifying a lower and upper bound.
Definition value_range.hpp:18
Datatype: The underlying storage for archetypes::Tensor.
Definition tensor_buffer.hpp:98
Datatype: An N-dimensional array of numbers.
Definition tensor_data.hpp:30