Rerun C++ SDK
|
Datatype: The underlying storage for a 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 |
TensorBuffer (Collection< uint8_t > u8) | |
Construct a TensorBuffer from a Collection<uint8_t> . | |
TensorBuffer (Collection< uint16_t > u16) | |
Construct a TensorBuffer from a Collection<uint16_t> . | |
TensorBuffer (Collection< uint32_t > u32) | |
Construct a TensorBuffer from a Collection<uint32_t> . | |
TensorBuffer (Collection< uint64_t > u64) | |
Construct a TensorBuffer from a Collection<uint64_t> . | |
TensorBuffer (Collection< int8_t > i8) | |
Construct a TensorBuffer from a Collection<int8_t> . | |
TensorBuffer (Collection< int16_t > i16) | |
Construct a TensorBuffer from a Collection<int16_t> . | |
TensorBuffer (Collection< int32_t > i32) | |
Construct a TensorBuffer from a Collection<int32_t> . | |
TensorBuffer (Collection< int64_t > i64) | |
Construct a TensorBuffer from a Collection<int64_t> . | |
TensorBuffer (Collection< rerun::half > f16) | |
Construct a TensorBuffer from a Collection<half> . | |
TensorBuffer (Collection< float > f32) | |
Construct a TensorBuffer from a Collection<float> . | |
TensorBuffer (Collection< double > f64) | |
Construct a TensorBuffer from a Collection<double> . | |
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 |
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 . | |
const rerun::Collection< uint8_t > * | get_jpeg () const |
Return a pointer to jpeg if the union is in that state, otherwise nullptr . | |
const rerun::Collection< uint8_t > * | get_nv12 () const |
Return a pointer to nv12 if the union is in that state, otherwise nullptr . | |
Static Public Member Functions | |
static TensorBuffer | u8 (rerun::Collection< uint8_t > u8) |
static TensorBuffer | u16 (rerun::Collection< uint16_t > u16) |
static TensorBuffer | u32 (rerun::Collection< uint32_t > u32) |
static TensorBuffer | u64 (rerun::Collection< uint64_t > u64) |
static TensorBuffer | i8 (rerun::Collection< int8_t > i8) |
static TensorBuffer | i16 (rerun::Collection< int16_t > i16) |
static TensorBuffer | i32 (rerun::Collection< int32_t > i32) |
static TensorBuffer | i64 (rerun::Collection< int64_t > i64) |
static TensorBuffer | f16 (rerun::Collection< rerun::half > f16) |
static TensorBuffer | f32 (rerun::Collection< float > f32) |
static TensorBuffer | f64 (rerun::Collection< double > f64) |
static TensorBuffer | jpeg (rerun::Collection< uint8_t > jpeg) |
static TensorBuffer | nv12 (rerun::Collection< uint8_t > nv12) |
Datatype: The underlying storage for a 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 JPEG buffers.