diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-08-08 13:46:32 +0100 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-08-12 15:43:42 +0100 |
commit | 4e73b429ddfebef9beb64872d3e54a14bceccb29 (patch) | |
tree | 4df1460ac6fa836af5202ece84184bab136fb94d /src/backends/reference/RefRegistryInitializer.cpp | |
parent | 1fa19197a5673c57058efe19d94db223a93bc206 (diff) | |
download | armnn-4e73b429ddfebef9beb64872d3e54a14bceccb29.tar.gz |
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>
Diffstat (limited to 'src/backends/reference/RefRegistryInitializer.cpp')
-rw-r--r-- | src/backends/reference/RefRegistryInitializer.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/backends/reference/RefRegistryInitializer.cpp b/src/backends/reference/RefRegistryInitializer.cpp new file mode 100644 index 0000000000..427c7f01ab --- /dev/null +++ b/src/backends/reference/RefRegistryInitializer.cpp @@ -0,0 +1,25 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#include "RefBackend.hpp" + +#include <backendsCommon/BackendRegistry.hpp> + +namespace +{ + +using namespace armnn; + +static BackendRegistry::StaticRegistryInitializer g_RegisterHelper +{ + BackendRegistryInstance(), + RefBackend::GetIdStatic(), + []() + { + return IBackendInternalUniquePtr(new RefBackend); + } +}; + +} // Anonymous namespace |