From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- 20.02/_floor_test_impl_8cpp.xhtml | 263 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 263 insertions(+) create mode 100644 20.02/_floor_test_impl_8cpp.xhtml (limited to '20.02/_floor_test_impl_8cpp.xhtml') diff --git a/20.02/_floor_test_impl_8cpp.xhtml b/20.02/_floor_test_impl_8cpp.xhtml new file mode 100644 index 0000000000..b38f9e87d6 --- /dev/null +++ b/20.02/_floor_test_impl_8cpp.xhtml @@ -0,0 +1,263 @@ + + + + + + + + + + + + + +ArmNN: src/backends/backendsCommon/test/layerTests/FloorTestImpl.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
FloorTestImpl.cpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + +

+Functions

template<armnn::DataType ArmnnType, typename T >
LayerTestResult< T, 4 > SimpleFloorTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::Float32 >, 4 > SimpleFloorTest< armnn::DataType::Float32 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::Float16 >, 4 > SimpleFloorTest< armnn::DataType::Float16 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::QSymmS16 >, 4 > SimpleFloorTest< armnn::DataType::QSymmS16 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
+

Function Documentation

+ +

◆ SimpleFloorTest()

+ +
+
+ + + + + + + + + + + + + + + + + + +
LayerTestResult<T, 4> SimpleFloorTest (armnn::IWorkloadFactoryworkloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtrmemoryManager 
)
+
+ +

Definition at line 15 of file FloorTestImpl.cpp.

+ +

References CopyDataFromITensorHandle(), CopyDataToITensorHandle(), IWorkloadFactory::CreateFloor(), IWorkloadFactory::CreateTensorHandle(), armnn::IgnoreUnused(), LayerTestResult< T, n >::output, LayerTestResult< T, n >::outputExpected, and TensorInfo::SetQuantizationScale().

+
18 {
19  IgnoreUnused(memoryManager);
20  armnn::TensorInfo inputTensorInfo({1, 3, 2, 3}, ArmnnType);
21  inputTensorInfo.SetQuantizationScale(0.1f);
22 
23  armnn::TensorInfo outputTensorInfo(inputTensorInfo);
24  outputTensorInfo.SetQuantizationScale(0.1f);
25 
26  auto input = MakeTensor<T, 4>(inputTensorInfo, ConvertToDataType<ArmnnType>(
27  { -37.5f, -15.2f, -8.76f, -2.0f, -1.5f, -1.3f, -0.5f, -0.4f, 0.0f,
28  1.0f, 0.4f, 0.5f, 1.3f, 1.5f, 2.0f, 8.76f, 15.2f, 37.5f },
29  inputTensorInfo));
30 
31  LayerTestResult<T, 4> ret(outputTensorInfo);
32  ret.outputExpected = MakeTensor<T, 4>(outputTensorInfo, ConvertToDataType<ArmnnType>(
33  { -38.0f, -16.0f, -9.0f, -2.0f, -2.0f, -2.0f, -1.0f, -1.0f, 0.0f,
34  1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 2.0f, 8.0f, 15.0f, 37.0f },
35  outputTensorInfo));
36 
37  std::unique_ptr<armnn::ITensorHandle> inputHandle = workloadFactory.CreateTensorHandle(inputTensorInfo);
38  std::unique_ptr<armnn::ITensorHandle> outputHandle = workloadFactory.CreateTensorHandle(outputTensorInfo);
39 
42  AddInputToWorkload(data, info, inputTensorInfo, inputHandle.get());
43  AddOutputToWorkload(data, info, outputTensorInfo, outputHandle.get());
44 
45  std::unique_ptr<armnn::IWorkload> workload = workloadFactory.CreateFloor(data, info);
46 
47  inputHandle->Allocate();
48  outputHandle->Allocate();
49 
50  CopyDataToITensorHandle(inputHandle.get(), &input[0][0][0][0]);
51 
52  workload->Execute();
53 
54  CopyDataFromITensorHandle(&ret.output[0][0][0][0], outputHandle.get());
55 
56  return ret;
57 }
+
void IgnoreUnused(Ts &&...)
+ +
void SetQuantizationScale(float scale)
Definition: Tensor.cpp:259
+
void CopyDataFromITensorHandle(void *memory, const armnn::ITensorHandle *tensorHandle)
+
virtual std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo, const bool IsMemoryManaged=true) const =0
+ +
Contains information about inputs and outputs to a layer.
+ +
virtual std::unique_ptr< IWorkload > CreateFloor(const FloorQueueDescriptor &descriptor, const WorkloadInfo &info) const
+
void CopyDataToITensorHandle(armnn::ITensorHandle *tensorHandle, const void *memory)
+
+
+
+ +

◆ SimpleFloorTest< armnn::DataType::Float16 >()

+ +
+
+ +
+
+ +

◆ SimpleFloorTest< armnn::DataType::Float32 >()

+ +
+
+ +
+
+ +

◆ SimpleFloorTest< armnn::DataType::QSymmS16 >()

+ +
+
+ +
+
+
+
+ + + + -- cgit v1.2.1