blob: cc1f8800dc2ed8151a6c7bf2493c49843c316a81 (
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
|
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "RefFloorFloat32Workload.hpp"
#include "RefWorkloadUtils.hpp"
#include "Profiling.hpp"
namespace armnn
{
void RefFloorFloat32Workload::Execute() const
{
ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, "RefFloorFloat32Workload_Execute");
const float* const input = GetInputTensorDataFloat(0, m_Data);
float* const output = GetOutputTensorDataFloat(0, m_Data);
unsigned int numElements = GetTensorInfo(m_Data.m_Inputs[0]).GetNumElements();
for (unsigned int i = 0; i < numElements; ++i)
{
output[i] = floorf(input[i]);
}
}
} //namespace armnn
|