diff options
author | Teresa Charlin <teresa.charlinreyes@arm.com> | 2021-05-31 18:47:33 +0100 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2021-06-16 14:26:12 +0000 |
commit | 50de4fa4e7e0dd02a442ba350a1b40f293cb5a01 (patch) | |
tree | b37e0ae81033a1cb70911750affe2961682dd62d /src/backends/reference/workloads/RefElementwiseUnaryWorkload.cpp | |
parent | 2ef580100c8de1bf8acea854607ac1e552e9703f (diff) | |
download | armnn-50de4fa4e7e0dd02a442ba350a1b40f293cb5a01.tar.gz |
IVGCVSW-6088 Add Sin and Log to ElementWiseUnary
* Ref workload
* Cl workload
* Neon workload
* Serializer
* Deserializer
* Remove boost include from TensorTest.cpp
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: I498548169cc77609c55cf3105f1de5a7429772cf
Diffstat (limited to 'src/backends/reference/workloads/RefElementwiseUnaryWorkload.cpp')
-rw-r--r-- | src/backends/reference/workloads/RefElementwiseUnaryWorkload.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/backends/reference/workloads/RefElementwiseUnaryWorkload.cpp b/src/backends/reference/workloads/RefElementwiseUnaryWorkload.cpp index b442f25c2a..be153636f9 100644 --- a/src/backends/reference/workloads/RefElementwiseUnaryWorkload.cpp +++ b/src/backends/reference/workloads/RefElementwiseUnaryWorkload.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2019 Arm Ltd. All rights reserved. +// Copyright © 2019 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -11,7 +11,9 @@ #include "RefWorkloadUtils.hpp" #include "Abs.hpp" #include "Exp.hpp" +#include "Log.hpp" #include "Rsqrt.hpp" +#include "Sin.hpp" #include "Sqrt.hpp" #include <Profiling.hpp> @@ -54,8 +56,10 @@ void RefElementwiseUnaryWorkload::Execute(std::vector<ITensorHandle*> inputs, st using AbsFunction = ElementwiseUnaryFunction<abs<InType>>; using ExpFunction = ElementwiseUnaryFunction<exp<InType>>; + using LogFunction = ElementwiseUnaryFunction<log<InType>>; using NegFunction = ElementwiseUnaryFunction<std::negate<InType>>; using RsqrtFunction = ElementwiseUnaryFunction<rsqrt<InType>>; + using SinFunction = ElementwiseUnaryFunction<sin<InType>>; using SqrtFunction = ElementwiseUnaryFunction<sqrt<InType>>; switch (m_Data.m_Parameters.m_Operation) @@ -70,6 +74,11 @@ void RefElementwiseUnaryWorkload::Execute(std::vector<ITensorHandle*> inputs, st ExpFunction(inShape, outShape, *input, *output); break; } + case UnaryOperation::Log: + { + LogFunction(inShape, outShape, *input, *output); + break; + } case UnaryOperation::Neg: { NegFunction(inShape, outShape, *input, *output); @@ -80,6 +89,11 @@ void RefElementwiseUnaryWorkload::Execute(std::vector<ITensorHandle*> inputs, st RsqrtFunction(inShape, outShape, *input, *output); break; } + case UnaryOperation::Sin: + { + SinFunction(inShape, outShape, *input, *output); + break; + } case UnaryOperation::Sqrt: { SqrtFunction(inShape, outShape, *input, *output); |