blob: d185c15b72e4132f9faf6502fa15c0a0e25887bb [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 "ClBackend.hpp"
David Beck6b779f02018-10-09 17:20:21 +01007#include <backends/BackendRegistry.hpp>
8#include <boost/cast.hpp>
arovir014424b0a2018-10-04 10:46:04 +01009
10namespace armnn
11{
12
David Beck6b779f02018-10-09 17:20:21 +010013namespace
14{
15static const std::string s_Id = "GpuAcc";
16
17static BackendRegistry::Helper g_RegisterHelper{
18 s_Id,
19 []()
20 {
21 return IBackendUniquePtr(new ClBackend, &ClBackend::Destroy);
22 }
23};
24
25}
arovir014424b0a2018-10-04 10:46:04 +010026
27const std::string& ClBackend::GetId() const
28{
29 return s_Id;
30}
31
32const ILayerSupport& ClBackend::GetLayerSupport() const
33{
34 return m_LayerSupport;
35}
36
37std::unique_ptr<IWorkloadFactory> ClBackend::CreateWorkloadFactory() const
38{
arovir014424b0a2018-10-04 10:46:04 +010039 return nullptr;
40}
41
David Beck6b779f02018-10-09 17:20:21 +010042void ClBackend::Destroy(IBackend* backend)
43{
44 delete boost::polymorphic_downcast<ClBackend*>(backend);
45}
46
arovir014424b0a2018-10-04 10:46:04 +010047} // namespace armnn