Rerun C++ SDK
|
Datatype: The underlying storage for archetypes::Tensor
.
More...
#include <rerun/datatypes/tensor_buffer.hpp>
Public Member Functions | |
TensorBuffer (const TensorBuffer &other) | |
Copy constructor. | |
TensorBuffer & | operator= (const TensorBuffer &other) noexcept |
TensorBuffer (TensorBuffer &&other) noexcept | |
TensorBuffer & | operator= (TensorBuffer &&other) noexcept |
template<typename TContainer , typename value_type = traits::value_type_of_t<TContainer>> | |
TensorBuffer (TContainer &&container) | |
Construct a TensorBuffer from any container type that has a value_type member and for which a rerun::ContainerAdapter exists. | |
size_t | num_elems () const |
Number of elements in the buffer. | |
void | swap (TensorBuffer &other) noexcept |
TensorBuffer (rerun::Collection< uint8_t > u8) | |
8bit unsigned integer. | |
TensorBuffer (rerun::Collection< uint16_t > u16) | |
16bit unsigned integer. | |
TensorBuffer (rerun::Collection< uint32_t > u32) | |
32bit unsigned integer. | |
TensorBuffer (rerun::Collection< uint64_t > u64) | |
64bit unsigned integer. | |
TensorBuffer (rerun::Collection< int8_t > i8) | |
8bit signed integer. | |
TensorBuffer (rerun::Collection< int16_t > i16) | |
16bit signed integer. | |
TensorBuffer (rerun::Collection< int32_t > i32) | |
32bit signed integer. | |
TensorBuffer (rerun::Collection< int64_t > i64) | |
64bit signed integer. | |
TensorBuffer (rerun::Collection< rerun::half > f16) | |
16bit IEEE-754 floating point, also known as half . | |
TensorBuffer (rerun::Collection< float > f32) | |
32bit IEEE-754 floating point, also known as float or single . | |
TensorBuffer (rerun::Collection< double > f64) | |
64bit IEEE-754 floating point, also known as double . | |
const rerun::Collection< uint8_t > * | get_u8 () const |
Return a pointer to u8 if the union is in that state, otherwise nullptr . | |
const rerun::Collection< uint16_t > * | get_u16 () const |
Return a pointer to u16 if the union is in that state, otherwise nullptr . | |
const rerun::Collection< uint32_t > * | get_u32 () const |
Return a pointer to u32 if the union is in that state, otherwise nullptr . | |
const rerun::Collection< uint64_t > * | get_u64 () const |
Return a pointer to u64 if the union is in that state, otherwise nullptr . | |
const rerun::Collection< int8_t > * | get_i8 () const |
Return a pointer to i8 if the union is in that state, otherwise nullptr . | |
const rerun::Collection< int16_t > * | get_i16 () const |
Return a pointer to i16 if the union is in that state, otherwise nullptr . | |
const rerun::Collection< int32_t > * | get_i32 () const |
Return a pointer to i32 if the union is in that state, otherwise nullptr . | |
const rerun::Collection< int64_t > * | get_i64 () const |
Return a pointer to i64 if the union is in that state, otherwise nullptr . | |
const rerun::Collection< rerun::half > * | get_f16 () const |
Return a pointer to f16 if the union is in that state, otherwise nullptr . | |
const rerun::Collection< float > * | get_f32 () const |
Return a pointer to f32 if the union is in that state, otherwise nullptr . | |
const rerun::Collection< double > * | get_f64 () const |
Return a pointer to f64 if the union is in that state, otherwise nullptr . | |
Static Public Member Functions | |
static TensorBuffer | u8 (rerun::Collection< uint8_t > u8) |
8bit unsigned integer. | |
static TensorBuffer | u16 (rerun::Collection< uint16_t > u16) |
16bit unsigned integer. | |
static TensorBuffer | u32 (rerun::Collection< uint32_t > u32) |
32bit unsigned integer. | |
static TensorBuffer | u64 (rerun::Collection< uint64_t > u64) |
64bit unsigned integer. | |
static TensorBuffer | i8 (rerun::Collection< int8_t > i8) |
8bit signed integer. | |
static TensorBuffer | i16 (rerun::Collection< int16_t > i16) |
16bit signed integer. | |
static TensorBuffer | i32 (rerun::Collection< int32_t > i32) |
32bit signed integer. | |
static TensorBuffer | i64 (rerun::Collection< int64_t > i64) |
64bit signed integer. | |
static TensorBuffer | f16 (rerun::Collection< rerun::half > f16) |
16bit IEEE-754 floating point, also known as half . | |
static TensorBuffer | f32 (rerun::Collection< float > f32) |
32bit IEEE-754 floating point, also known as float or single . | |
static TensorBuffer | f64 (rerun::Collection< double > f64) |
64bit IEEE-754 floating point, also known as double . | |
Datatype: The underlying storage for archetypes::Tensor
.
Tensor elements are stored in a contiguous buffer of a single type.
|
inline |
Construct a TensorBuffer
from any container type that has a value_type
member and for which a rerun::ContainerAdapter
exists.
This constructor assumes the type of tensor buffer you want to use is defined by TContainer::value_type
and then forwards the argument as-is to the appropriate rerun::Container
constructor.
size_t rerun::datatypes::TensorBuffer::num_elems | ( | ) | const |
Number of elements in the buffer.
You may NOT call this for NV12 or YUY2.