telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // See LICENSE file in the project root for full license information. |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include <HalInterfaces.h> |
| 9 | |
| 10 | #include "ArmnnDriverImpl.hpp" |
| 11 | #include "ArmnnDevice.hpp" |
| 12 | |
| 13 | #include <log/log.h> |
| 14 | |
| 15 | namespace armnn_driver |
| 16 | { |
| 17 | namespace V1_0 |
| 18 | { |
| 19 | |
| 20 | class ArmnnDriver : public ArmnnDevice, public ::android::hardware::neuralnetworks::V1_0::IDevice |
| 21 | { |
| 22 | public: |
| 23 | ArmnnDriver(DriverOptions options) |
| 24 | : ArmnnDevice(std::move(options)) |
| 25 | { |
| 26 | ALOGV("V1_0::ArmnnDriver::ArmnnDriver()"); |
| 27 | } |
| 28 | ~ArmnnDriver() {} |
| 29 | |
| 30 | public: |
| 31 | Return<void> getCapabilities( |
| 32 | ::android::hardware::neuralnetworks::V1_0::IDevice::getCapabilities_cb cb) |
| 33 | { |
| 34 | ALOGV("V1_0::ArmnnDriver::getCapabilities()"); |
| 35 | |
| 36 | return ArmnnDriverImpl::getCapabilities(m_Runtime, cb); |
| 37 | } |
| 38 | |
| 39 | Return<void> getSupportedOperations( |
| 40 | const ::android::hardware::neuralnetworks::V1_0::Model& model, |
| 41 | ::android::hardware::neuralnetworks::V1_0::IDevice::getSupportedOperations_cb cb) |
| 42 | { |
| 43 | ALOGV("V1_0::ArmnnDriver::getSupportedOperations()"); |
| 44 | |
| 45 | return ArmnnDriverImpl::getSupportedOperations(m_Runtime, m_Options, model, cb); |
| 46 | } |
| 47 | |
| 48 | Return<ErrorStatus> prepareModel( |
| 49 | const ::android::hardware::neuralnetworks::V1_0::Model& model, |
| 50 | const android::sp<IPreparedModelCallback>& cb) |
| 51 | { |
| 52 | ALOGV("V1_0::ArmnnDriver::prepareModel()"); |
| 53 | |
| 54 | return ArmnnDriverImpl::prepareModel(m_Runtime, m_ClTunedParameters, m_Options, model, cb); |
| 55 | } |
| 56 | |
| 57 | Return<DeviceStatus> getStatus() |
| 58 | { |
| 59 | ALOGV("V1_0::ArmnnDriver::getStatus()"); |
| 60 | |
| 61 | return ArmnnDriverImpl::getStatus(); |
| 62 | } |
| 63 | }; |
| 64 | |
| 65 | } // armnn_driver::namespace V1_0 |
| 66 | } // namespace armnn_driver |