From 9aed8fb43441228343b925b42464a55042c47ca0 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Wed, 17 Nov 2021 13:16:45 +0000 Subject: IVGCVSW-6040 Update 21.11 Doxygen Documents Signed-off-by: Nikhil Raj Change-Id: Ia36ec98c4bebc27a69103911ea3409cd7db587a5 --- 21.11/_default_allocator_8hpp_source.xhtml | 126 +++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 21.11/_default_allocator_8hpp_source.xhtml (limited to '21.11/_default_allocator_8hpp_source.xhtml') diff --git a/21.11/_default_allocator_8hpp_source.xhtml b/21.11/_default_allocator_8hpp_source.xhtml new file mode 100644 index 0000000000..868b8efae0 --- /dev/null +++ b/21.11/_default_allocator_8hpp_source.xhtml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + +ArmNN: src/backends/backendsCommon/DefaultAllocator.hpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.11 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
DefaultAllocator.hpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <cstddef>
9 #include <memory>
10 #include <armnn/MemorySources.hpp>
12 
13 namespace armnn
14 {
15 
16 /** Default Memory Allocator class returned from IBackendInternal::GetDefaultAllocator(MemorySource) */
18 {
19 public:
20  DefaultAllocator() = default;
21 
22  void* allocate(size_t size, size_t alignment = 0) override
23  {
24  IgnoreUnused(alignment);
25  return ::operator new(size_t(size));
26  }
27 
28  void free(void* ptr) override
29  {
30  ::operator delete(ptr);
31  }
32 
34  {
36  }
37 
38  void* GetMemoryRegionAtOffset(void* buffer, size_t offset, size_t alignment = 0) override
39  {
40  IgnoreUnused(alignment);
41  return static_cast<char*>(buffer) + offset;
42  }
43 };
44 
45 } // namespace armnn
Custom Allocator interface.
+ +
armnn::MemorySource GetMemorySourceType() override
Used to specify what type of memory is being allocated by this allocator.
+ +
Copyright (c) 2021 ARM Limited and Contributors.
+
void IgnoreUnused(Ts &&...)
+
void * GetMemoryRegionAtOffset(void *buffer, size_t offset, size_t alignment=0) override
Interface that may be implemented to allow retrieval of Memory Region from allocated buffer at a cert...
+ +
void free(void *ptr) override
Interface to be implemented by the child class to free the allocated bytes.
+ +
Default Memory Allocator class returned from IBackendInternal::GetDefaultAllocator(MemorySource) ...
+
MemorySource
Define the Memory Source to reduce copies.
Definition: Types.hpp:217
+
void * allocate(size_t size, size_t alignment=0) override
Interface to be implemented by the child class to allocate bytes.
+
+
+ + + + -- cgit v1.2.1