diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2020-10-21 18:33:36 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2020-12-15 18:07:31 +0000 |
commit | 4d9687e70e2d71097cd43929d5f63377c3c44523 (patch) | |
tree | 09b5b89fd51d7b44613f21b889669939bc2c6bb3 /src/graph/backends/GLES/GCFunctionsFactory.cpp | |
parent | aa51a5ba9a3f05be08b94859b53c398edee5d2e3 (diff) | |
download | ComputeLibrary-4d9687e70e2d71097cd43929d5f63377c3c44523.tar.gz |
Address RVO issue on some compilers
Suppresses pessimizing-move during clang compilation as for some gcc
toolchains RVO is not ensured until C++17 thus an explicit call to
std::move might be required to avoid compilation error for non-copyable
ojects (e.g. std::unique_ptr)
Resolves: COMPMID-3599
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: Ie3fa44fb0cf631655aecbeb6c82021a68f500a33
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4230
Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/graph/backends/GLES/GCFunctionsFactory.cpp')
-rw-r--r-- | src/graph/backends/GLES/GCFunctionsFactory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/graph/backends/GLES/GCFunctionsFactory.cpp b/src/graph/backends/GLES/GCFunctionsFactory.cpp index 7d9d388ebe..ac14425ad4 100644 --- a/src/graph/backends/GLES/GCFunctionsFactory.cpp +++ b/src/graph/backends/GLES/GCFunctionsFactory.cpp @@ -120,7 +120,7 @@ std::unique_ptr<IFunction> create_convolution_layer<GCConvolutionLayerFunctions, << " Output shape: " << output->info()->tensor_shape() << (fused_act.enabled() ? " " + to_string(fused_act.activation()) : "") << std::endl); - return func; + return std::move(func); } template <> @@ -172,7 +172,7 @@ std::unique_ptr<IFunction> create_depthwise_convolution_layer<GCDepthwiseConvolu << " Depth multiplier: " << depth_multiplier << (fused_act.enabled() ? " " + to_string(fused_act.activation()) : "") << std::endl); - return func; + return std::move(func); } template <> @@ -226,7 +226,7 @@ std::unique_ptr<IFunction> create_eltwise_layer<GCEltwiseFunctions, GCTargetInfo << " Shape: " << input1->info()->tensor_shape() << std::endl); - return func; + return std::move(func); } } //namespace detail |