ArmNN
 21.02
AddN.cpp File Reference
#include <armnn/utility/Assert.hpp>
#include <boost/test/unit_test.hpp>
#include "armnnTfParser/ITfParser.hpp"
#include "ParserPrototxtFixture.hpp"
#include <map>
#include <string>

Go to the source code of this file.

Functions

 BOOST_FIXTURE_TEST_CASE (FiveTwoDimInputs, FiveTwoDimInputsFixture)
 
 BOOST_FIXTURE_TEST_CASE (TwoTwoDimInputs, TwoTwoDimInputsFixture)
 
 BOOST_FIXTURE_TEST_CASE (ThreeTwoDimInputs, ThreeTwoDimInputsFixture)
 
 BOOST_FIXTURE_TEST_CASE (EightTwoDimInputs, EightTwoDimInputsFixture)
 
 BOOST_FIXTURE_TEST_CASE (ThreeInputBroadcast1D4D4DInputs, ThreeInputBroadcast1D4D4DInputsFixture)
 
 BOOST_FIXTURE_TEST_CASE (ThreeInputBroadcast4D1D4DInputs, ThreeInputBroadcast4D1D4DInputsFixture)
 
 BOOST_FIXTURE_TEST_CASE (ThreeInputBroadcast4D4D1DInputs, ThreeInputBroadcast4D4D1DInputsFixture)
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/7]

BOOST_FIXTURE_TEST_CASE ( FiveTwoDimInputs  ,
FiveTwoDimInputsFixture   
)

Definition at line 87 of file AddN.cpp.

88 {
89  RunTest<2>({ { "input0", { 1.0, 2.0, 3.0, 4.0 } },
90  { "input1", { 1.0, 5.0, 2.0, 2.0 } },
91  { "input2", { 1.0, 1.0, 2.0, 2.0 } },
92  { "input3", { 3.0, 7.0, 1.0, 2.0 } },
93  { "input4", { 8.0, 0.0, -2.0, -3.0 } } },
94  { { "output", { 14.0, 15.0, 6.0, 7.0 } } });
95 }

◆ BOOST_FIXTURE_TEST_CASE() [2/7]

BOOST_FIXTURE_TEST_CASE ( TwoTwoDimInputs  ,
TwoTwoDimInputsFixture   
)

Definition at line 102 of file AddN.cpp.

103 {
104  RunTest<2>({ { "input0", { 1.0, 2.0, 3.0, 4.0 } },
105  { "input1", { 1.0, 5.0, 2.0, 2.0 } } },
106  { { "output", { 2.0, 7.0, 5.0, 6.0 } } });
107 }

◆ BOOST_FIXTURE_TEST_CASE() [3/7]

BOOST_FIXTURE_TEST_CASE ( ThreeTwoDimInputs  ,
ThreeTwoDimInputsFixture   
)

Definition at line 114 of file AddN.cpp.

115 {
116  RunTest<2>({ { "input0", { 1.0, 2.0, 3.0, 4.0 } },
117  { "input1", { 1.0, 5.0, 2.0, 2.0 } },
118  { "input2", { 1.0, 1.0, 2.0, 2.0 } } },
119  { { "output", { 3.0, 8.0, 7.0, 8.0 } } });
120 }

◆ BOOST_FIXTURE_TEST_CASE() [4/7]

BOOST_FIXTURE_TEST_CASE ( EightTwoDimInputs  ,
EightTwoDimInputsFixture   
)

Definition at line 128 of file AddN.cpp.

129 {
130  RunTest<2>({ { "input0", { 1.0, 2.0, 3.0, 4.0 } },
131  { "input1", { 1.0, 5.0, 2.0, 2.0 } },
132  { "input2", { 1.0, 1.0, 2.0, 2.0 } },
133  { "input3", { 3.0, 7.0, 1.0, 2.0 } },
134  { "input4", { 8.0, 0.0, -2.0, -3.0 } },
135  { "input5", {-3.0, 2.0, -1.0, -5.0 } },
136  { "input6", { 1.0, 6.0, 2.0, 2.0 } },
137  { "input7", {-19.0, 7.0, 1.0, -10.0 } } },
138  { { "output", {-7.0, 30.0, 8.0, -6.0 } } });
139 }

◆ BOOST_FIXTURE_TEST_CASE() [5/7]

BOOST_FIXTURE_TEST_CASE ( ThreeInputBroadcast1D4D4DInputs  ,
ThreeInputBroadcast1D4D4DInputsFixture   
)

Definition at line 146 of file AddN.cpp.

147 {
148  RunTest<4>({ { "input0", { 1.0 } },
149  { "input1", { 1.0, 5.0, 2.0, 2.0 } },
150  { "input2", { 1.0, 1.0, 2.0, 2.0 } } },
151  { { "output", { 3.0, 7.0, 5.0, 5.0 } } });
152 }

◆ BOOST_FIXTURE_TEST_CASE() [6/7]

BOOST_FIXTURE_TEST_CASE ( ThreeInputBroadcast4D1D4DInputs  ,
ThreeInputBroadcast4D1D4DInputsFixture   
)

Definition at line 159 of file AddN.cpp.

160 {
161  RunTest<4>({ { "input0", { 1.0, 3.0, 9.0, 4.0 } },
162  { "input1", {-2.0 } },
163  { "input2", { 1.0, 1.0, 2.0, 2.0 } } },
164  { { "output", { 0.0, 2.0, 9.0, 4.0 } } });
165 }

◆ BOOST_FIXTURE_TEST_CASE() [7/7]

BOOST_FIXTURE_TEST_CASE ( ThreeInputBroadcast4D4D1DInputs  ,
ThreeInputBroadcast4D4D1DInputsFixture   
)

Definition at line 172 of file AddN.cpp.

References BOOST_AUTO_TEST_SUITE_END().

173 {
174  RunTest<4>({ { "input0", { 1.0, 5.0, 2.0, 2.0 } },
175  { "input1", { 1.0, 1.0, 2.0, 2.0 } },
176  { "input2", { 1.0 } } },
177  { { "output", { 3.0, 7.0, 5.0, 5.0 } } });
178 }