ONE - On-device Neural Engine
|
Class to represent position(offset) of tensor.
Assume that the front is higher dimensional. i.g. N: 0, C: 1, H: 2, W: 3 for NCHW layout.
More...
#include <Coordinates.h>
Public Member Functions | |
Coordinates ()=default | |
Construct a new Coordinates object with zero dimension. | |
Coordinates (std::initializer_list< int32_t > init) | |
Construct a new Coordinates object. | |
Coordinates (std::initializer_list< uint32_t > init) | |
Construct a new Coordinates object. | |
Coordinates (int rank) | |
Construct a new Coordinates object with rank. | |
void | set (size_t dimension, int32_t coordinate) |
Set the coordinate of one of the coordinates. | |
size_t | size () const |
Return size of coordinates. | |
int32_t | operator[] (size_t dimension) const |
std::vector< int32_t >::const_iterator | begin () const |
begin() of const_iterator for this class | |
std::vector< int32_t >::const_iterator | end () const |
end() of const_iterator for this class | |
Static Public Attributes | |
static constexpr size_t | num_max_dimensions = 4 |
Class to represent position(offset) of tensor.
Assume that the front is higher dimensional. i.g. N: 0, C: 1, H: 2, W: 3 for NCHW layout.
Definition at line 36 of file Coordinates.h.
|
default |
Construct a new Coordinates object with zero dimension.
|
inline |
Construct a new Coordinates object.
[in] | init | The initialzer_list with coordinates |
Definition at line 52 of file Coordinates.h.
References num_max_dimensions.
|
inline |
Construct a new Coordinates object.
[in] | init | The initialzer_list with coordinates |
Definition at line 61 of file Coordinates.h.
References num_max_dimensions.
|
inlineexplicit |
Construct a new Coordinates object with rank.
[in] | rank | The rank of coordinates |
Definition at line 70 of file Coordinates.h.
|
inline |
begin() of const_iterator for this class
Definition at line 110 of file Coordinates.h.
|
inline |
end() of const_iterator for this class
Definition at line 116 of file Coordinates.h.
|
inline |
Definition at line 98 of file Coordinates.h.
|
inline |
Set the coordinate of one of the coordinates.
[in] | dimension | Dimension for which the coordinate is set. |
[in] | Coordinate | Coordinate to be set for the dimension. |
Definition at line 79 of file Coordinates.h.
References num_max_dimensions.
Referenced by onert::ir::convertCoordinates(), ShapeLoop(), and onert::backend::acl_common::AclSubTensorAnalyzer::visit().
|
inline |
Return size of coordinates.
Definition at line 95 of file Coordinates.h.
Referenced by onert::backend::acl_common::asTensorCoordinate().
|
staticconstexpr |
Definition at line 39 of file Coordinates.h.
Referenced by Coordinates(), Coordinates(), and set().