IVGCVSW-1806 Refactored Android-NN-Driver, added common "getCapabilities",
"getSupportedOperations" and "prepareModel" implementations
* Added common base ArmnnDriverImpl class
* Added common template implementation of the driver's "getCapabilities",
"getSupportedOperations" and "prepareModel" methods
* Refactored ArmnnPreparedModel and RequestThread to support HAL
v1.1 models
* Moved "getStatus" to the common base class, as it is shared by both
HAL implementations
* Refactored the code where necessary
Change-Id: I747334730026d63b4002662523fb93608f67c899
diff --git a/ModelToINetworkConverter.hpp b/ModelToINetworkConverter.hpp
index 040bec6..c28ebdc 100644
--- a/ModelToINetworkConverter.hpp
+++ b/ModelToINetworkConverter.hpp
@@ -6,6 +6,7 @@
#pragma once
#include "ArmnnDriver.hpp"
+#include "ArmnnDriverImpl.hpp"
#include <NeuralNetworks.h>
#include <ActivationFunctor.h>
@@ -33,18 +34,6 @@
UnsupportedFeature
};
-struct HalVersion_1_0
-{
- using Model = ::android::hardware::neuralnetworks::V1_0::Model;
-};
-
-#if defined(ARMNN_ANDROID_NN_V1_1)
-struct HalVersion_1_1
-{
- using Model = ::android::hardware::neuralnetworks::V1_1::Model;
-};
-#endif
-
// A helper performing the conversion from an AndroidNN driver Model representation,
// to an armnn::INetwork object
template<typename HalVersion>
@@ -54,8 +43,8 @@
using HalModel = typename HalVersion::Model;
ModelToINetworkConverter(armnn::Compute compute,
- const HalModel& model,
- const std::set<unsigned int>& forcedUnsupportedOperations);
+ const HalModel& model,
+ const std::set<unsigned int>& forcedUnsupportedOperations);
ConversionResult GetConversionResult() const { return m_ConversionResult; }