aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test/optimizations/ReduceMultipleAxesTests.cpp
diff options
context:
space:
mode:
authorMatthew Bentham <matthew.bentham@arm.com>2021-07-05 12:56:46 +0100
committerMatthew Sloyan <matthew.sloyan@arm.com>2021-07-16 15:59:44 +0000
commita34c98d17b6784e4b5b3a9d77654717e86517bab (patch)
treef48ad62a9cf8ff38ffe438881d28b09a8050134e /src/armnn/test/optimizations/ReduceMultipleAxesTests.cpp
parent18bf43d9caeb7f482e0beaef45202b6638d48a8c (diff)
downloadarmnn-a34c98d17b6784e4b5b3a9d77654717e86517bab.tar.gz
Avoid empty test suites
Refactor code around conditionally-compiled tests to avoid declaring empty test suites, as this can cause unused function warnings to be issued under certain combinations of compiler, warning level, and doctest version. Signed-off-by: Matthew Bentham <matthew.bentham@arm.com> Change-Id: Ib501aef80475538a725b857d9c31d1d2f96b124d
Diffstat (limited to 'src/armnn/test/optimizations/ReduceMultipleAxesTests.cpp')
-rw-r--r--src/armnn/test/optimizations/ReduceMultipleAxesTests.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/armnn/test/optimizations/ReduceMultipleAxesTests.cpp b/src/armnn/test/optimizations/ReduceMultipleAxesTests.cpp
index df9a0dbc39..0be8857224 100644
--- a/src/armnn/test/optimizations/ReduceMultipleAxesTests.cpp
+++ b/src/armnn/test/optimizations/ReduceMultipleAxesTests.cpp
@@ -12,8 +12,9 @@
using namespace armnn;
-TEST_SUITE("Optimizer_ReduceMultipleAxes")
+namespace
{
+#if defined(ARMCOMPUTENEON_ENABLED)||defined(ARMCOMPUTECL_ENABLED)
INetworkPtr CreateSimpleReduceNetwork(ReduceDescriptor reduceDescriptor,
TensorShape& inputShape,
TensorShape& outputShape)
@@ -243,9 +244,12 @@ void ReduceSumWithThreeAxesTest(Compute backendId)
reduceDescriptor.m_vAxis.size(),
backendId);
}
+#endif
+}
-using namespace armnn;
#if defined(ARMCOMPUTENEON_ENABLED)
+TEST_SUITE("Optimizer_ReduceMultipleAxesCpu")
+{
TEST_CASE("ReduceSumWithTwoAxesKeepDimsCpuAccTest")
{
ReduceSumWithTwoAxesKeepDimsTest(Compute::CpuAcc);
@@ -265,9 +269,12 @@ TEST_CASE("ReduceSumWithThreeAxesCpuAccTest")
{
ReduceSumWithThreeAxesTest(Compute::CpuAcc);
}
+}
#endif
#if defined(ARMCOMPUTECL_ENABLED)
+TEST_SUITE("Optimizer_ReduceMultipleAxesGpu")
+{
TEST_CASE("ReduceSumWithTwoAxesKeepDimsGpuAccTest")
{
ReduceSumWithTwoAxesKeepDimsTest(Compute::GpuAcc);
@@ -287,6 +294,5 @@ TEST_CASE("ReduceSumWithThreeAxesGpuAccTest")
{
ReduceSumWithThreeAxesTest(Compute::GpuAcc);
}
+}
#endif
-
-} \ No newline at end of file