Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::components::TensorData Struct Reference

Component: An N-dimensional array of numbers. More...

#include <rerun/components/tensor_data.hpp>

Public Member Functions

 TensorData (rerun::Collection< rerun::datatypes::TensorDimension > shape, rerun::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.
 
 TensorData (rerun::datatypes::TensorData data_)
 
TensorDataoperator= (rerun::datatypes::TensorData data_)
 
 operator rerun::datatypes::TensorData () const
 Cast to the underlying TensorData datatype.
 

Public Attributes

rerun::datatypes::TensorData data
 

Detailed Description

Component: 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.

Constructor & Destructor Documentation

◆ TensorData() [1/2]

rerun::components::TensorData::TensorData ( rerun::Collection< rerun::datatypes::TensorDimension shape,
rerun::datatypes::TensorBuffer  buffer 
)
inline

New tensor data from shape and tensor buffer.

Parameters
shapeShape of the tensor.
bufferThe tensor buffer containing the tensor's data.

◆ TensorData() [2/2]

template<typename TElement >
rerun::components::TensorData::TensorData ( Collection< datatypes::TensorDimension shape,
const TElement *  data_ 
)
inlineexplicit

New tensor data from dimensions and pointer to tensor data.

Type must be one of the types supported by rerun::datatypes::TensorData.

Parameters
shapeShape of the tensor. Determines the number of elements expected to be in data_.
data_Target of the pointer must outlive the archetype.

The documentation for this struct was generated from the following file: