ONE - On-device Neural Engine
|
#include <Shape.h>
Public Member Functions | |
Shape ()=default | |
Shape (int32_t rank) | |
Shape (std::initializer_list< int32_t > &&dims) | |
Shape (const std::vector< int32_t > &dims) | |
int32_t | rank () const |
void | resize (int32_t size) |
int32_t & | dim (int32_t axis) noexcept |
int32_t | dim (int32_t axis) const noexcept |
int32_t | numElements () const |
bool | operator== (const Shape &rhs) const |
bool | operator!= (const Shape &rhs) const |
Static Public Attributes | |
static constexpr int32_t | autoDim = -1 |
|
default |
|
inlineexplicit |
|
inline |
|
inlineexplicit |
|
inlinenoexcept |
Definition at line 53 of file Shape.h.
References dim(), adt::small_vector< T, Capacity >::size(), and mir::wrap_index().
|
inlinenoexcept |
Definition at line 47 of file Shape.h.
References dim(), adt::small_vector< T, Capacity >::size(), and mir::wrap_index().
Referenced by mir::broadcastShapes(), mir_caffe::CaffeOpCreator::checkReshape(), mir::ShapeRange::contains(), mir_onnx::convertBatchNormalizationV9(), mir_caffe2::Caffe2OpCreator::convertFC(), mir_tflite::TFLiteOpCreator::convertFullyConnected(), mir_tflite::TFLiteOpCreator::convertReshape(), mir_onnx::convertReshapeV1(), mir_tflite::TFLiteOpCreator::convertResizeNearestNeighbor(), mir_tflite::TFLiteOpCreator::convertShape(), mir_tflite::TFLiteOpCreator::convertStridedSlice(), mir_onnx::convertUnsqueezeV1(), mir_onnx::createTensor(), dim(), dim(), mir_onnx::fixPads(), nnc::AclCppOpGenerator::genPadStrideInfo(), mir::Tensor< T >::getRegion(), mir_onnx::inferAutoPadding(), numElements(), mir::ShapeIter::operator++(), mir_interpreter::DepthwiseConv2DImpl< T >::run(), mir_interpreter::DepthwiseConv2DImpl< uint8_t >::run(), mir_interpreter::SoftmaxImpl< T >::run(), mir_interpreter::PadImpl< T >::run(), mir_interpreter::FullyConnectedImpl< T >::run(), mir_interpreter::FullyConnectedImpl< uint8_t >::run(), mir_interpreter::Conv2DImpl< T >::run(), mir_interpreter::Conv2DImpl< uint8_t >::run(), mir_interpreter::DeConv2DImpl< T >::run(), mir_interpreter::shift(), mir::TensorVariant::TensorVariant(), mir::TensorVariant::TensorVariant(), TEST(), mir::toString(), mir::transposeShape(), mir::transposeTensor(), mir2loco::Transformer::visit(), nnc::ModelAnalyzer::visit(), nnc::ModelAnalyzer::visit(), nnc::AclCppOpGenerator::visit(), and nnc::AclCppOpGenerator::visit().
int32_t Shape::numElements | ( | ) | const |
Definition at line 30 of file Shape.cpp.
Referenced by mir_tflite::TFLiteOpCreator::convertFullyConnected(), mir_onnx::convertReshapeV5(), mir::ShapeRange::end(), mir_interpreter::erase(), mir::TensorVariant::TensorVariant(), and mir::TensorVariant::TensorVariant().
|
inline |
|
inline |
|
inline |
Definition at line 43 of file Shape.h.
References adt::small_vector< T, Capacity >::size().
Referenced by mir::broadcastShapes(), mir_caffe::CaffeOpCreator::checkReshape(), mir::ShapeRange::contains(), mir_onnx::convertBatchNormalizationV9(), mir_tflite::TFLiteOpCreator::convertPad(), mir_onnx::convertReshapeV1(), mir_onnx::convertReshapeV5(), mir_tflite::TFLiteOpCreator::convertShape(), mir_tflite::TFLiteOpCreator::convertStridedSlice(), mir_onnx::convertUnsqueezeV1(), nnc::AclCppOpGenerator::genPadStrideInfo(), mir::ops::ConcatOp::getAxis(), mir::ops::SoftmaxOp::getAxis(), mir::TensorVariant::getOffset(), mir::Tensor< T >::getRegion(), numElements(), mir::ShapeIter::operator++(), mir_interpreter::AvgPool2DImpl< T >::run(), mir_interpreter::DepthwiseConv2DImpl< T >::run(), mir_interpreter::DepthwiseConv2DImpl< uint8_t >::run(), mir_interpreter::TransposeImpl< T >::run(), mir_interpreter::PadImpl< T >::run(), mir_interpreter::FullyConnectedImpl< T >::run(), mir_interpreter::FullyConnectedImpl< uint8_t >::run(), mir_interpreter::Conv2DImpl< uint8_t >::run(), mir_interpreter::shift(), mir::TensorVariant::TensorVariant(), mir::toString(), mir::transposeShape(), mir2loco::Transformer::visit(), nnc::Serializer::visit(), and nnc::AclCppOpGenerator::visit().
void Shape::resize | ( | int32_t | size | ) |
Definition at line 28 of file Shape.cpp.
References adt::small_vector< T, Capacity >::resize(), and size.