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 "../indicator_component.hpp"
12#include "../result.hpp"
57 std::optional<ComponentBatch>
data;
73 static constexpr const char IndicatorComponentName[] =
"rerun.components.TensorIndicator";
78 static constexpr const char ArchetypeName[] =
"rerun.archetypes.Tensor";
92 RR_DISABLE_MAYBE_UNINITIALIZED_PUSH
98 RR_DISABLE_MAYBE_UNINITIALIZED_POP
107 template <
typename TElement>
143 return std::move(*
this);
152 return std::move(*
this);
169 return std::move(*
this);
180 return std::move(*
this);
204 template <
typename T>
209 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=rerun::Loggable< T >::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:14
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:55
RR_DISABLE_MAYBE_UNINITIALIZED_PUSH Tensor(Collection< uint64_t > shape, datatypes::TensorBuffer buffer)
New Tensor from dimensions and tensor buffer.
Definition tensor.hpp:95
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:176
static constexpr auto Descriptor_value_range
ComponentDescriptor for the value_range field.
Definition tensor.hpp:86
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:108
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:150
static Tensor update_fields()
Update only some specific fields of a Tensor.
Definition tensor.hpp:133
Tensor with_data(const rerun::components::TensorData &_data) &&
The tensor data.
Definition tensor.hpp:141
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:166
std::optional< ComponentBatch > value_range
The expected range of values.
Definition tensor.hpp:70
std::optional< ComponentBatch > data
The tensor data.
Definition tensor.hpp:57
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition tensor.hpp:78
static constexpr auto Descriptor_data
ComponentDescriptor for the data field.
Definition tensor.hpp:81
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32
Component: An N-dimensional array of numbers.
Definition tensor_data.hpp:23
Component: Range of expected or valid values, specifying a lower and upper bound.
Definition value_range.hpp:16
Datatype: The underlying storage for archetypes::Tensor.
Definition tensor_buffer.hpp:99
Datatype: An N-dimensional array of numbers.
Definition tensor_data.hpp:31