blob: ef52a5edeb29af23920ebeb426210d26df229cb5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "RefBackend.hpp"
#include "RefWorkloadFactory.hpp"
#include <backends/BackendRegistry.hpp>
#include <boost/cast.hpp>
namespace armnn
{
namespace
{
const BackendId s_Id{"CpuRef"};
static BackendRegistry::Helper s_RegisterHelper{
s_Id,
[]()
{
return IBackendUniquePtr(new RefBackend, &RefBackend::Destroy);
}
};
}
const BackendId& RefBackend::GetId() const
{
return s_Id;
}
const ILayerSupport& RefBackend::GetLayerSupport() const
{
return m_LayerSupport;
}
std::unique_ptr<IWorkloadFactory> RefBackend::CreateWorkloadFactory() const
{
return std::make_unique<RefWorkloadFactory>();
}
void RefBackend::Destroy(IBackend* backend)
{
delete boost::polymorphic_downcast<RefBackend*>(backend);
}
} // namespace armnn
|