aboutsummaryrefslogtreecommitdiff
path: root/src/backends/reference/RefBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends/reference/RefBackend.cpp')
-rw-r--r--src/backends/reference/RefBackend.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/backends/reference/RefBackend.cpp b/src/backends/reference/RefBackend.cpp
index 1799abfc33..b671e8bca8 100644
--- a/src/backends/reference/RefBackend.cpp
+++ b/src/backends/reference/RefBackend.cpp
@@ -4,11 +4,25 @@
//
#include "RefBackend.hpp"
+#include <backends/BackendRegistry.hpp>
+#include <boost/cast.hpp>
namespace armnn
{
-const std::string RefBackend::s_Id = "arm_reference";
+namespace
+{
+const std::string s_Id = "CpuRef";
+
+static BackendRegistry::Helper s_RegisterHelper{
+ s_Id,
+ []()
+ {
+ return IBackendUniquePtr(new RefBackend, &RefBackend::Destroy);
+ }
+};
+
+}
const std::string& RefBackend::GetId() const
{
@@ -22,8 +36,12 @@ const ILayerSupport& RefBackend::GetLayerSupport() const
std::unique_ptr<IWorkloadFactory> RefBackend::CreateWorkloadFactory() const
{
- // TODO implement
return nullptr;
}
+void RefBackend::Destroy(IBackend* backend)
+{
+ delete boost::polymorphic_downcast<RefBackend*>(backend);
+}
+
} // namespace armnn \ No newline at end of file