Rerun C++ SDK
Loading...
Searching...
No Matches
channel_datatype.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/datatypes/channel_datatype.fbs".
3
4#pragma once
5
6#include "../result.hpp"
7
8#include <cstdint>
9#include <memory>
10
11namespace arrow {
12 /// \private
13 template <typename T>
14 class NumericBuilder;
15
16 class Array;
17 class DataType;
18 class UInt8Type;
19 using UInt8Builder = NumericBuilder<UInt8Type>;
20} // namespace arrow
21
22namespace rerun::datatypes {
23 /// **Datatype**: The innermost datatype of an image.
24 ///
25 /// How individual color channel components are encoded.
26 enum class ChannelDatatype : uint8_t {
27
28 /// 8-bit unsigned integer.
29 U8 = 6,
30
31 /// 8-bit signed integer.
32 I8 = 7,
33
34 /// 16-bit unsigned integer.
35 U16 = 8,
36
37 /// 16-bit signed integer.
38 I16 = 9,
39
40 /// 32-bit unsigned integer.
41 U32 = 10,
42
43 /// 32-bit signed integer.
44 I32 = 11,
45
46 /// 64-bit unsigned integer.
47 U64 = 12,
48
49 /// 64-bit signed integer.
50 I64 = 13,
51
52 /// 16-bit IEEE-754 floating point, also known as `half`.
53 F16 = 33,
54
55 /// 32-bit IEEE-754 floating point, also known as `float` or `single`.
56 F32 = 34,
57
58 /// 64-bit IEEE-754 floating point, also known as `double`.
59 F64 = 35,
60 };
61} // namespace rerun::datatypes
62
63namespace rerun {
64 template <typename T>
65 struct Loggable;
66
67 /// \private
68 template <>
69 struct Loggable<datatypes::ChannelDatatype> {
70 static constexpr const char Name[] = "rerun.datatypes.ChannelDatatype";
71
72 /// Returns the arrow data type this type corresponds to.
73 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
74
75 /// Serializes an array of `rerun::datatypes::ChannelDatatype` into an arrow array.
76 static Result<std::shared_ptr<arrow::Array>> to_arrow(
77 const datatypes::ChannelDatatype* instances, size_t num_instances
78 );
79
80 /// Fills an arrow array builder with an array of this type.
81 static rerun::Error fill_arrow_array_builder(
82 arrow::UInt8Builder* builder, const datatypes::ChannelDatatype* elements,
83 size_t num_elements
84 );
85 };
86} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:79
ChannelDatatype
Datatype: The innermost datatype of an image.
Definition channel_datatype.hpp:26
@ F64
64-bit IEEE-754 floating point, also known as double.
@ U64
64-bit unsigned integer.
@ F32
32-bit IEEE-754 floating point, also known as float or single.
@ F16
16-bit IEEE-754 floating point, also known as half.
@ I8
8-bit signed integer.
@ U8
8-bit unsigned integer.
@ I16
16-bit signed integer.
@ U32
32-bit unsigned integer.
@ I32
32-bit signed integer.
@ I64
64-bit signed integer.
@ U16
16-bit unsigned integer.
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22