From 5cb49dcf7ad74cc6e7e91790b7132ae4dd845515 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Tue, 3 Dec 2019 13:42:25 +0000 Subject: COMPMID-2962 Fix compiler warnings for g++8 Change-Id: I410c4c54577c1f253597821b1ec6cc40d936b96f Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/2406 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins --- arm_compute/core/NEON/kernels/assembly/arm_gemm.hpp | 2 +- src/runtime/NEON/functions/NEGEMMAssemblyDispatch.cpp | 11 ++++++++++- tests/validation/CL/UNIT/DynamicTensor.cpp | 4 +++- tests/validation/GLES_COMPUTE/UNIT/DynamicTensor.cpp | 6 +++--- tests/validation/NEON/UNIT/DynamicTensor.cpp | 5 +++-- tests/validation/fixtures/UNIT/DynamicTensorFixture.h | 3 --- 6 files changed, 20 insertions(+), 11 deletions(-) diff --git a/arm_compute/core/NEON/kernels/assembly/arm_gemm.hpp b/arm_compute/core/NEON/kernels/assembly/arm_gemm.hpp index 17faab18fd..d51fda525b 100644 --- a/arm_compute/core/NEON/kernels/assembly/arm_gemm.hpp +++ b/arm_compute/core/NEON/kernels/assembly/arm_gemm.hpp @@ -51,7 +51,7 @@ struct KernelDescription bool is_default = false; KernelDescription(GemmMethod m, std::string n, bool d=false) : method(m), name(n), is_default(d) { } - KernelDescription() { } + KernelDescription() noexcept { } }; struct GemmConfig diff --git a/src/runtime/NEON/functions/NEGEMMAssemblyDispatch.cpp b/src/runtime/NEON/functions/NEGEMMAssemblyDispatch.cpp index 24254eb9e5..6551518bc2 100644 --- a/src/runtime/NEON/functions/NEGEMMAssemblyDispatch.cpp +++ b/src/runtime/NEON/functions/NEGEMMAssemblyDispatch.cpp @@ -69,7 +69,16 @@ template class FallbackTransform : public ITransformWeights { public: - void run() override + FallbackTransform() noexcept {}; + /** Prevent instances of this class from being copied (As this class contains pointers) */ + FallbackTransform(const FallbackTransform &) = delete; + /** Default move constructor */ + FallbackTransform(FallbackTransform &&) = default; + /** Prevent instances of this class from being copied (As this class contains pointers) */ + FallbackTransform &operator=(const FallbackTransform &) = delete; + /** Default move assignment operator */ + FallbackTransform &operator=(FallbackTransform &&) = default; + void run() override { _output.allocator()->allocate(); ARM_COMPUTE_ERROR_ON(_output.buffer() == nullptr); diff --git a/tests/validation/CL/UNIT/DynamicTensor.cpp b/tests/validation/CL/UNIT/DynamicTensor.cpp index 85381efe62..ceb505142a 100644 --- a/tests/validation/CL/UNIT/DynamicTensor.cpp +++ b/tests/validation/CL/UNIT/DynamicTensor.cpp @@ -50,14 +50,16 @@ namespace constexpr AbsoluteTolerance absolute_tolerance_float(0.0001f); /**< Absolute Tolerance value for comparing reference's output against implementation's output for DataType::F32 */ RelativeTolerance tolerance_f32(0.1f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */ constexpr float tolerance_num = 0.07f; /**< Tolerance number */ +} // namespace +#ifndef DOXYGEN_SKIP_THIS using CLL2NormLayerWrapper = SimpleFunctionWrapper; template <> void CLL2NormLayerWrapper::configure(ICLTensor *src, ICLTensor *dst) { _func.configure(src, dst, 0, 0.0001f); } -} // namespace +#endif // DOXYGEN_SKIP_THIS TEST_SUITE(CL) TEST_SUITE(UNIT) TEST_SUITE(DynamicTensor) diff --git a/tests/validation/GLES_COMPUTE/UNIT/DynamicTensor.cpp b/tests/validation/GLES_COMPUTE/UNIT/DynamicTensor.cpp index cab854424e..f7264b281e 100644 --- a/tests/validation/GLES_COMPUTE/UNIT/DynamicTensor.cpp +++ b/tests/validation/GLES_COMPUTE/UNIT/DynamicTensor.cpp @@ -43,15 +43,15 @@ namespace test { namespace validation { -namespace -{ +#ifndef DOXYGEN_SKIP_THIS using GCNormLayerWrapper = SimpleFunctionWrapper; template <> void GCNormLayerWrapper::configure(IGCTensor *src, IGCTensor *dst) { _func.configure(src, dst, NormalizationLayerInfo(NormType::CROSS_MAP, 3)); } -} // namespace +#endif // DOXYGEN_SKIP_THIS + TEST_SUITE(GC) TEST_SUITE(UNIT) TEST_SUITE(DynamicTensor) diff --git a/tests/validation/NEON/UNIT/DynamicTensor.cpp b/tests/validation/NEON/UNIT/DynamicTensor.cpp index 53dec53912..76f30d00e5 100644 --- a/tests/validation/NEON/UNIT/DynamicTensor.cpp +++ b/tests/validation/NEON/UNIT/DynamicTensor.cpp @@ -47,14 +47,15 @@ namespace constexpr AbsoluteTolerance absolute_tolerance_float(0.0001f); /**< Absolute Tolerance value for comparing reference's output against implementation's output for DataType::F32 */ RelativeTolerance tolerance_f32(0.1f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */ constexpr float tolerance_num = 0.07f; /**< Tolerance number */ - +} // namespace +#ifndef DOXYGEN_SKIP_THIS using NENormLayerWrapper = SimpleFunctionWrapper; template <> void NENormLayerWrapper::configure(arm_compute::ITensor *src, arm_compute::ITensor *dst) { _func.configure(src, dst, NormalizationLayerInfo(NormType::CROSS_MAP, 3)); } -} // namespace +#endif // DOXYGEN_SKIP_THIS TEST_SUITE(NEON) TEST_SUITE(UNIT) TEST_SUITE(DynamicTensor) diff --git a/tests/validation/fixtures/UNIT/DynamicTensorFixture.h b/tests/validation/fixtures/UNIT/DynamicTensorFixture.h index 02d28fa78d..86380509ed 100644 --- a/tests/validation/fixtures/UNIT/DynamicTensorFixture.h +++ b/tests/validation/fixtures/UNIT/DynamicTensorFixture.h @@ -41,8 +41,6 @@ namespace test { namespace validation { -namespace -{ template