diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2018-09-03 13:50:50 +0100 |
---|---|---|
committer | Matthew Bentham <matthew.bentham@arm.com> | 2018-09-18 12:40:38 +0100 |
commit | e48bdff741568236d3c0747ad3d18a8eba5b36dd (patch) | |
tree | 77aabce6f75d86d3f2f3924f342292ae5a7267e7 /ModelToINetworkConverter.hpp | |
parent | a15dc11fd7bf3ad49e752ec75157b731287fe46d (diff) | |
download | android-nn-driver-e48bdff741568236d3c0747ad3d18a8eba5b36dd.tar.gz |
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
Diffstat (limited to 'ModelToINetworkConverter.hpp')
-rw-r--r-- | ModelToINetworkConverter.hpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/ModelToINetworkConverter.hpp b/ModelToINetworkConverter.hpp index 040bec6b..c28ebdcd 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 @@ enum class ConversionResult 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 @@ public: 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; } |