Implementation of 2D tensors.
TL | tensor layout type. |
CT | channel type. |
Public Member Functions | |
Tensor2D ()=default | |
Default Constructor. More... | |
Tensor2D (std::initializer_list< DimData > dimData, bool isCPU) | |
Constructor of a memory-owning 2D tensor. More... | |
Tensor2D (std::initializer_list< DimData > dimData, DataType *dataPtr, bool isCPU) | |
Constructor of a non-owning 2D tensor. More... | |
std::size_t | getLength () const |
Get the length of the 2D tensor. More... | |
std::size_t | getChannelCount () const |
Get the channel count of the 2D tensor. More... | |
std::size_t | getStride (TensorDimension dim) const |
Get the stride of the 2D tensor. More... | |
DataType * | getData () |
Get the raw data pointer to the 2D tensor. More... | |
const DataType * | getData () const |
Get the const raw data pointer to the 2D tensor. More... | |
std::size_t | getStride (int dimIdx) const |
Expose base getStride() function. More... | |
int | getDimCount () const |
Get the dimension count of TensorBase. More... | |
std::size_t | getSize (int dimIdx) const |
Get the size of given dimension. More... | |
std::size_t | getStride (int dimIdx) const |
Get the stride of given dimension. More... | |
ChannelType | getType () const |
Get the ChannelType of the Tensor. More... | |
std::size_t | getDataSize () const |
Get the total size of the Tensor in bytes. More... | |
bool | isCPU () const |
Get the flag whether the Tensor is allocated in CPU or GPU. More... | |
bool | isOwning () const |
Get the flag whether the Tensor owns the data. More... | |
|
default |
Default Constructor.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inherited |
|
inherited |
Get the dimension count of TensorBase.
|
inline |
|
inherited |
Get the size of given dimension.
dimIdx | dimension index. |
Referenced by cvcore::detail::Tensor2D< CL, CT >::getChannelCount(), cvcore::detail::Tensor3D< CHW, CT >::getChannelCount(), cvcore::detail::Tensor4D< DCHW, CT >::getChannelCount(), cvcore::detail::Tensor4D< DCHW, CT >::getDepth(), cvcore::detail::Tensor3D< CHW, CT >::getHeight(), cvcore::detail::Tensor4D< DCHW, CT >::getHeight(), cvcore::detail::Tensor2D< CL, CT >::getLength(), cvcore::detail::Tensor3D< CHW, CT >::getWidth(), and cvcore::detail::Tensor4D< DCHW, CT >::getWidth().
|
inherited |
Get the stride of given dimension.
dimIdx | dimension index. |
std::size_t cvcore::TensorBase::getStride |
Expose base getStride() function.
|
inline |
Get the stride of the 2D tensor.
dim | tensor dimension. |
Definition at line 442 of file Tensor.h.
Referenced by cvcore::detail::Tensor2D< CL, CT >::getStride().
|
inherited |
|
inherited |
|
inherited |