From afd38f0c617d6f89b2b4532c6c44f116617e2b6f Mon Sep 17 00:00:00 2001 From: Felix Thomasmathibalan Date: Wed, 27 Sep 2023 17:46:17 +0100 Subject: Apply clang-format on repository Code is formatted as per a revised clang format configuration file(not part of this delivery). Version 14.0.6 is used. Exclusion List: - files with .cl extension - files that are not strictly C/C++ (e.g. Android.bp, Sconscript ...) And the following directories - compute_kernel_writer/validation/ - tests/ - include/ - src/core/NEON/kernels/convolution/ - src/core/NEON/kernels/arm_gemm/ - src/core/NEON/kernels/arm_conv/ - data/ There will be a follow up for formatting of .cl files and the files under tests/ and compute_kernel_writer/validation/. Signed-off-by: Felix Thomasmathibalan Change-Id: Ib7eb1fcf4e7537b9feaefcfc15098a804a3fde0a Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10391 Benchmark: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Gunes Bayir --- src/graph/GraphContext.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/graph/GraphContext.cpp') diff --git a/src/graph/GraphContext.cpp b/src/graph/GraphContext.cpp index 7b74c2fe0e..10850aa259 100644 --- a/src/graph/GraphContext.cpp +++ b/src/graph/GraphContext.cpp @@ -24,15 +24,14 @@ #include "arm_compute/graph/GraphContext.h" #include "arm_compute/graph.h" -#include "arm_compute/graph/Utils.h" #include "arm_compute/graph/backends/BackendRegistry.h" +#include "arm_compute/graph/Utils.h" namespace arm_compute { namespace graph { -GraphContext::GraphContext() - : _config(), _memory_managers(), _weights_managers() +GraphContext::GraphContext() : _config(), _memory_managers(), _weights_managers() { } @@ -56,7 +55,7 @@ void GraphContext::set_config(const GraphConfig &config) bool GraphContext::insert_memory_management_ctx(MemoryManagerContext &&memory_ctx) { Target target = memory_ctx.target; - if(target == Target::UNSPECIFIED || _memory_managers.find(target) != std::end(_memory_managers)) + if (target == Target::UNSPECIFIED || _memory_managers.find(target) != std::end(_memory_managers)) { return false; } @@ -79,7 +78,7 @@ bool GraphContext::insert_weights_management_ctx(WeightsManagerContext &&weights { Target target = weights_managers.target; - if(_weights_managers.find(target) != std::end(_weights_managers)) + if (_weights_managers.find(target) != std::end(_weights_managers)) { return false; } @@ -102,17 +101,17 @@ std::map &GraphContext::weights_managers() void GraphContext::finalize() { const size_t num_pools = 1; - for(auto &mm_obj : _memory_managers) + for (auto &mm_obj : _memory_managers) { ARM_COMPUTE_ERROR_ON(!mm_obj.second.allocator); // Finalize intra layer memory manager - if(mm_obj.second.intra_mm != nullptr) + if (mm_obj.second.intra_mm != nullptr) { mm_obj.second.intra_mm->populate(*mm_obj.second.allocator, num_pools); } // Finalize cross layer memory manager - if(mm_obj.second.cross_mm != nullptr) + if (mm_obj.second.cross_mm != nullptr) { mm_obj.second.cross_mm->populate(*mm_obj.second.allocator, num_pools); } -- cgit v1.2.1