From afae756dfea0a8d4e9bcf05bd6293166ccf3b55f Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Tue, 19 Feb 2019 18:10:03 +0000 Subject: COMPMID-2007: Compilation failures with ndk16b. Resolves double brace initialization issues. Change-Id: Ic9319d4abc1d6428cefabc18be1c176bea7607dc Signed-off-by: Georgios Pinitas Reviewed-on: https://review.mlplatform.org/729 Reviewed-by: Michele Di Giorgio Reviewed-by: Michalis Spyrou Tested-by: Arm Jenkins --- tests/datasets/PriorBoxLayerDataset.h | 6 +++--- tests/validation/CL/BoundingBoxTransform.cpp | 13 ++++++++----- tests/validation/reference/PadLayer.cpp | 6 +++--- 3 files changed, 14 insertions(+), 11 deletions(-) (limited to 'tests') 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 var = { 0.1, 0.1, 0.2, 0.2 }; std::vector max_val = { 60.f }; std::vector aspect_ratio = { 2.f }; - std::array steps = { 8.f, 8.f }; + std::array 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 var = { 0.1, 0.1, 0.2, 0.2 }; std::vector max_val = { 60.f }; std::vector aspect_ratio = { 2.f }; - std::array steps = { 8.f, 8.f }; + std::array 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 absolute_tolerance_f32(0.001f); RelativeTolerance relative_tolerance_f16(half(0.2)); AbsoluteTolerance 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 pad_layer(const SimpleTensor &src, const PaddingList &padding const size_t m = coord[4]; const size_t n = coord[5]; - std::array dims = { 0, 1, 2, 3, 4, 5 }; - std::array coords = { i, j, k, l, m, n }; + std::array dims = { { 0, 1, 2, 3, 4, 5 } }; + std::array 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); -- cgit v1.2.1