X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=arm_compute%2Fcore%2FTensorInfo.h;h=f8cfb35357d21d05f867d5d3f5896d37181b08df;hb=HEAD;hp=0b8989f94259cbc3218b4c7fe7d9d177cac7219c;hpb=67c8c91522e5be8156b77f57e63c0253535c902a;p=platform%2Fupstream%2Farmcl.git diff --git a/arm_compute/core/TensorInfo.h b/arm_compute/core/TensorInfo.h index 0b8989f..f8cfb35 100644 --- a/arm_compute/core/TensorInfo.h +++ b/arm_compute/core/TensorInfo.h @@ -28,6 +28,7 @@ #include "ITensorInfo.h" #include "arm_compute/core/Coordinates.h" +#include "arm_compute/core/Helpers.h" #include "arm_compute/core/Strides.h" #include "arm_compute/core/TensorShape.h" #include "arm_compute/core/Types.h" @@ -209,6 +210,8 @@ public: * @param[in] hog_info HOG's metadata used to allocate normalized HOG space * @param[in] width Width of the 2D tensor where the HOG descriptor will be computed on * @param[in] height Height of the 2D tensor where the HOG descriptor will be computed on + * + * @return Total allocation size including padding in bytes. */ size_t init_auto_padding(const HOGInfo &hog_info, unsigned int width, unsigned int height); @@ -220,6 +223,7 @@ public: ITensorInfo &set_tensor_shape(const TensorShape &shape) override; ITensorInfo &set_fixed_point_position(int fixed_point_position) override; ITensorInfo &set_quantization_info(const QuantizationInfo &quantization_info) override; + ITensorInfo &set_data_layout(const DataLayout &data_layout) override; ITensorInfo &reset_padding() override; bool auto_padding() override; bool extend_padding(const PaddingSize &padding) override; @@ -227,6 +231,10 @@ public: { return _tensor_shape[index]; } + size_t dimension(DataLayoutDimension dimension) const override + { + return get_data_layout_dimension_index(_data_layout, dimension); + } const Strides &strides_in_bytes() const override { return _strides_in_bytes; @@ -297,6 +305,10 @@ public: { return _quantization_info; } + DataLayout data_layout() const override + { + return _data_layout; + } private: /** Calculates strides, offset and total size resulting from the specified padding around the XY plane. @@ -317,6 +329,7 @@ private: ValidRegion _valid_region; PaddingSize _padding; QuantizationInfo _quantization_info; + DataLayout _data_layout; }; } #endif /*__ARM_COMPUTE_TENSORINFO_H__ */