TensorLayout Class Reference#
4 min read time
TensorLayout class. More...
#include <tensor_layout.hpp>
Public Member Functions | |
int32_t | batch_index () const |
Index of the batch dimension specified by layout. E.g. returns 0 for TENSOR_LAYOUT_NHWC. More... | |
int32_t | channels_index () const |
Index of the channels dimension specified by layout. E.g. returns 3 for TENSOR_LAYOUT_NHWC. More... | |
eTensorLayout | elayout () const |
Returns the layout enum stored in the TensorLayout object. More... | |
int32_t | height_index () const |
Index of the height dimension specified by layout. E.g. returns 1 for TENSOR_LAYOUT_NHWC. More... | |
int32_t | max_features_index () const |
Index of the max features dimension specified by layout. More... | |
bool | operator!= (const eTensorLayout &rhs) const |
bool | operator!= (const TensorLayout &rhs) const |
bool | operator== (const eTensorLayout &rhs) const |
bool | operator== (const TensorLayout &rhs) const |
int32_t | rank () const |
Returns the rank of the Tensor Layout object. More... | |
int32_t | sift_features_index () const |
Index of the sift features dimension specified by layout. More... | |
int32_t | sift_octave_layer_index () const |
Index of the sift octave layer dimension specified by layout. More... | |
TensorLayout (eTensorLayout layout) | |
Construct a new Tensor Layout object. More... | |
int32_t | width_index () const |
Index of the width dimension specified by layout. E.g. returns 2 for TENSOR_LAYOUT_NHWC. More... | |
Static Public Attributes | |
static const std::unordered_map< eTensorLayout, TensorLayoutDesc > | layoutDescriptorTable |
Provides descriptors for each feature of a specified layout type. More... | |
Detailed Description
TensorLayout class.
Constructor & Destructor Documentation
◆ TensorLayout()
|
inlineexplicit |
Construct a new Tensor Layout object.
- Parameters
-
[in] layout The desired layout of the TensorLayout object. See eTensorLayout for information on supported layouts.
Member Function Documentation
◆ batch_index()
|
inline |
Index of the batch dimension specified by layout. E.g. returns 0 for TENSOR_LAYOUT_NHWC.
- Returns
- Index or -1 if the layout does not have a batch dimension.
◆ channels_index()
|
inline |
Index of the channels dimension specified by layout. E.g. returns 3 for TENSOR_LAYOUT_NHWC.
- Returns
- Index of the channels dimension.
◆ elayout()
|
inline |
Returns the layout enum stored in the TensorLayout object.
- Returns
- eTensorLayout
◆ height_index()
|
inline |
Index of the height dimension specified by layout. E.g. returns 1 for TENSOR_LAYOUT_NHWC.
- Returns
- Index of the height dimension.
◆ max_features_index()
|
inline |
Index of the max features dimension specified by layout.
- Returns
- Index of the max features dimension or -1 if the layout does not contain it.
◆ operator!=() [1/2]
|
inline |
◆ operator!=() [2/2]
|
inline |
◆ operator==() [1/2]
|
inline |
◆ operator==() [2/2]
|
inline |
◆ rank()
|
inline |
Returns the rank of the Tensor Layout object.
- Returns
- int32_t
◆ sift_features_index()
|
inline |
Index of the sift features dimension specified by layout.
- Returns
- int32_t
◆ sift_octave_layer_index()
|
inline |
Index of the sift octave layer dimension specified by layout.
- Returns
- int32_t
◆ width_index()
|
inline |
Index of the width dimension specified by layout. E.g. returns 2 for TENSOR_LAYOUT_NHWC.
- Returns
- Index of the width dimension.
Member Data Documentation
◆ layoutDescriptorTable
|
inlinestatic |
Provides descriptors for each feature of a specified layout type.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/core/tensor_layout.hpp