aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/backends/RefWorkloads/RefDivisionFloat32Workload.cpp
blob: 28c90610ded1dd52c374f66d52d421ed041481df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//

#include "RefDivisionFloat32Workload.hpp"

#include "ArithmeticFunction.hpp"
#include "RefWorkloadUtils.hpp"

#include "Profiling.hpp"

namespace armnn
{

void RefDivisionFloat32Workload::Execute() const
{
    ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, "RefDivisionFloat32Workload_Execute");

    const TensorShape& inShape0 = GetTensorInfo(m_Data.m_Inputs[0]).GetShape();
    const TensorShape& inShape1 = GetTensorInfo(m_Data.m_Inputs[1]).GetShape();
    const TensorShape& outShape = GetTensorInfo(m_Data.m_Outputs[0]).GetShape();

    float* outputData = GetOutputTensorDataFloat(0, m_Data);
    const float* inputData0 = GetInputTensorDataFloat(0, m_Data);
    const float* inputData1 = GetInputTensorDataFloat(1, m_Data);

    ArithmeticFunction<std::divides<float>>(inShape0, inShape1, outShape, inputData0, inputData1, outputData);
}

} //namespace armnn