diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2020-06-16 17:44:46 +0100 |
---|---|---|
committer | Michalis Spyrou <michalis.spyrou@arm.com> | 2020-06-17 09:29:40 +0000 |
commit | 1fd2c80692ed8ecefc4d8deb783564ad19eaf70c (patch) | |
tree | b44219bdc8bdc17cb2906dd50a5ba1ee1e6b12fc /arm_compute/core/experimental/Types.h | |
parent | 27a9e4f10516679bc6e92bec104ae219e1fa7f15 (diff) | |
download | ComputeLibrary-1fd2c80692ed8ecefc4d8deb783564ad19eaf70c.tar.gz |
COMPMID-3375: Port NEActivationLayer functions/kernels to run on
different tensors.
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: I98782bb73e9dc0899ffb1796aca6f99714adea94
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3343
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/experimental/Types.h')
-rw-r--r-- | arm_compute/core/experimental/Types.h | 50 |
1 files changed, 36 insertions, 14 deletions
diff --git a/arm_compute/core/experimental/Types.h b/arm_compute/core/experimental/Types.h index 6043db9ff4..2b5591872a 100644 --- a/arm_compute/core/experimental/Types.h +++ b/arm_compute/core/experimental/Types.h @@ -36,21 +36,43 @@ class ITensor; /** Memory type */ enum class TensorType { - ACL_SRC = 0, - ACL_SRC_0 = 0, - ACL_SRC_1 = 1, - ACL_SRC_2 = 2, - ACL_DST = 30, - ACL_DST_0 = 30, - ACL_DST_1 = 31, - ACL_INT = 50, - ACL_INT_0 = 50, - ACL_INT_1 = 51, - ACL_INT_2 = 52 + ACL_UNKNOWN = -1, + ACL_SRC = 0, + ACL_SRC_0 = 0, + ACL_SRC_1 = 1, + ACL_SRC_2 = 2, + ACL_DST = 30, + ACL_DST_0 = 30, + ACL_DST_1 = 31, + ACL_INT = 50, + ACL_INT_0 = 50, + ACL_INT_1 = 51, + ACL_INT_2 = 52 }; -using InputOperatorTensors = std::pair<TensorType /* tensor type */, const ITensor * /* tensor object */>; -using OutputOperatorTensors = std::pair<TensorType /* tensor type */, ITensor * /* tensor object */>; -using OperatorTensors = OutputOperatorTensors; + +/** Input tensor aggregate */ +struct InputTensor +{ + InputTensor(TensorType type, const ITensor *tensor) + : type(type), tensor(tensor) + { + } + + TensorType type{ TensorType::ACL_UNKNOWN }; + const ITensor *tensor{ nullptr }; +}; +/** Output tensor aggregate */ +struct OutputTensor +{ + OutputTensor(TensorType type, ITensor *tensor) + : type(type), tensor(tensor) + { + } + + TensorType type{ TensorType::ACL_UNKNOWN }; + ITensor *tensor{ nullptr }; +}; +using OperatorTensor = OutputTensor; namespace experimental { |