From 4d9687e70e2d71097cd43929d5f63377c3c44523 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 21 Oct 2020 18:33:36 +0100 Subject: 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 Change-Id: Ie3fa44fb0cf631655aecbeb6c82021a68f500a33 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4230 Reviewed-by: Giorgio Arena Reviewed-by: Michalis Spyrou Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/graph/backends/CL/CLFunctionsFactory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/graph/backends/CL/CLFunctionsFactory.cpp') diff --git a/src/graph/backends/CL/CLFunctionsFactory.cpp b/src/graph/backends/CL/CLFunctionsFactory.cpp index 619641804b..5c98ce3b85 100644 --- a/src/graph/backends/CL/CLFunctionsFactory.cpp +++ b/src/graph/backends/CL/CLFunctionsFactory.cpp @@ -167,7 +167,7 @@ std::unique_ptr create_detection_output_layerregister_tensor(input2); wrap_function->register_tensor(output); - return RETURN_UNIQUE_PTR(wrap_function); + return std::move(wrap_function); } template <> std::unique_ptr create_detection_post_process_layer(DetectionPostProcessLayerNode &node) @@ -223,7 +223,7 @@ std::unique_ptr create_detection_post_process_layerregister_tensor(output2); wrap_function->register_tensor(output3); - return RETURN_UNIQUE_PTR(wrap_function); + return std::move(wrap_function); } } // namespace detail -- cgit v1.2.1