aboutsummaryrefslogtreecommitdiff
path: root/src/armnnTfParser/test/Greater.cpp
diff options
context:
space:
mode:
authorkevmay01 <kevin.may@arm.com>2019-01-24 14:05:09 +0000
committerkevmay01 <kevin.may@arm.com>2019-01-24 14:05:09 +0000
commit2b4d88e34ac1f965417fd236fd4786f26bae2042 (patch)
tree4518b52c6a22e33c4b467588a2843c9d5f1a9ee6 /src/armnnTfParser/test/Greater.cpp
parent94412aff782472be54dce4328e2ecee0225b3e97 (diff)
downloadarmnn-2b4d88e34ac1f965417fd236fd4786f26bae2042.tar.gz
IVGCVSW-2503 Refactor RefElementwiseWorkload around Equal and Greater
* Remove Equal and Greater from RefElementwiseWorkload * Create RefComparisonWorkload and add Equal and Greater * Update ElementwiseFunction for different input/output types * Update TfParser to create Equal/Greater with Boolean output * Update relevant tests to check for Boolean comparison Change-Id: I299b7f2121769c960ac0c6139764a5f3c89c9c32
Diffstat (limited to 'src/armnnTfParser/test/Greater.cpp')
-rw-r--r--src/armnnTfParser/test/Greater.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/armnnTfParser/test/Greater.cpp b/src/armnnTfParser/test/Greater.cpp
index f11c199599..d1e793987b 100644
--- a/src/armnnTfParser/test/Greater.cpp
+++ b/src/armnnTfParser/test/Greater.cpp
@@ -91,9 +91,9 @@ struct GreaterFixtureTwoByTwo : public GreaterFixtureAutoSetup
BOOST_FIXTURE_TEST_CASE(ParseGreaterTwoByTwo, GreaterFixtureTwoByTwo)
{
- RunTest<2>({ { "input0", { 1.0f, 2.0f, 3.0f, 4.0f} },
- { "input1", { 1.0f, 5.0f, 2.0f, 2.0f} } },
- { { "output", { 0.0f, 0.0f, 1.0f, 1.0f} } });
+ RunComparisonTest<2>({ { "input0", { 1.0f, 2.0f, 3.0f, 4.0f} },
+ { "input1", { 1.0f, 5.0f, 2.0f, 2.0f} } },
+ { { "output", { 0, 0, 1, 1} } });
}
struct GreaterBroadcast1DAnd4D : public GreaterFixtureAutoSetup
@@ -103,9 +103,9 @@ struct GreaterBroadcast1DAnd4D : public GreaterFixtureAutoSetup
BOOST_FIXTURE_TEST_CASE(ParseGreaterBroadcast1DToTwoByTwo, GreaterBroadcast1DAnd4D)
{
- RunTest<4>({ { "input0", { 2.0f } },
- { "input1", { 1.0f, 2.0f, 3.0f, 2.0f } } },
- { { "output", { 1.0f, 0.0f, 0.0f, 0.0f } } });
+ RunComparisonTest<4>({ { "input0", { 2.0f } },
+ { "input1", { 1.0f, 2.0f, 3.0f, 2.0f } } },
+ { { "output", { 1, 0, 0, 0 } } });
}
struct GreaterBroadcast4DAnd1D : public GreaterFixtureAutoSetup
@@ -115,9 +115,9 @@ struct GreaterBroadcast4DAnd1D : public GreaterFixtureAutoSetup
BOOST_FIXTURE_TEST_CASE(ParseGreaterBroadcast4DAnd1D, GreaterBroadcast4DAnd1D)
{
- RunTest<4>({ { "input0", { 1.0f, 2.0f, 3.0f, 2.0f } },
- { "input1", { 3.0f } } },
- { { "output", { 0.0f, 0.0f, 0.0f, 0.0f } } });
+ RunComparisonTest<4>({ { "input0", { 1.0f, 2.0f, 3.0f, 2.0f } },
+ { "input1", { 3.0f } } },
+ { { "output", { 0, 0, 0, 0 } } });
}
struct GreaterMultiDimBroadcast : public GreaterFixtureAutoSetup
@@ -127,13 +127,13 @@ struct GreaterMultiDimBroadcast : public GreaterFixtureAutoSetup
BOOST_FIXTURE_TEST_CASE(ParseGreaterMultiDimBroadcast, GreaterMultiDimBroadcast)
{
- RunTest<4>({ { "input0", { 1.0f, 2.0f } },
- { "input1", { 1.0f, 2.0f, 3.0f,
- 3.0f, 2.0f, 2.0f } } },
- { { "output", { 0.0f, 0.0f, 0.0f,
- 1.0f, 0.0f, 0.0f,
- 0.0f, 0.0f, 0.0f,
- 0.0f, 0.0f, 0.0f } } });
+ RunComparisonTest<4>({ { "input0", { 1.0f, 2.0f } },
+ { "input1", { 1.0f, 2.0f, 3.0f,
+ 3.0f, 2.0f, 2.0f } } },
+ { { "output", { 0, 0, 0,
+ 1, 0, 0,
+ 0, 0, 0,
+ 0, 0, 0 } } });
}
BOOST_AUTO_TEST_SUITE_END()