arovir01 | 4424b0a | 2018-10-04 10:46:04 +0100 | [diff] [blame] | 1 | // |
2 | // Copyright © 2017 Arm Ltd. All rights reserved. | ||||
3 | // SPDX-License-Identifier: MIT | ||||
4 | // | ||||
5 | |||||
6 | #include "NeonBackend.hpp" | ||||
David Beck | 3e9e115 | 2018-10-17 14:17:50 +0100 | [diff] [blame] | 7 | #include "NeonBackendId.hpp" |
arovir01 | a094479 | 2018-10-11 15:00:58 +0100 | [diff] [blame] | 8 | #include "NeonWorkloadFactory.hpp" |
9 | |||||
David Beck | 263e349 | 2018-11-09 14:46:40 +0000 | [diff] [blame] | 10 | #include <backendsCommon/IBackendContext.hpp> |
Aron Virginas-Tar | c9cc804 | 2018-11-01 16:15:57 +0000 | [diff] [blame] | 11 | #include <backendsCommon/BackendRegistry.hpp> |
David Beck | 263e349 | 2018-11-09 14:46:40 +0000 | [diff] [blame] | 12 | #include <Optimizer.hpp> |
arovir01 | a094479 | 2018-10-11 15:00:58 +0100 | [diff] [blame] | 13 | |
David Beck | 9efb57d | 2018-11-05 13:40:33 +0000 | [diff] [blame] | 14 | #include <boost/cast.hpp> |
15 | |||||
arovir01 | 4424b0a | 2018-10-04 10:46:04 +0100 | [diff] [blame] | 16 | namespace armnn |
17 | { | ||||
18 | |||||
David Beck | 6b779f0 | 2018-10-09 17:20:21 +0100 | [diff] [blame] | 19 | namespace |
20 | { | ||||
21 | |||||
David Beck | 3e9e115 | 2018-10-17 14:17:50 +0100 | [diff] [blame] | 22 | static StaticRegistryInitializer<BackendRegistry> g_RegisterHelper |
23 | { | ||||
24 | BackendRegistryInstance(), | ||||
David Beck | 3cc9a62 | 2018-10-12 10:38:31 +0100 | [diff] [blame] | 25 | NeonBackend::GetIdStatic(), |
David Beck | 9efb57d | 2018-11-05 13:40:33 +0000 | [diff] [blame] | 26 | []() |
David Beck | 6b779f0 | 2018-10-09 17:20:21 +0100 | [diff] [blame] | 27 | { |
David Beck | 29c75de | 2018-10-23 13:35:58 +0100 | [diff] [blame] | 28 | return IBackendInternalUniquePtr(new NeonBackend); |
David Beck | 6b779f0 | 2018-10-09 17:20:21 +0100 | [diff] [blame] | 29 | } |
30 | }; | ||||
31 | |||||
32 | } | ||||
arovir01 | 4424b0a | 2018-10-04 10:46:04 +0100 | [diff] [blame] | 33 | |
David Beck | 3cc9a62 | 2018-10-12 10:38:31 +0100 | [diff] [blame] | 34 | const BackendId& NeonBackend::GetIdStatic() |
arovir01 | 4424b0a | 2018-10-04 10:46:04 +0100 | [diff] [blame] | 35 | { |
David Beck | 3e9e115 | 2018-10-17 14:17:50 +0100 | [diff] [blame] | 36 | static const BackendId s_Id{NeonBackendId()}; |
arovir01 | 4424b0a | 2018-10-04 10:46:04 +0100 | [diff] [blame] | 37 | return s_Id; |
38 | } | ||||
39 | |||||
David Beck | 29c75de | 2018-10-23 13:35:58 +0100 | [diff] [blame] | 40 | IBackendInternal::IWorkloadFactoryPtr NeonBackend::CreateWorkloadFactory() const |
arovir01 | 4424b0a | 2018-10-04 10:46:04 +0100 | [diff] [blame] | 41 | { |
arovir01 | a094479 | 2018-10-11 15:00:58 +0100 | [diff] [blame] | 42 | return std::make_unique<NeonWorkloadFactory>(); |
arovir01 | 4424b0a | 2018-10-04 10:46:04 +0100 | [diff] [blame] | 43 | } |
44 | |||||
David Beck | 263e349 | 2018-11-09 14:46:40 +0000 | [diff] [blame] | 45 | IBackendInternal::IBackendContextPtr NeonBackend::CreateBackendContext(const IRuntime::CreationOptions&) const |
46 | { | ||||
47 | return IBackendContextPtr{}; | ||||
48 | } | ||||
49 | |||||
50 | IBackendInternal::Optimizations NeonBackend::GetOptimizations() const | ||||
51 | { | ||||
52 | return Optimizations{}; | ||||
53 | } | ||||
54 | |||||
arovir01 | 4424b0a | 2018-10-04 10:46:04 +0100 | [diff] [blame] | 55 | } // namespace armnn |