aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/MemoryGroup.h
diff options
context:
space:
mode:
authorFelix Thomasmathibalan <felixjohnny.thomasmathibalan@arm.com>2023-09-27 17:46:17 +0100
committerfelixjohnny.thomasmathibalan <felixjohnny.thomasmathibalan@arm.com>2023-09-28 12:08:05 +0000
commitafd38f0c617d6f89b2b4532c6c44f116617e2b6f (patch)
tree03bc7d5a762099989b16a656fa8d397b490ed70e /arm_compute/runtime/MemoryGroup.h
parentbdcb4c148ee2fdeaaddf4cf1e57bbb0de02bb894 (diff)
downloadComputeLibrary-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 'arm_compute/runtime/MemoryGroup.h')
-rw-r--r--arm_compute/runtime/MemoryGroup.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/arm_compute/runtime/MemoryGroup.h b/arm_compute/runtime/MemoryGroup.h
index 9fd2b9fa72..93ea3d2c72 100644
--- a/arm_compute/runtime/MemoryGroup.h
+++ b/arm_compute/runtime/MemoryGroup.h
@@ -24,10 +24,9 @@
#ifndef ARM_COMPUTE_MEMORYGROUP_H
#define ARM_COMPUTE_MEMORYGROUP_H
-#include "arm_compute/runtime/IMemoryGroup.h"
-
#include "arm_compute/core/Error.h"
#include "arm_compute/core/utils/misc/Macros.h"
+#include "arm_compute/runtime/IMemoryGroup.h"
#include "arm_compute/runtime/IMemoryManager.h"
#include "arm_compute/runtime/IMemoryPool.h"
@@ -59,8 +58,8 @@ public:
// Inherited methods overridden:
void manage(IMemoryManageable *obj) override;
void finalize_memory(IMemoryManageable *obj, IMemory &obj_memory, size_t size, size_t alignment) override;
- void acquire() override;
- void release() override;
+ void acquire() override;
+ void release() override;
MemoryMappings &mappings() override;
private:
@@ -70,15 +69,13 @@ private:
};
inline MemoryGroup::MemoryGroup(std::shared_ptr<IMemoryManager> memory_manager) noexcept
- : _memory_manager(memory_manager),
- _pool(nullptr),
- _mappings()
+ : _memory_manager(memory_manager), _pool(nullptr), _mappings()
{
}
inline void MemoryGroup::manage(IMemoryManageable *obj)
{
- if(_memory_manager && (obj != nullptr))
+ if (_memory_manager && (obj != nullptr))
{
ARM_COMPUTE_ERROR_ON(!_memory_manager->lifetime_manager());
@@ -95,7 +92,7 @@ inline void MemoryGroup::manage(IMemoryManageable *obj)
inline void MemoryGroup::finalize_memory(IMemoryManageable *obj, IMemory &obj_memory, size_t size, size_t alignment)
{
- if(_memory_manager)
+ if (_memory_manager)
{
ARM_COMPUTE_ERROR_ON(!_memory_manager->lifetime_manager());
_memory_manager->lifetime_manager()->end_lifetime(obj, obj_memory, size, alignment);
@@ -104,7 +101,7 @@ inline void MemoryGroup::finalize_memory(IMemoryManageable *obj, IMemory &obj_me
inline void MemoryGroup::acquire()
{
- if(!_mappings.empty())
+ if (!_mappings.empty())
{
ARM_COMPUTE_ERROR_ON(!_memory_manager->pool_manager());
_pool = _memory_manager->pool_manager()->lock_pool();
@@ -114,7 +111,7 @@ inline void MemoryGroup::acquire()
inline void MemoryGroup::release()
{
- if(_pool != nullptr)
+ if (_pool != nullptr)
{
ARM_COMPUTE_ERROR_ON(!_memory_manager->pool_manager());
ARM_COMPUTE_ERROR_ON(_mappings.empty());
@@ -128,5 +125,5 @@ inline MemoryMappings &MemoryGroup::mappings()
{
return _mappings;
}
-} // arm_compute
+} // namespace arm_compute
#endif /*ARM_COMPUTE_MEMORYGROUP_H */