ArmNN
 21.11
SinTestImpl.cpp File Reference

Go to the source code of this file.

Functions

template<armnn::DataType ArmnnType, typename T >
LayerTestResult< T, 2 > Sin2dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T >
LayerTestResult< T, 3 > Sin3dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T >
LayerTestResult< T, 2 > SinZeroTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template<armnn::DataType ArmnnType, typename T >
LayerTestResult< T, 2 > SinNegativeTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::Float32 >, 2 > Sin2dTest< armnn::DataType::Float32 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::Float16 >, 2 > Sin2dTest< armnn::DataType::Float16 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::QAsymmS8 >, 2 > Sin2dTest< armnn::DataType::QAsymmS8 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::QAsymmU8 >, 2 > Sin2dTest< armnn::DataType::QAsymmU8 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::QSymmS16 >, 2 > Sin2dTest< armnn::DataType::QSymmS16 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::Float32 >, 3 > Sin3dTest< armnn::DataType::Float32 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::Float16 >, 3 > Sin3dTest< armnn::DataType::Float16 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::QAsymmS8 >, 3 > Sin3dTest< armnn::DataType::QAsymmS8 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::QAsymmU8 >, 3 > Sin3dTest< armnn::DataType::QAsymmU8 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::QSymmS16 >, 3 > Sin3dTest< armnn::DataType::QSymmS16 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::Float32 >, 2 > SinZeroTest< armnn::DataType::Float32 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::Float32 >, 2 > SinNegativeTest< armnn::DataType::Float32 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 

Function Documentation

◆ Sin2dTest()

LayerTestResult<T, 2> Sin2dTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 10 of file SinTestImpl.cpp.

References armnn::Sin.

14 {
15  const unsigned int inputShape[] = { 2, 2 };
16 
17  std::vector<float> inputValues
18  {
19  3.0f, 2.0f,
20  1.0f, 1.1f
21  };
22 
23  std::vector<float> expectedOutputValues
24  {
25  0.14112000806f, 0.90929742682f,
26  0.8414709848f, 0.89120736006f
27  };
28 
29  return ElementwiseUnaryTestHelper<2, ArmnnType>(
30  workloadFactory,
31  memoryManager,
33  inputShape,
34  inputValues,
35  inputShape,
36  expectedOutputValues,
37  tensorHandleFactory);
38 }

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

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

◆ Sin2dTest< armnn::DataType::QAsymmS8 >()

◆ Sin2dTest< armnn::DataType::QAsymmU8 >()

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

◆ Sin3dTest()

LayerTestResult<T, 3> Sin3dTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 41 of file SinTestImpl.cpp.

References armnn::Sin.

45 {
46  const unsigned int inputShape[] = { 3, 1, 2 };
47 
48  std::vector<float> inputValues
49  {
50  5.0f, 4.0f,
51  3.0f, 2.0f,
52  1.0f, 1.1f
53  };
54 
55  std::vector<float> expectedOutputValues
56  {
57  -0.95892427466f, -0.7568024953f,
58  0.14112000806f, 0.90929742682f,
59  0.8414709848f, 0.89120736006f
60  };
61 
62  return ElementwiseUnaryTestHelper<3, ArmnnType>(
63  workloadFactory,
64  memoryManager,
66  inputShape,
67  inputValues,
68  inputShape,
69  expectedOutputValues,
70  tensorHandleFactory);
71 }

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

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

◆ Sin3dTest< armnn::DataType::QAsymmS8 >()

◆ Sin3dTest< armnn::DataType::QAsymmU8 >()

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

◆ SinNegativeTest()

LayerTestResult<T, 2> SinNegativeTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 103 of file SinTestImpl.cpp.

References armnn::Sin.

107 {
108  const unsigned int inputShape[] = { 1, 2 };
109 
110  std::vector<float> inputValues
111  {
112  -5.9f, -5.8f
113  };
114 
115  std::vector<float> expectedOutputValues
116  {
117  0.37387666483f, 0.46460217941f,
118  };
119 
120  return ElementwiseUnaryTestHelper<2, ArmnnType>(
121  workloadFactory,
122  memoryManager,
124  inputShape,
125  inputValues,
126  inputShape,
127  expectedOutputValues,
128  tensorHandleFactory);
129 }

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

◆ SinZeroTest()

LayerTestResult<T, 2> SinZeroTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 74 of file SinTestImpl.cpp.

References armnn::Sin.

78 {
79  const unsigned int inputShape[] = { 1, 2 };
80 
81  std::vector<float> inputValues
82  {
83  0.f, 0.f
84  };
85 
86  std::vector<float> expectedOutputValues
87  {
88  0.f, 0.f
89  };
90 
91  return ElementwiseUnaryTestHelper<2, ArmnnType>(
92  workloadFactory,
93  memoryManager,
95  inputShape,
96  inputValues,
97  inputShape,
98  expectedOutputValues,
99  tensorHandleFactory);
100 }

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