Implementation of TensorBase class.

Data Structures | |
| struct | DimData |
| Struct for storing dimension data. More... | |
Public Member Functions | |
| TensorBase (ChannelType type, const DimData *dimData, int dimCount, void *dataPtr, bool isCPU) | |
| Constructor of a non-owning tensor. More... | |
| TensorBase (ChannelType type, std::initializer_list< DimData > dimData, void *dataPtr, bool isCPU) | |
| Constructor of a non-owning tensor. More... | |
| TensorBase (ChannelType type, const DimData *dimData, int dimCount, bool isCPU) | |
| Constructor of a memory-owning tensor. More... | |
| TensorBase (ChannelType type, std::initializer_list< DimData > dimData, bool isCPU) | |
| Constructor of a memory-owning tensor. More... | |
| ~TensorBase () | |
| Destructor of Tensor. More... | |
| TensorBase (const TensorBase &)=delete | |
| TensorBase is non-copyable. More... | |
| TensorBase & | operator= (const TensorBase &)=delete |
| TensorBase is non-copyable. More... | |
| TensorBase (TensorBase &&) | |
| Move Constructor of TensorBase. More... | |
| TensorBase & | operator= (TensorBase &&) |
| Move operator of TensorBase. 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... | |
| void * | getData () const |
| Get the raw data pointer to 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... | |
Protected Member Functions | |
| TensorBase () | |
| cvcore::TensorBase::TensorBase | ( | ChannelType | type, |
| const DimData * | dimData, | ||
| int | dimCount, | ||
| void * | dataPtr, | ||
| bool | isCPU | ||
| ) |
| cvcore::TensorBase::TensorBase | ( | ChannelType | type, |
| std::initializer_list< DimData > | dimData, | ||
| void * | dataPtr, | ||
| bool | isCPU | ||
| ) |
| cvcore::TensorBase::TensorBase | ( | ChannelType | type, |
| const DimData * | dimData, | ||
| int | dimCount, | ||
| bool | isCPU | ||
| ) |
| cvcore::TensorBase::TensorBase | ( | ChannelType | type, |
| std::initializer_list< DimData > | dimData, | ||
| bool | isCPU | ||
| ) |
| cvcore::TensorBase::~TensorBase | ( | ) |
Destructor of Tensor.
|
delete |
TensorBase is non-copyable.
| cvcore::TensorBase::TensorBase | ( | TensorBase && | ) |
Move Constructor of TensorBase.
|
protected |
| void* cvcore::TensorBase::getData | ( | ) | const |
Get the raw data pointer to the Tensor.
Referenced by cvcore::detail::Tensor2D< CL, CT >::getData(), cvcore::detail::Tensor3D< CHW, CT >::getData(), and cvcore::detail::Tensor4D< DCHW, CT >::getData().
| std::size_t cvcore::TensorBase::getDataSize | ( | ) | const |
| int cvcore::TensorBase::getDimCount | ( | ) | const |
Get the dimension count of TensorBase.
| std::size_t cvcore::TensorBase::getSize | ( | int | dimIdx | ) | const |
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().
| std::size_t cvcore::TensorBase::getStride | ( | int | dimIdx | ) | const |
Get the stride of given dimension.
| dimIdx | dimension index. |
| ChannelType cvcore::TensorBase::getType | ( | ) | const |
| bool cvcore::TensorBase::isCPU | ( | ) | const |
| bool cvcore::TensorBase::isOwning | ( | ) | const |
|
delete |
TensorBase is non-copyable.
| TensorBase& cvcore::TensorBase::operator= | ( | TensorBase && | ) |
Move operator of TensorBase.