diff options
author | Éanna Ó Catháin <eanna.ocathain@arm.com> | 2018-11-28 16:24:38 +0000 |
---|---|---|
committer | Éanna Ó Catháin <eanna.ocathain@arm.com> | 2018-11-28 16:24:38 +0000 |
commit | d57415d9a2117da9cc5c58f8b5e39ba7455417d1 (patch) | |
tree | 7781ce03a1c3373121c6dff9d4eeb81fd306ad44 /src/backends/reference/workloads/ElementwiseFunction.cpp | |
parent | 5a4304a09fcbfd5fab4c73e5fd0d4cc9f3170395 (diff) | |
download | armnn-d57415d9a2117da9cc5c58f8b5e39ba7455417d1.tar.gz |
IVGCVSW-2202 Refactoring Arithmetic* names to Elementwise* names for workloads and workload functions
Change-Id: I6f3fce12a55f7d38ceafcdfcd6b5181bf56e2c09
Diffstat (limited to 'src/backends/reference/workloads/ElementwiseFunction.cpp')
-rw-r--r-- | src/backends/reference/workloads/ElementwiseFunction.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/backends/reference/workloads/ElementwiseFunction.cpp b/src/backends/reference/workloads/ElementwiseFunction.cpp new file mode 100644 index 0000000000..bea3d2fb89 --- /dev/null +++ b/src/backends/reference/workloads/ElementwiseFunction.cpp @@ -0,0 +1,29 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#include "ElementwiseFunction.hpp" +#include "Broadcast.hpp" +#include <functional> + +namespace armnn +{ + +template <typename Functor> +ElementwiseFunction<Functor>::ElementwiseFunction(const TensorShape& inShape0, + const TensorShape& inShape1, + const TensorShape& outShape, + const float* inData0, + const float* inData1, + float* outData) +{ + BroadcastLoop(inShape0, inShape1, outShape).Unroll(Functor(), 0, inData0, inData1, outData); +} + +} //namespace armnn + +template struct armnn::ElementwiseFunction<std::plus<float>>; +template struct armnn::ElementwiseFunction<std::minus<float>>; +template struct armnn::ElementwiseFunction<std::multiplies<float>>; +template struct armnn::ElementwiseFunction<std::divides<float>>; |