![]() |
LibraryLink Utilities
3.0.1
Modern C++ wrapper over LibraryLink and WSTP
|
Simple, light-weight, non-owning wrappper over MTensor.
Intended for use in functions that only need to access MTensor metadata, where it can alleviate the need for introducing template parameters for MTensor passing mode (like in GenericTensor) or data type (like in Tensor class).
Inheritance diagram for LLU::TensorView:
Collaboration diagram for LLU::TensorView:#include <Tensor.hpp>
Public Member Functions | |
| TensorView (const GenericTensor &gTen) | |
| Create a NumericArrayView from a GenericNumericArray. More... | |
| TensorView (MTensor mt) | |
| Create a NumericArrayView from a raw MNumericArray. More... | |
| mint | getRank () const override |
| Get rank. More... | |
| mint const * | getDimensions () const override |
| Get dimensions. More... | |
| mint | getFlattenedLength () const override |
| Get total length. More... | |
| mint | type () const final |
| Get the data type of this tensor. More... | |
| void * | rawData () const override |
| Get raw pointer to the data of this tensor. More... | |
|
inline |
Create a NumericArrayView from a GenericNumericArray.
| gTen | - a GenericNumericArray |
|
inline |
Create a NumericArrayView from a raw MNumericArray.
| mt | - a raw MNumericArray |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Get total length.
Implements LLU::TensorInterface.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Get raw pointer to the data of this tensor.
Implements LLU::TensorInterface.
|
inlinefinalvirtual |
Get the data type of this tensor.
Implements LLU::TensorInterface.