diff options
author | Pablo Marquez Tello <pablo.tello@arm.com> | 2021-03-18 11:31:13 +0000 |
---|---|---|
committer | Pablo Marquez Tello <pablo.tello@arm.com> | 2021-03-23 14:52:43 +0000 |
commit | 383de02788f8edf0d8474890018fdd97c6eadd3f (patch) | |
tree | fdf36d2a4131cb3b16932489c61559c6c31c3031 | |
parent | 049989a103912f43d377591ed177eafaefe10877 (diff) | |
download | ComputeLibrary-383de02788f8edf0d8474890018fdd97c6eadd3f.tar.gz |
Fixed compiler errors
* Some compilers fail to build due to the inconsistent use of the noexcept clause
Change-Id: I1f44abec84d8d0c8dd45662d1e309d006dcf9b64
Signed-off-by: Pablo Marquez Tello <pablo.tello@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5281
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Reviewed-by: Manuel Bottini <manuel.bottini@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r-- | arm_compute/core/KernelDescriptors.h | 14 | ||||
-rw-r--r-- | arm_compute/core/PixelValue.h | 9 | ||||
-rw-r--r-- | arm_compute/core/Types.h | 14 | ||||
-rw-r--r-- | arm_compute/core/experimental/Types.h | 6 | ||||
-rw-r--r-- | arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h | 2 | ||||
-rw-r--r-- | src/common/utils/Object.h | 5 | ||||
-rw-r--r-- | src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp | 2 |
7 files changed, 32 insertions, 20 deletions
diff --git a/arm_compute/core/KernelDescriptors.h b/arm_compute/core/KernelDescriptors.h index 1f3cee2dd1..0025301e48 100644 --- a/arm_compute/core/KernelDescriptors.h +++ b/arm_compute/core/KernelDescriptors.h @@ -191,14 +191,14 @@ struct ScaleKernelInfo SamplingPolicy sampling_policy = SamplingPolicy::CENTER, bool use_padding = true, bool align_corners = false, - DataLayout data_layout = DataLayout::UNKNOWN) + DataLayout data_layout = DataLayout::UNKNOWN) noexcept : interpolation_policy{ interpolation_policy }, - border_mode{ border_mode }, - constant_border_value{ constant_border_value }, - sampling_policy{ sampling_policy }, - use_padding{ use_padding }, - align_corners{ align_corners }, - data_layout{ data_layout } + border_mode{ border_mode }, + constant_border_value{ constant_border_value }, + sampling_policy{ sampling_policy }, + use_padding{ use_padding }, + align_corners{ align_corners }, + data_layout{ data_layout } { } diff --git a/arm_compute/core/PixelValue.h b/arm_compute/core/PixelValue.h index f744d6443e..0e3d26c515 100644 --- a/arm_compute/core/PixelValue.h +++ b/arm_compute/core/PixelValue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 Arm Limited. + * Copyright (c) 2016-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -35,8 +35,11 @@ class PixelValue { public: /** Default constructor: value initialized to 0 */ - PixelValue() - : value{ int64_t(0) } + PixelValue() noexcept + : value + { + int64_t(0) + } { } /** Initialize the union with a pixel value of chosen datatype diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h index 5c897b9110..a2ad51526b 100644 --- a/arm_compute/core/Types.h +++ b/arm_compute/core/Types.h @@ -273,14 +273,20 @@ enum class BorderMode struct BorderSize { /** Empty border, i.e. no border */ - constexpr BorderSize() - : top{ 0 }, right{ 0 }, bottom{ 0 }, left{ 0 } + constexpr BorderSize() noexcept + : top{ 0 }, + right{ 0 }, + bottom{ 0 }, + left{ 0 } { } /** Border with equal size around the 2D plane */ - explicit constexpr BorderSize(unsigned int size) - : top{ size }, right{ size }, bottom{ size }, left{ size } + explicit constexpr BorderSize(unsigned int size) noexcept + : top{ size }, + right{ size }, + bottom{ size }, + left{ size } { } diff --git a/arm_compute/core/experimental/Types.h b/arm_compute/core/experimental/Types.h index 2a4bd89385..7ddb930421 100644 --- a/arm_compute/core/experimental/Types.h +++ b/arm_compute/core/experimental/Types.h @@ -60,8 +60,10 @@ namespace experimental { struct MemoryInfo { - MemoryInfo(TensorType type, size_t size, size_t alignment) - : type(type), size(size), alignment(alignment) + MemoryInfo(TensorType type, size_t size, size_t alignment) noexcept + : type(type), + size(size), + alignment(alignment) { } TensorType type; diff --git a/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h b/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h index 18ccc9f015..33f00c087c 100644 --- a/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h +++ b/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h @@ -51,7 +51,7 @@ class NEConvolutionLayerReshapeWeights : public IFunction { public: /** Constructor */ - NEConvolutionLayerReshapeWeights(); + NEConvolutionLayerReshapeWeights() noexcept; /** Prevent instances of this class from being copied (As this class contains pointers) */ NEConvolutionLayerReshapeWeights(const NEConvolutionLayerReshapeWeights &) = delete; /** Prevent instances of this class from being moved (As this class contains non movable objects) */ diff --git a/src/common/utils/Object.h b/src/common/utils/Object.h index 6f56f77d3c..1f194737d4 100644 --- a/src/common/utils/Object.h +++ b/src/common/utils/Object.h @@ -52,8 +52,9 @@ struct Header * @param[in] type_ Object identification type * @param[in] ctx_ Context to reference */ - Header(ObjectType type_, IContext *ctx_) - : type(type_), ctx(ctx_) + Header(ObjectType type_, IContext *ctx_) noexcept + : type(type_), + ctx(ctx_) { } diff --git a/src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp b/src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp index e2db6b48cd..59747a82f9 100644 --- a/src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp +++ b/src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp @@ -52,7 +52,7 @@ namespace arm_compute using namespace arm_compute::misc::shape_calculator; NEConvolutionLayerReshapeWeights::~NEConvolutionLayerReshapeWeights() = default; -NEConvolutionLayerReshapeWeights::NEConvolutionLayerReshapeWeights() +NEConvolutionLayerReshapeWeights::NEConvolutionLayerReshapeWeights() noexcept : _weights_reshape_kernel() { } |