aboutsummaryrefslogtreecommitdiff
path: root/1.0/ArmnnDriver.hpp
diff options
context:
space:
mode:
authorarovir01 <Aron.Virginas-Tar@arm.com>2018-09-05 17:03:25 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2018-09-18 12:40:40 +0100
commitb0717b5241a15e3e4d37a1b51b6e5fd9a92a664f (patch)
tree84159d2eb142f12081c494483c07012e8ebee8cb /1.0/ArmnnDriver.hpp
parent93e48980920ddcc8c6390fa6cbfdfc9740786617 (diff)
downloadandroid-nn-driver-b0717b5241a15e3e4d37a1b51b6e5fd9a92a664f.tar.gz
IVGCVSW-1806: Refactor Android-NN-Driver ModelToINetworkConverter
* Moved conversion logic into new V1_0 and V1_1 HalPolicy classes * Extracted common helper functions into ConversionUtils class Change-Id: I1ab50edc266dd528c0cb22a5cd1aa65e103674d9
Diffstat (limited to '1.0/ArmnnDriver.hpp')
-rw-r--r--1.0/ArmnnDriver.hpp53
1 files changed, 24 insertions, 29 deletions
diff --git a/1.0/ArmnnDriver.hpp b/1.0/ArmnnDriver.hpp
index 560b0d3b..a048973f 100644
--- a/1.0/ArmnnDriver.hpp
+++ b/1.0/ArmnnDriver.hpp
@@ -9,67 +9,62 @@
#include "ArmnnDevice.hpp"
#include "ArmnnDriverImpl.hpp"
+#include "HalPolicy.hpp"
+
#include "../ArmnnDriverImpl.hpp"
#include <log/log.h>
namespace armnn_driver
{
-namespace V1_0
+namespace hal_1_0
{
-class ArmnnDriver : public ArmnnDevice, public ::android::hardware::neuralnetworks::V1_0::IDevice
+class ArmnnDriver : public ArmnnDevice, public V1_0::IDevice
{
public:
ArmnnDriver(DriverOptions options)
: ArmnnDevice(std::move(options))
{
- ALOGV("V1_0::ArmnnDriver::ArmnnDriver()");
+ ALOGV("hal_1_0::ArmnnDriver::ArmnnDriver()");
}
~ArmnnDriver() {}
public:
- Return<void> getCapabilities(
- ::android::hardware::neuralnetworks::V1_0::IDevice::getCapabilities_cb cb) override
+ Return<void> getCapabilities(V1_0::IDevice::getCapabilities_cb cb) override
{
- ALOGV("V1_0::ArmnnDriver::getCapabilities()");
+ ALOGV("hal_1_0::ArmnnDriver::getCapabilities()");
- return V1_0::ArmnnDriverImpl::getCapabilities(m_Runtime,
- cb);
+ return hal_1_0::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) override
+ Return<void> getSupportedOperations(const V1_0::Model& model,
+ V1_0::IDevice::getSupportedOperations_cb cb) override
{
- ALOGV("V1_0::ArmnnDriver::getSupportedOperations()");
+ ALOGV("hal_1_0::ArmnnDriver::getSupportedOperations()");
- return armnn_driver::ArmnnDriverImpl<HalVersion_1_0>::getSupportedOperations(m_Runtime,
- m_Options,
- model,
- cb);
+ return armnn_driver::ArmnnDriverImpl<HalPolicy>::getSupportedOperations(m_Runtime, m_Options, model, cb);
}
- Return<ErrorStatus> prepareModel(
- const ::android::hardware::neuralnetworks::V1_0::Model& model,
- const android::sp<IPreparedModelCallback>& cb) override
+ Return<ErrorStatus> prepareModel(const V1_0::Model& model,
+ const android::sp<IPreparedModelCallback>& cb) override
{
- ALOGV("V1_0::ArmnnDriver::prepareModel()");
+ ALOGV("hal_1_0::ArmnnDriver::prepareModel()");
- return armnn_driver::ArmnnDriverImpl<HalVersion_1_0>::prepareModel(m_Runtime,
- m_ClTunedParameters,
- m_Options,
- model,
- cb);
+ return armnn_driver::ArmnnDriverImpl<HalPolicy>::prepareModel(m_Runtime,
+ m_ClTunedParameters,
+ m_Options,
+ model,
+ cb);
}
Return<DeviceStatus> getStatus() override
{
- ALOGV("V1_0::ArmnnDriver::getStatus()");
+ ALOGV("hal_1_0::ArmnnDriver::getStatus()");
- return armnn_driver::ArmnnDriverImpl<HalVersion_1_0>::getStatus();
+ return armnn_driver::ArmnnDriverImpl<HalPolicy>::getStatus();
}
};
-} // armnn_driver::namespace V1_0
-} // namespace armnn_driver
+} // namespace hal_1_0
+} // namespace armnn_driver \ No newline at end of file