diff options
author | Isabella Gottardi <isabella.gottardi@arm.com> | 2018-02-27 17:41:55 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:48:33 +0000 |
commit | d17a677a70d477ae508c084148ba6974fc38477d (patch) | |
tree | df6719551b1125941ecdfe4889826b0daa92088b /arm_compute/core/Helpers.h | |
parent | 240cfa65322da0c9b2ec0e78960ff4bd87c7573e (diff) | |
download | ComputeLibrary-d17a677a70d477ae508c084148ba6974fc38477d.tar.gz |
COMPMID-979: Add NHWC data layout to the tensor's metadata
Change-Id: I89bdab7dc63a437eb7d60c0ae652c53c3875e503
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/122524
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Diffstat (limited to 'arm_compute/core/Helpers.h')
-rw-r--r-- | arm_compute/core/Helpers.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arm_compute/core/Helpers.h b/arm_compute/core/Helpers.h index 63fad1dcea..c91299f218 100644 --- a/arm_compute/core/Helpers.h +++ b/arm_compute/core/Helpers.h @@ -588,6 +588,16 @@ bool set_format_if_unknown(ITensorInfo &info, Format format); */ bool set_data_type_if_unknown(ITensorInfo &info, DataType data_type); +/* Set the data layout to the specified value if + * the current data layout is unknown. + * + * @param[in,out] info Tensor info used to check and assign. + * @param[in] data_layout New data layout. + * + * @return True if the data type has been changed. + */ +bool set_data_layout_if_unknown(ITensorInfo &info, DataLayout data_layout); + /* Set the fixed point position to the specified value if * the current fixed point position is 0 and the data type is QS8 or QS16 * @@ -637,6 +647,15 @@ inline Coordinates index2coords(const TensorShape &shape, int index); * @return linead index */ inline int coords2index(const TensorShape &shape, const Coordinates &coord); + +/* Get the index of the given dimension. + * + * @param[in] info Tensor info used to check and assign. + * @param[in] data_layout New data layout. + * + * @return The int conversion of the requested data layout index. + */ +inline int get_data_layout_dimension_index(const ITensorInfo &info, const DataLayoutDimension data_layout_dimension); } // namespace arm_compute #include "arm_compute/core/Helpers.inl" |