ArmNN
 25.02
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RefConvertFp16ToFp32Workload.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017-2019, 2021-2024 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 #include "RefWorkloadUtils.hpp"
8 
10 
11 #include <Half.hpp>
12 
13 namespace armnn
14 {
15 
17 {
19 }
20 
21 void RefConvertFp16ToFp32Workload::Execute(std::vector<ITensorHandle*> inputs,
22  std::vector<ITensorHandle*> outputs) const
23 {
24  ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID("RefConvertFp16ToFp32Workload_Execute");
25 
26  const Half* const input = reinterpret_cast<const Half*>(inputs[0]->Map());
27  float* const output = reinterpret_cast<float*>(outputs[0]->Map());
28 
29  unsigned int numElements = GetTensorInfo(inputs[0]).GetNumElements();
31 }
32 
33 } //namespace armnn
#define ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
QueueDescriptor m_Data
Definition: Workload.hpp:74
unsigned int GetNumElements() const
Definition: Tensor.hpp:198
static void ConvertFloat16To32(const void *srcFloat16Buffer, size_t numElements, float *dstFloat32Buffer)
Copyright (c) 2021 ARM Limited and Contributors.
half_float::half Half
Definition: Half.hpp:22
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
std::vector< ITensorHandle * > m_Inputs
std::vector< ITensorHandle * > m_Outputs