blob: 34348fa120398bae174b29331ac121ffb76c7724 [file] [log] [blame]
arovir014424b0a2018-10-04 10:46:04 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#include "RefBackend.hpp"
David Beck3e9e1152018-10-17 14:17:50 +01007#include "RefBackendId.hpp"
arovir01a0944792018-10-11 15:00:58 +01008#include "RefWorkloadFactory.hpp"
9
David Beck6b779f02018-10-09 17:20:21 +010010#include <backends/BackendRegistry.hpp>
arovir01a0944792018-10-11 15:00:58 +010011
David Beck6b779f02018-10-09 17:20:21 +010012#include <boost/cast.hpp>
arovir014424b0a2018-10-04 10:46:04 +010013
14namespace armnn
15{
16
David Beck6b779f02018-10-09 17:20:21 +010017namespace
18{
David Beck6b779f02018-10-09 17:20:21 +010019
David Beck3e9e1152018-10-17 14:17:50 +010020static StaticRegistryInitializer<BackendRegistry> g_RegisterHelper
21{
22 BackendRegistryInstance(),
David Beck3cc9a622018-10-12 10:38:31 +010023 RefBackend::GetIdStatic(),
David Beck6b779f02018-10-09 17:20:21 +010024 []()
25 {
David Beck29c75de2018-10-23 13:35:58 +010026 return IBackendInternalUniquePtr(new RefBackend);
David Beck6b779f02018-10-09 17:20:21 +010027 }
28};
29
30}
arovir014424b0a2018-10-04 10:46:04 +010031
David Beck3cc9a622018-10-12 10:38:31 +010032const BackendId& RefBackend::GetIdStatic()
arovir014424b0a2018-10-04 10:46:04 +010033{
David Beck3e9e1152018-10-17 14:17:50 +010034 static const BackendId s_Id{RefBackendId()};
arovir014424b0a2018-10-04 10:46:04 +010035 return s_Id;
36}
37
David Beck29c75de2018-10-23 13:35:58 +010038IBackendInternal::IWorkloadFactoryPtr RefBackend::CreateWorkloadFactory() const
arovir014424b0a2018-10-04 10:46:04 +010039{
arovir01a0944792018-10-11 15:00:58 +010040 return std::make_unique<RefWorkloadFactory>();
arovir014424b0a2018-10-04 10:46:04 +010041}
42
arovir014424b0a2018-10-04 10:46:04 +010043} // namespace armnn