From 0e2bab81442ee6cc2b94e4f7881ed0c5c6af65e7 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Thu, 19 Mar 2020 17:03:14 +0000 Subject: Creating gh-pages documentation for ArmNN Signed-off-by: Jim Flynn --- ...convert_fp32_to_fp16_workload_8cpp_source.xhtml | 131 +++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 Documentation/_neon_convert_fp32_to_fp16_workload_8cpp_source.xhtml (limited to 'Documentation/_neon_convert_fp32_to_fp16_workload_8cpp_source.xhtml') diff --git a/Documentation/_neon_convert_fp32_to_fp16_workload_8cpp_source.xhtml b/Documentation/_neon_convert_fp32_to_fp16_workload_8cpp_source.xhtml new file mode 100644 index 0000000000..29c7de31fc --- /dev/null +++ b/Documentation/_neon_convert_fp32_to_fp16_workload_8cpp_source.xhtml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + +ArmNN: src/backends/neon/workloads/NeonConvertFp32ToFp16Workload.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
NeonConvertFp32ToFp16Workload.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 
8 #include <Half.hpp>
9 #include <Profiling.hpp>
10 
12 
14 
15 namespace armnn
16 {
17 
19  const WorkloadInfo& info)
21 {
22  this->m_Data.ValidateInputsOutputs("NeonConvertFp32ToFp16Workload", 1, 1);
23  GatherTensorHandlePairs(descriptor, m_TensorHandlePairs);
24 }
25 
27 {
28  ARMNN_SCOPED_PROFILING_EVENT_NEON("NeonConvertFp32ToFp16Workload_Execute");
29 
30  auto convertFunc = [](uint8_t* dst, const uint8_t* src, size_t size)
31  {
32  auto input = reinterpret_cast<const float*>(src);
33  auto output = reinterpret_cast<Half*>(dst);
34  size_t numElements = size/2; // 2 bytes per fp16
36  };
37 
38  for (const auto& pair : m_TensorHandlePairs)
39  {
40  CopyTensorContentsGeneric(pair.first, pair.second, convertFunc);
41  }
42 }
43 
44 } //namespace armnn
+ +
const QueueDescriptor m_Data
Definition: Workload.hpp:46
+
#define ARMNN_SCOPED_PROFILING_EVENT_NEON(name)
+
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
+
Copyright (c) 2020 ARM Limited.
+ +
static void ConvertFloat32To16(const float *srcFloat32Buffer, size_t numElements, void *dstFloat16Buffer)
Converts a buffer of FP32 values to FP16, and stores in the given dstFloat16Buffer.
+ + +
NeonConvertFp32ToFp16Workload(const ConvertFp32ToFp16QueueDescriptor &descriptor, const WorkloadInfo &info)
+
Contains information about inputs and outputs to a layer.
+ +
void CopyTensorContentsGeneric(const ITensorHandle *srcTensor, ITensorHandle *dstTensor, CopyFunc copy)
+
void GatherTensorHandlePairs(const DescriptorType &descriptor, std::vector< std::pair< SrcTensorHandleType *, DstTensorHandleType *>> &tensorHandlePairs)
+
half_float::half Half
Definition: Half.hpp:16
+ + +
+
+ + + + -- cgit v1.2.1