aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2019-02-19 18:10:03 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2019-02-20 10:12:45 +0000
commitd57891a80b2a45dfeb41826f2753c5e32b6887c4 (patch)
treed9fbbf8d8a3e1c62a93899a05788c35e06450715 /tests
parentf85433be70e3d8d38025835e3f3fc450a54a2598 (diff)
downloadComputeLibrary-d57891a80b2a45dfeb41826f2753c5e32b6887c4.tar.gz
COMPMID-2007: Compilation failures with ndk16b.
Resolves double brace initialization issues. Change-Id: Ic9319d4abc1d6428cefabc18be1c176bea7607dc Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-on: https://review.mlplatform.org/729 Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/datasets/PriorBoxLayerDataset.h6
-rw-r--r--tests/validation/CL/BoundingBoxTransform.cpp13
-rw-r--r--tests/validation/reference/PadLayer.cpp6
3 files changed, 14 insertions, 11 deletions
diff --git a/tests/datasets/PriorBoxLayerDataset.h b/tests/datasets/PriorBoxLayerDataset.h
index c63e941171..a2392dbafc 100644
--- a/tests/datasets/PriorBoxLayerDataset.h
+++ b/tests/datasets/PriorBoxLayerDataset.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -109,7 +109,7 @@ public:
std::vector<float> var = { 0.1, 0.1, 0.2, 0.2 };
std::vector<float> max_val = { 60.f };
std::vector<float> aspect_ratio = { 2.f };
- std::array<float, 2> steps = { 8.f, 8.f };
+ std::array<float, 2> steps = { { 8.f, 8.f } };
add_config(TensorShape(4U, 4U), PriorBoxLayerInfo(min_val, var, 0.5f, true, false, max_val, aspect_ratio, Coordinates2D{ 8, 8 }, steps));
}
};
@@ -123,7 +123,7 @@ public:
std::vector<float> var = { 0.1, 0.1, 0.2, 0.2 };
std::vector<float> max_val = { 60.f };
std::vector<float> aspect_ratio = { 2.f };
- std::array<float, 2> steps = { 8.f, 8.f };
+ std::array<float, 2> steps = { { 8.f, 8.f } };
add_config(TensorShape(150U, 245U, 4U, 12U), PriorBoxLayerInfo(min_val, var, 0.5f, true, false, max_val, aspect_ratio, Coordinates2D{ 8, 8 }, steps));
}
};
diff --git a/tests/validation/CL/BoundingBoxTransform.cpp b/tests/validation/CL/BoundingBoxTransform.cpp
index c5856cae3d..b6334b5868 100644
--- a/tests/validation/CL/BoundingBoxTransform.cpp
+++ b/tests/validation/CL/BoundingBoxTransform.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -46,12 +46,14 @@ AbsoluteTolerance<float> absolute_tolerance_f32(0.001f);
RelativeTolerance<half> relative_tolerance_f16(half(0.2));
AbsoluteTolerance<float> absolute_tolerance_f16(half(0.02f));
+// *INDENT-OFF*
+// clang-format off
const auto BboxInfoDataset = framework::dataset::make("BboxInfo", { BoundingBoxTransformInfo(20U, 20U, 2U, true),
BoundingBoxTransformInfo(128U, 128U, 4U, true),
BoundingBoxTransformInfo(800U, 600U, 1U, false),
- BoundingBoxTransformInfo(800U, 600U, 2U, true, { 1.0, 0.5, 1.5, 2.0 }),
- BoundingBoxTransformInfo(800U, 600U, 4U, false, { 1.0, 0.5, 1.5, 2.0 }),
- BoundingBoxTransformInfo(800U, 600U, 4U, false, { 1.0, 0.5, 1.5, 2.0 }, true)
+ BoundingBoxTransformInfo(800U, 600U, 2U, true, { { 1.0, 0.5, 1.5, 2.0 } }),
+ BoundingBoxTransformInfo(800U, 600U, 4U, false, { { 1.0, 0.5, 1.5, 2.0 } }),
+ BoundingBoxTransformInfo(800U, 600U, 4U, false, { { 1.0, 0.5, 1.5, 2.0 } }, true)
});
const auto DeltaDataset = framework::dataset::make("DeltasShape", { TensorShape(36U, 1U),
@@ -62,7 +64,8 @@ const auto DeltaDataset = framework::dataset::make("DeltasShape", { TensorShape(
TensorShape(40U, 100U),
TensorShape(40U, 200U)
});
-
+// clang-format on
+// *INDENT-ON*
} // namespace
TEST_SUITE(CL)
diff --git a/tests/validation/reference/PadLayer.cpp b/tests/validation/reference/PadLayer.cpp
index 0a3b38d697..b9a93ddaff 100644
--- a/tests/validation/reference/PadLayer.cpp
+++ b/tests/validation/reference/PadLayer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -65,8 +65,8 @@ SimpleTensor<T> pad_layer(const SimpleTensor<T> &src, const PaddingList &padding
const size_t m = coord[4];
const size_t n = coord[5];
- std::array<size_t, TensorShape::num_max_dimensions> dims = { 0, 1, 2, 3, 4, 5 };
- std::array<size_t, TensorShape::num_max_dimensions> coords = { i, j, k, l, m, n };
+ std::array<size_t, TensorShape::num_max_dimensions> dims = { { 0, 1, 2, 3, 4, 5 } };
+ std::array<size_t, TensorShape::num_max_dimensions> coords = { { i, j, k, l, m, n } };
auto is_padding_area = [&](size_t i)
{
return (coords[i] < paddings_extended[i].first || coords[i] > orig_shape[i] + paddings_extended[i].first - 1);