From 1fd2c80692ed8ecefc4d8deb783564ad19eaf70c Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Tue, 16 Jun 2020 17:44:46 +0100 Subject: COMPMID-3375: Port NEActivationLayer functions/kernels to run on different tensors. Signed-off-by: Georgios Pinitas Change-Id: I98782bb73e9dc0899ffb1796aca6f99714adea94 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3343 Reviewed-by: Michalis Spyrou Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- arm_compute/core/experimental/Types.h | 50 +++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 14 deletions(-) (limited to 'arm_compute/core/experimental') 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; -using OutputOperatorTensors = std::pair; -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 { -- cgit v1.2.1