aboutsummaryrefslogtreecommitdiff
path: root/1.0/ArmnnDriver.hpp
blob: 83484ca9868be2a95c0e41465ac27132ae5c8361 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// See LICENSE file in the project root for full license information.
//

#pragma once

#include <HalInterfaces.h>

#include "ArmnnDriverImpl.hpp"
#include "ArmnnDevice.hpp"

#include <log/log.h>

namespace armnn_driver
{
namespace V1_0
{

class ArmnnDriver : public ArmnnDevice, public ::android::hardware::neuralnetworks::V1_0::IDevice
{
public:
    ArmnnDriver(DriverOptions options)
        : ArmnnDevice(std::move(options))
    {
        ALOGV("V1_0::ArmnnDriver::ArmnnDriver()");
    }
    ~ArmnnDriver() {}

public:
    Return<void> getCapabilities(
            ::android::hardware::neuralnetworks::V1_0::IDevice::getCapabilities_cb cb)
    {
        ALOGV("V1_0::ArmnnDriver::getCapabilities()");

        return ArmnnDriverImpl::getCapabilities(m_Runtime, cb);
    }

    Return<void> getSupportedOperations(
            const ::android::hardware::neuralnetworks::V1_0::Model& model,
            ::android::hardware::neuralnetworks::V1_0::IDevice::getSupportedOperations_cb cb)
    {
        ALOGV("V1_0::ArmnnDriver::getSupportedOperations()");

        return ArmnnDriverImpl::getSupportedOperations(m_Runtime, m_Options, model, cb);
    }

    Return<ErrorStatus> prepareModel(
            const ::android::hardware::neuralnetworks::V1_0::Model& model,
            const android::sp<IPreparedModelCallback>& cb)
    {
        ALOGV("V1_0::ArmnnDriver::prepareModel()");

        return ArmnnDriverImpl::prepareModel(m_Runtime, m_ClTunedParameters, m_Options, model, cb);
    }

    Return<DeviceStatus> getStatus()
    {
        ALOGV("V1_0::ArmnnDriver::getStatus()");

        return ArmnnDriverImpl::getStatus();
    }
};

} // armnn_driver::namespace V1_0
} // namespace armnn_driver