aboutsummaryrefslogtreecommitdiff
path: root/src/backends/cl/ClBackend.cpp
diff options
context:
space:
mode:
authorDavid Beck <david.beck@arm.com>2018-10-09 17:20:21 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2018-10-22 16:57:53 +0100
commit6b779f0e437127bfa71a529e9b848b5e41683ab8 (patch)
tree85be136c3e33912ab46a504a4a2a17bd81553e5d /src/backends/cl/ClBackend.cpp
parent32cbb0c7cd99786191c080f5a619b3dab23b4cd0 (diff)
downloadarmnn-6b779f0e437127bfa71a529e9b848b5e41683ab8.tar.gz
IVGCVSW-1989 : implement backend creation and registry for Ref,Cl and Neon
!armnn:152557 Change-Id: Ic6b99cddee1597c85de76034d9332fe1bf3aceb1
Diffstat (limited to 'src/backends/cl/ClBackend.cpp')
-rw-r--r--src/backends/cl/ClBackend.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/backends/cl/ClBackend.cpp b/src/backends/cl/ClBackend.cpp
index 5de9d31234..d185c15b72 100644
--- a/src/backends/cl/ClBackend.cpp
+++ b/src/backends/cl/ClBackend.cpp
@@ -4,11 +4,25 @@
//
#include "ClBackend.hpp"
+#include <backends/BackendRegistry.hpp>
+#include <boost/cast.hpp>
namespace armnn
{
-const std::string ClBackend::s_Id = "arm_compute_cl";
+namespace
+{
+static const std::string s_Id = "GpuAcc";
+
+static BackendRegistry::Helper g_RegisterHelper{
+ s_Id,
+ []()
+ {
+ return IBackendUniquePtr(new ClBackend, &ClBackend::Destroy);
+ }
+};
+
+}
const std::string& ClBackend::GetId() const
{
@@ -22,8 +36,12 @@ const ILayerSupport& ClBackend::GetLayerSupport() const
std::unique_ptr<IWorkloadFactory> ClBackend::CreateWorkloadFactory() const
{
- // TODO implement
return nullptr;
}
+void ClBackend::Destroy(IBackend* backend)
+{
+ delete boost::polymorphic_downcast<ClBackend*>(backend);
+}
+
} // namespace armnn \ No newline at end of file