From e48bdff741568236d3c0747ad3d18a8eba5b36dd Mon Sep 17 00:00:00 2001 From: Matteo Martincigh Date: Mon, 3 Sep 2018 13:50:50 +0100 Subject: 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 --- RequestThread.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'RequestThread.hpp') diff --git a/RequestThread.hpp b/RequestThread.hpp index 2448dbec..41ad213b 100644 --- a/RequestThread.hpp +++ b/RequestThread.hpp @@ -11,6 +11,7 @@ #include #include "ArmnnDriver.hpp" +#include "ArmnnDriverImpl.hpp" #include #include @@ -18,8 +19,10 @@ namespace armnn_driver { +template class ArmnnPreparedModel; +template class RequestThread { public: @@ -35,7 +38,7 @@ public: /// @param[in] inputTensors pointer to the input tensors for the request /// @param[in] outputTensors pointer to the output tensors for the request /// @param[in] callback the android notification callback - void PostMsg(armnn_driver::ArmnnPreparedModel* model, + void PostMsg(armnn_driver::ArmnnPreparedModel* model, std::shared_ptr>& memPools, std::shared_ptr& inputTensors, std::shared_ptr& outputTensors, @@ -48,7 +51,7 @@ private: /// storage for a prepared model and args for the asyncExecute call struct AsyncExecuteData { - AsyncExecuteData(ArmnnPreparedModel* model, + AsyncExecuteData(ArmnnPreparedModel* model, std::shared_ptr>& memPools, std::shared_ptr& inputTensors, std::shared_ptr& outputTensors, @@ -61,7 +64,7 @@ private: { } - armnn_driver::ArmnnPreparedModel* m_Model; + armnn_driver::ArmnnPreparedModel* m_Model; std::shared_ptr> m_MemPools; std::shared_ptr m_InputTensors; std::shared_ptr m_OutputTensors; -- cgit v1.2.1