IVGCVSW-6300 'IMemoryOptimizerStrategy Add strategy library and add support in BackendRegistry'

* Updated IRuntime interface for providing custom memory optimizer strategy.
* Enabled selecting existing memory optimizer strategy by using BackendOptions
* Added MemoryOptimizerStrategyLibrary that sets one of the existing memory optimizer
  strategies selected by user

Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I037f8ac8efa79c0f71bd63e379101e3ad92d80c9
diff --git a/include/armnn/IRuntime.hpp b/include/armnn/IRuntime.hpp
index a46830c..ca9a0ce 100644
--- a/include/armnn/IRuntime.hpp
+++ b/include/armnn/IRuntime.hpp
@@ -15,6 +15,7 @@
 #include "profiling/ILocalPacketHandler.hpp"
 
 #include <armnn/backends/ICustomAllocator.hpp>
+#include <armnn/backends/IMemoryOptimizerStrategy.hpp>
 #include <memory>
 #include <map>
 
@@ -106,6 +107,7 @@
             , m_DynamicBackendsPath("")
             , m_ProtectedMode(false)
             , m_CustomAllocatorMap()
+            , m_MemoryOptimizerStrategyMap()
         {}
 
         /// If set, uses the GpuAcc tuned parameters from the given object when executing GPU workloads.
@@ -135,6 +137,14 @@
         /// @note Only supported for GpuAcc
         std::map<BackendId, std::shared_ptr<ICustomAllocator>> m_CustomAllocatorMap;
 
+        /// @brief A map to define a custom memory optimizer strategy for specific backend Ids.
+        ///
+        /// @details  A Memory Optimizer Strategy provides a solution to an abstract representation of
+        /// a network's memory requirements. This can also be used to return a pre-computed solution
+        /// for a specific network. Set this if you want to implement a Custom Memory Optimizer Strategy
+        /// for a given backend.
+        std::map<BackendId, std::shared_ptr<IMemoryOptimizerStrategy>> m_MemoryOptimizerStrategyMap;
+
         struct ExternalProfilingOptions
         {
             ExternalProfilingOptions()
@@ -168,6 +178,7 @@
         ///       {
         ///         {"TuningLevel", 2},
         ///         {"TuningFile", filename}
+        ///         {"MemoryOptimizerStrategy", strategyname}
         ///       }
         ///     });
         /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -185,6 +196,9 @@
         /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
         /// The following backend options are available:
+        /// AllBackends:
+        ///   "MemoryOptimizerStrategy" : string [stategynameString]
+        ///    (Existing Memory Optimizer Strategies: ConstLayerMemoryOptimizerStrategy)
         /// GpuAcc:
         ///   "TuningLevel" : int [0..3] (0=UseOnly(default) | 1=RapidTuning | 2=NormalTuning | 3=ExhaustiveTuning)
         ///   "TuningFile" : string [filenameString]