ONE - On-device Neural Engine
|
#include <Index.h>
Public Member Functions | |
Index ()=default | |
Index (std::initializer_list< int32_t > &&l) noexcept | |
Index (size_t rank) | |
int32_t | rank () const |
Index & | resize (int32_t size) |
resize index to given dimension number | |
Index & | fill (int32_t index) |
fill all axis with index | |
int32_t & | at (int32_t axis) |
return position on given axis | |
int32_t | at (int32_t axis) const |
return position on given axis | |
|
default |
|
inlinenoexcept |
|
inlineexplicit |
|
inline |
return position on given axis
axis | index of axis to get index on. If axis is negative returns axis from the last |
Definition at line 64 of file Index.h.
References adt::small_vector< T, Capacity >::size(), and mir::wrap_index().
Referenced by mir::ShapeRange::contains(), mir::TensorVariant::getOffset(), mir::Tensor< T >::getRegion(), mir::ShapeIter::operator++(), mir::operator<<(), mir_interpreter::AvgPool2DImpl< uint8_t >::run(), mir_interpreter::AvgPool2DImpl< T >::run(), mir_interpreter::DepthwiseConv2DImpl< T >::run(), mir_interpreter::SoftmaxImpl< T >::run(), mir_interpreter::MaxPool2DImpl< uint8_t >::run(), mir_interpreter::TransposeImpl< T >::run(), mir_interpreter::MaxPool2DImpl< T >::run(), mir_interpreter::PadImpl< T >::run(), mir_interpreter::ReduceMeanImpl< T >::run(), mir_interpreter::FullyConnectedImpl< T >::run(), and mir_interpreter::MIRInterpreter::visit().
|
inline |
return position on given axis
axis | index of axis to get index on. If axis is negative returns axis from the last |
Definition at line 71 of file Index.h.
References adt::small_vector< T, Capacity >::size(), and mir::wrap_index().
Index & mir::Index::fill | ( | int32_t | index | ) |
|
inline |
Definition at line 43 of file Index.h.
References adt::small_vector< T, Capacity >::size().
Referenced by mir::ShapeRange::contains(), mir::TensorVariant::getOffset(), mir::ShapeIter::operator!=(), mir::operator<<(), and mir_interpreter::shift().
Index & mir::Index::resize | ( | int32_t | size | ) |
resize index to given dimension number
size | new number of dimensions |
Definition at line 24 of file Index.cpp.
References adt::small_vector< T, Capacity >::resize(), and size.
Referenced by mir_interpreter::DepthwiseConv2DImpl< T >::run(), mir_interpreter::TransposeImpl< T >::run(), mir_interpreter::PadImpl< T >::run(), and mir_interpreter::MIRInterpreter::visit().