Rerun C++ SDK
|
Datatype: An N-dimensional array of numbers. More...
#include <rerun/datatypes/tensor_data.hpp>
Public Member Functions | |
TensorData (Collection< rerun::datatypes::TensorDimension > shape_, datatypes::TensorBuffer buffer_) | |
New tensor data from shape and tensor buffer. | |
template<typename TElement > | |
TensorData (Collection< datatypes::TensorDimension > shape_, const TElement *data) | |
New tensor data from dimensions and pointer to tensor data. | |
Public Attributes | |
rerun::Collection< rerun::datatypes::TensorDimension > | shape |
The shape of the tensor, including optional names for each dimension. | |
rerun::datatypes::TensorBuffer | buffer |
The content/data. | |
Datatype: An N-dimensional array of numbers.
The number of dimensions and their respective lengths is specified by the shape
field. The dimensions are ordered from outermost to innermost. For example, in the common case of a 2D RGB Image, the shape would be [height, width, channel]
.
These dimensions are combined with an index to look up values from the buffer
field, which stores a contiguous array of typed values.
|
inline |
New tensor data from shape and tensor buffer.
shape_ | Shape of the tensor. |
buffer_ | The tensor buffer containing the tensor's data. |
|
inlineexplicit |
New tensor data from dimensions and pointer to tensor data.
Type must be one of the types supported by rerun::datatypes::TensorData
.
shape_ | Shape of the tensor. Determines the number of elements expected to be in data . |
data | Target of the pointer must outlive the archetype. |