ArmNN
 20.08
Div.cpp File Reference
#include <boost/test/unit_test.hpp>
#include "ParserFlatbuffersFixture.hpp"
#include "../TfLiteParser.hpp"
#include <string>
#include <iostream>

Go to the source code of this file.

Functions

 BOOST_FIXTURE_TEST_CASE (ParseDiv, SimpleDivFixture)
 
 BOOST_FIXTURE_TEST_CASE (ParseDynamicDiv, DynamicDivFixture)
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/2]

BOOST_FIXTURE_TEST_CASE ( ParseDiv  ,
SimpleDivFixture   
)

Definition at line 95 of file Div.cpp.

96 {
97  using armnn::DataType;
98  float Inf = std::numeric_limits<float>::infinity();
99  float NaN = std::numeric_limits<float>::quiet_NaN();
100 
101  RunTest<4, DataType::Float32>(0, {{ "inputTensor1", { 0.0f, 1.0f, 2.0f,
102  3.0f, 4.0f, 5.0f,
103  6.0f, 7.0f, 8.0f,
104  9.0f, 10.0f, -11.0f } },
105  { "inputTensor2", { 0.0f, 0.0f, 4.0f,
106  3.0f, 40.0f, 5.0f,
107  6.0f, 7.0f, 8.0f,
108  9.0f, 10.0f, 11.0f} } },
109  {{ "outputTensor", { NaN, Inf, 0.5f,
110  1.0f, 0.1f, 1.0f,
111  1.0f, 1.0f, 1.0f,
112  1.0f, 1.0f, -1.0f } } });
113 }
DataType
Definition: Types.hpp:32

◆ BOOST_FIXTURE_TEST_CASE() [2/2]

BOOST_FIXTURE_TEST_CASE ( ParseDynamicDiv  ,
DynamicDivFixture   
)

Definition at line 121 of file Div.cpp.

References BOOST_AUTO_TEST_SUITE_END().

122 {
123  using armnn::DataType;
124  float Inf = std::numeric_limits<float>::infinity();
125  float NaN = std::numeric_limits<float>::quiet_NaN();
126 
127  RunTest<4, DataType::Float32, DataType::Float32>(0, {{ "inputTensor1", { 0.0f, 1.0f, 2.0f,
128  3.0f, 4.0f, 5.0f,
129  6.0f, 7.0f, 8.0f,
130  9.0f, 10.0f, -11.0f } },
131  { "inputTensor2", { 0.0f, 0.0f, 4.0f,
132  3.0f, 40.0f, 5.0f,
133  6.0f, 7.0f, 8.0f,
134  9.0f, 10.0f, 11.0f} } },
135  {{ "outputTensor", { NaN, Inf, 0.5f,
136  1.0f, 0.1f, 1.0f,
137  1.0f, 1.0f, 1.0f,
138  1.0f, 1.0f, -1.0f } } }, true);
139 }
DataType
Definition: Types.hpp:32