Rerun C++ SDK
Loading...
Searching...
No Matches
tensor_width_dimension.hpp
1// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/store/re_types/definitions/rerun/components/tensor_dimension_selection.fbs".
3
4#pragma once
5
6#include "../datatypes/tensor_dimension_selection.hpp"
7#include "../result.hpp"
8
9#include <cstdint>
10#include <memory>
11
12namespace rerun::components {
13 /// **Component**: Specifies which dimension to use for width.
16
17 public:
18 TensorWidthDimension() = default;
19
21 : dimension(dimension_) {}
22
24 dimension = dimension_;
25 return *this;
26 }
27
28 /// Cast to the underlying TensorDimensionSelection datatype
30 return dimension;
31 }
32 };
33} // namespace rerun::components
34
35namespace rerun {
36 static_assert(
38 sizeof(components::TensorWidthDimension)
39 );
40
41 /// \private
42 template <>
43 struct Loggable<components::TensorWidthDimension> {
44 static constexpr const char Name[] = "rerun.components.TensorWidthDimension";
45
46 /// Returns the arrow data type this type corresponds to.
47 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
48 return Loggable<rerun::datatypes::TensorDimensionSelection>::arrow_datatype();
49 }
50
51 /// Serializes an array of `rerun::components::TensorWidthDimension` into an arrow array.
52 static Result<std::shared_ptr<arrow::Array>> to_arrow(
53 const components::TensorWidthDimension* instances, size_t num_instances
54 ) {
55 return Loggable<rerun::datatypes::TensorDimensionSelection>::to_arrow(
56 &instances->dimension,
57 num_instances
58 );
59 }
60 };
61} // namespace rerun
All built-in components. See Types in the Rerun manual.
Definition rerun.hpp:75
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Component: Specifies which dimension to use for width.
Definition tensor_width_dimension.hpp:14
Datatype: Selection of a single tensor dimension.
Definition tensor_dimension_selection.hpp:19