aboutsummaryrefslogtreecommitdiff
path: root/src/backends/cl/ClBackend.cpp
blob: d185c15b72e4132f9faf6502fa15c0a0e25887bb (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
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//

#include "ClBackend.hpp"
#include <backends/BackendRegistry.hpp>
#include <boost/cast.hpp>

namespace armnn
{

namespace
{
static const std::string s_Id = "GpuAcc";

static BackendRegistry::Helper g_RegisterHelper{
    s_Id,
    []()
    {
        return IBackendUniquePtr(new ClBackend, &ClBackend::Destroy);
    }
};

}

const std::string& ClBackend::GetId() const
{
    return s_Id;
}

const ILayerSupport& ClBackend::GetLayerSupport() const
{
    return m_LayerSupport;
}

std::unique_ptr<IWorkloadFactory> ClBackend::CreateWorkloadFactory() const
{
    return nullptr;
}

void ClBackend::Destroy(IBackend* backend)
{
    delete boost::polymorphic_downcast<ClBackend*>(backend);
}

} // namespace armnn