ArmNN
 20.02
BackendHelper.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
8 
10 
11 namespace armnn
12 {
13 
14 std::shared_ptr<ILayerSupport> GetILayerSupportByBackendId(const armnn::BackendId& backend)
15 {
17 
18  if (!backendRegistry.IsBackendRegistered(backend))
19  {
20  return nullptr;
21  }
22 
23  auto factoryFunc = backendRegistry.GetFactory(backend);
24  auto backendObject = factoryFunc();
25  return backendObject->GetLayerSupport();
26 }
27 
28 }
FactoryFunction GetFactory(const BackendId &id) const
bool IsBackendRegistered(const BackendId &id) const
BackendRegistry & BackendRegistryInstance()
Copyright (c) 2020 ARM Limited.
std::shared_ptr< ILayerSupport > GetILayerSupportByBackendId(const armnn::BackendId &backend)
Convenience function to retrieve the ILayerSupport for a backend.