IVGCVSW-6077 Add the Custom Memory Allocator interface definition
* Added ICustomAllocator.hpp to include/armnn/backends/
* Added the ability to specify an ICustomAllocator to the CreationOptions
Signed-off-by: David Monahan <david.monahan@arm.com>
Change-Id: I820e468b691aa032c9bd2c1e1257dc9d02f981d9
diff --git a/include/armnn/IRuntime.hpp b/include/armnn/IRuntime.hpp
index f88b6b6..bee61d2 100644
--- a/include/armnn/IRuntime.hpp
+++ b/include/armnn/IRuntime.hpp
@@ -14,6 +14,7 @@
#include "TypesUtils.hpp"
#include "profiling/ILocalPacketHandler.hpp"
+#include <armnn/backends/ICustomAllocator.hpp>
#include <memory>
namespace armnn
@@ -88,6 +89,7 @@
: m_GpuAccTunedParameters(nullptr)
, m_EnableGpuProfiling(false)
, m_DynamicBackendsPath("")
+ , m_CustomAllocator(nullptr)
{}
/// If set, uses the GpuAcc tuned parameters from the given object when executing GPU workloads.
@@ -101,6 +103,11 @@
/// Only a single path is allowed for the override
std::string m_DynamicBackendsPath;
+ /// A Custom Allocator used for allocation of working memory in the backends.
+ /// Set this for when you need to allocate Protected Working Memory, required for ProtectedMode
+ /// Only supported for GpuAcc
+ ICustomAllocator* m_CustomAllocator;
+
struct ExternalProfilingOptions
{
ExternalProfilingOptions()