diff options
author | arovir01 <Aron.Virginas-Tar@arm.com> | 2018-09-05 17:03:25 +0100 |
---|---|---|
committer | Matthew Bentham <matthew.bentham@arm.com> | 2018-09-18 12:40:40 +0100 |
commit | b0717b5241a15e3e4d37a1b51b6e5fd9a92a664f (patch) | |
tree | 84159d2eb142f12081c494483c07012e8ebee8cb /1.1/ArmnnDriverImpl.cpp | |
parent | 93e48980920ddcc8c6390fa6cbfdfc9740786617 (diff) | |
download | android-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.1/ArmnnDriverImpl.cpp')
-rw-r--r-- | 1.1/ArmnnDriverImpl.cpp | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/1.1/ArmnnDriverImpl.cpp b/1.1/ArmnnDriverImpl.cpp index 0a689539..d8939a07 100644 --- a/1.1/ArmnnDriverImpl.cpp +++ b/1.1/ArmnnDriverImpl.cpp @@ -8,34 +8,28 @@ #include <log/log.h> -using namespace std; -using namespace android; -using namespace android::nn; -using namespace android::hardware; - namespace { -const char *g_Float32PerformanceExecTimeName = "ArmNN.float32Performance.execTime"; -const char *g_Float32PerformancePowerUsageName = "ArmNN.float32Performance.powerUsage"; -const char *g_Quantized8PerformanceExecTimeName = "ArmNN.quantized8Performance.execTime"; -const char *g_Quantized8PerformancePowerUsageName = "ArmNN.quantized8Performance.powerUsage"; +const char *g_Float32PerformanceExecTimeName = "ArmNN.float32Performance.execTime"; +const char *g_Float32PerformancePowerUsageName = "ArmNN.float32Performance.powerUsage"; +const char *g_Quantized8PerformanceExecTimeName = "ArmNN.quantized8Performance.execTime"; +const char *g_Quantized8PerformancePowerUsageName = "ArmNN.quantized8Performance.powerUsage"; const char *g_RelaxedFloat32toFloat16PerformanceExecTime = "ArmNN.relaxedFloat32toFloat16Performance.execTime"; } // anonymous namespace namespace armnn_driver { -namespace V1_1 +namespace hal_1_1 { -Return<void> ArmnnDriverImpl::getCapabilities_1_1( - const armnn::IRuntimePtr& runtime, - neuralnetworks::V1_1::IDevice::getCapabilities_1_1_cb cb) +Return<void> ArmnnDriverImpl::getCapabilities_1_1(const armnn::IRuntimePtr& runtime, + V1_1::IDevice::getCapabilities_1_1_cb cb) { - ALOGV("V1_1::ArmnnDriverImpl::getCapabilities()"); + ALOGV("hal_1_1::ArmnnDriverImpl::getCapabilities()"); - neuralnetworks::V1_1::Capabilities capabilities; + V1_1::Capabilities capabilities; if (runtime) { capabilities.float32Performance.execTime = @@ -57,10 +51,10 @@ Return<void> ArmnnDriverImpl::getCapabilities_1_1( } else { - capabilities.float32Performance.execTime = 0; - capabilities.float32Performance.powerUsage = 0; - capabilities.quantized8Performance.execTime = 0; - capabilities.quantized8Performance.powerUsage = 0; + capabilities.float32Performance.execTime = 0; + capabilities.float32Performance.powerUsage = 0; + capabilities.quantized8Performance.execTime = 0; + capabilities.quantized8Performance.powerUsage = 0; capabilities.relaxedFloat32toFloat16Performance.execTime = 0; cb(ErrorStatus::DEVICE_UNAVAILABLE, capabilities); @@ -69,5 +63,5 @@ Return<void> ArmnnDriverImpl::getCapabilities_1_1( return Void(); } -} // namespace armnn_driver::V1_1 -} // namespace armnn_driver +} // namespace hal_1_1 +} // namespace armnn_driver
\ No newline at end of file |