From 50de4fa4e7e0dd02a442ba350a1b40f293cb5a01 Mon Sep 17 00:00:00 2001 From: Teresa Charlin Date: Mon, 31 May 2021 18:47:33 +0100 Subject: 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 Change-Id: I498548169cc77609c55cf3105f1de5a7429772cf --- .../reference/workloads/RefElementwiseUnaryWorkload.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/backends/reference/workloads/RefElementwiseUnaryWorkload.cpp') 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 @@ -54,8 +56,10 @@ void RefElementwiseUnaryWorkload::Execute(std::vector inputs, st using AbsFunction = ElementwiseUnaryFunction>; using ExpFunction = ElementwiseUnaryFunction>; + using LogFunction = ElementwiseUnaryFunction>; using NegFunction = ElementwiseUnaryFunction>; using RsqrtFunction = ElementwiseUnaryFunction>; + using SinFunction = ElementwiseUnaryFunction>; using SqrtFunction = ElementwiseUnaryFunction>; switch (m_Data.m_Parameters.m_Operation) @@ -70,6 +74,11 @@ void RefElementwiseUnaryWorkload::Execute(std::vector 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 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); -- cgit v1.2.1