IVGCVSW-3546 Create a reference dynamic backend to use for testing and as
an example in the docs
* Wrapped the reference backend into a dynamic backend
* Moved the static registration code to a separate file, so that
it is possible to create the reference dynamic backend that does not
register statically into armnn
* Added unit test
Change-Id: I1074d21b020820f9ac8c7178388be773b447555a
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
diff --git a/src/backends/dynamic/reference/RefDynamicBackend.cpp b/src/backends/dynamic/reference/RefDynamicBackend.cpp
new file mode 100644
index 0000000..5920432
--- /dev/null
+++ b/src/backends/dynamic/reference/RefDynamicBackend.cpp
@@ -0,0 +1,33 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#include "RefDynamicBackend.hpp"
+
+#include <reference/RefBackend.hpp>
+
+using namespace armnn;
+
+const char* GetBackendId()
+{
+ return RefBackend::GetIdStatic().Get().c_str();
+}
+
+void GetVersion(uint32_t* outMajor, uint32_t* outMinor)
+{
+ if (!outMajor || !outMinor)
+ {
+ return;
+ }
+
+ BackendVersion apiVersion = IBackendInternal::GetApiVersion();
+
+ *outMajor = apiVersion.m_Major;
+ *outMinor = apiVersion.m_Minor;
+}
+
+void* BackendFactory()
+{
+ return new RefBackend();
+}