aboutsummaryrefslogtreecommitdiff
path: root/src/backends/cl/ClLayerSupport.cpp
diff options
context:
space:
mode:
authorDavid Beck <david.beck@arm.com>2018-10-17 14:17:50 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2018-10-22 16:57:54 +0100
commit3e9e11541c177abd7101962ef1e703d70d718c56 (patch)
treef2076ddb343d51450e41465826db2a4096d1f8b3 /src/backends/cl/ClLayerSupport.cpp
parent8e6f92d2d6b2bb94e6ba9b794c08e465039ea98b (diff)
downloadarmnn-3e9e11541c177abd7101962ef1e703d70d718c56.tar.gz
IVGCVSW-2037 : separate registry for layer support intrefaces
* because their lifetime is different from backends Change-Id: I9ba525e7e503b148cde1294933f3954b8bad3d68
Diffstat (limited to 'src/backends/cl/ClLayerSupport.cpp')
-rw-r--r--src/backends/cl/ClLayerSupport.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/backends/cl/ClLayerSupport.cpp b/src/backends/cl/ClLayerSupport.cpp
index 6a49a80c7f..3ca8bb5c46 100644
--- a/src/backends/cl/ClLayerSupport.cpp
+++ b/src/backends/cl/ClLayerSupport.cpp
@@ -4,11 +4,14 @@
//
#include "ClLayerSupport.hpp"
+#include "ClBackendId.hpp"
#include <armnn/Descriptors.hpp>
#include <armnn/InternalTypes.hpp>
#include <armnn/LayerSupportCommon.hpp>
+#include <backends/LayerSupportRegistry.hpp>
+
#include <boost/core/ignore_unused.hpp>
#ifdef ARMCOMPUTECL_ENABLED
@@ -40,6 +43,21 @@ namespace armnn
namespace
{
+ILayerSupportSharedPtr GetLayerSupportPointer()
+{
+ static ILayerSupportSharedPtr instance{new ClLayerSupport};
+ return instance;
+}
+
+static StaticRegistryInitializer<LayerSupportRegistry> g_RegisterHelper{
+ LayerSupportRegistryInstance(),
+ ClBackendId(),
+ []()
+ {
+ return GetLayerSupportPointer();
+ }
+};
+
template<unsigned int FilterSize>
bool IsMatchingSize2d(const TensorInfo& weightInfo)
{