diff options
author | Felix Thomasmathibalan <felixjohnny.thomasmathibalan@arm.com> | 2023-09-27 17:46:17 +0100 |
---|---|---|
committer | felixjohnny.thomasmathibalan <felixjohnny.thomasmathibalan@arm.com> | 2023-09-28 12:08:05 +0000 |
commit | afd38f0c617d6f89b2b4532c6c44f116617e2b6f (patch) | |
tree | 03bc7d5a762099989b16a656fa8d397b490ed70e /src/graph/backends/NEON/NEDeviceBackend.cpp | |
parent | bdcb4c148ee2fdeaaddf4cf1e57bbb0de02bb894 (diff) | |
download | ComputeLibrary-afd38f0c617d6f89b2b4532c6c44f116617e2b6f.tar.gz |
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 <felixjohnny.thomasmathibalan@arm.com>
Change-Id: Ib7eb1fcf4e7537b9feaefcfc15098a804a3fde0a
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10391
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Diffstat (limited to 'src/graph/backends/NEON/NEDeviceBackend.cpp')
-rw-r--r-- | src/graph/backends/NEON/NEDeviceBackend.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/graph/backends/NEON/NEDeviceBackend.cpp b/src/graph/backends/NEON/NEDeviceBackend.cpp index 18456538da..fc7b309803 100644 --- a/src/graph/backends/NEON/NEDeviceBackend.cpp +++ b/src/graph/backends/NEON/NEDeviceBackend.cpp @@ -23,18 +23,17 @@ */ #include "arm_compute/graph/backends/NEON/NEDeviceBackend.h" -#include "arm_compute/graph/Graph.h" -#include "arm_compute/graph/GraphContext.h" -#include "arm_compute/graph/INode.h" -#include "arm_compute/graph/Logger.h" -#include "arm_compute/graph/Tensor.h" +#include "arm_compute/core/TensorInfo.h" #include "arm_compute/graph/backends/BackendRegistrar.h" #include "arm_compute/graph/backends/NEON/NEFunctionFactory.h" #include "arm_compute/graph/backends/NEON/NENodeValidator.h" #include "arm_compute/graph/backends/NEON/NESubTensorHandle.h" #include "arm_compute/graph/backends/NEON/NETensorHandle.h" - -#include "arm_compute/core/TensorInfo.h" +#include "arm_compute/graph/Graph.h" +#include "arm_compute/graph/GraphContext.h" +#include "arm_compute/graph/INode.h" +#include "arm_compute/graph/Logger.h" +#include "arm_compute/graph/Tensor.h" #include "arm_compute/runtime/Allocator.h" #include "arm_compute/runtime/BlobLifetimeManager.h" #include "arm_compute/runtime/IWeightsManager.h" @@ -53,8 +52,7 @@ namespace backends /** Register CPU backend */ static detail::BackendRegistrar<NEDeviceBackend> NEDeviceBackend_registrar(Target::NEON); -NEDeviceBackend::NEDeviceBackend() - : _allocator() +NEDeviceBackend::NEDeviceBackend() : _allocator() { } @@ -72,13 +70,13 @@ void NEDeviceBackend::release_backend_context(GraphContext &ctx) void NEDeviceBackend::setup_backend_context(GraphContext &ctx) { // Set number of threads - if(ctx.config().num_threads >= 0) + if (ctx.config().num_threads >= 0) { Scheduler::get().set_num_threads(ctx.config().num_threads); } // Create function level memory manager - if(ctx.memory_management_ctx(Target::NEON) == nullptr) + if (ctx.memory_management_ctx(Target::NEON) == nullptr) { MemoryManagerContext mm_ctx; mm_ctx.target = Target::NEON; @@ -91,7 +89,7 @@ void NEDeviceBackend::setup_backend_context(GraphContext &ctx) } // Create function level weights manager - if(ctx.weights_management_ctx(Target::NEON) == nullptr) + if (ctx.weights_management_ctx(Target::NEON) == nullptr) { WeightsManagerContext wm_ctx; wm_ctx.target = Target::NEON; @@ -124,9 +122,10 @@ std::unique_ptr<ITensorHandle> NEDeviceBackend::create_tensor(const Tensor &tens return std::make_unique<NETensorHandle>(info); } -std::unique_ptr<ITensorHandle> NEDeviceBackend::create_subtensor(ITensorHandle *parent, TensorShape shape, Coordinates coords, bool extend_parent) +std::unique_ptr<ITensorHandle> +NEDeviceBackend::create_subtensor(ITensorHandle *parent, TensorShape shape, Coordinates coords, bool extend_parent) { - if(parent == nullptr) + if (parent == nullptr) { return nullptr; } @@ -154,7 +153,7 @@ arm_compute::Status NEDeviceBackend::validate_node(INode &node) std::shared_ptr<arm_compute::IMemoryManager> NEDeviceBackend::create_memory_manager(MemoryManagerAffinity affinity) { std::shared_ptr<ILifetimeManager> lifetime_mgr = nullptr; - if(affinity == MemoryManagerAffinity::Buffer) + if (affinity == MemoryManagerAffinity::Buffer) { lifetime_mgr = std::make_shared<BlobLifetimeManager>(); } |