diff options
Diffstat (limited to 'ArmnnPreparedModel.hpp')
-rw-r--r-- | ArmnnPreparedModel.hpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/ArmnnPreparedModel.hpp b/ArmnnPreparedModel.hpp index 275af316..33be972f 100644 --- a/ArmnnPreparedModel.hpp +++ b/ArmnnPreparedModel.hpp @@ -17,6 +17,12 @@ namespace armnn_driver { +using armnnExecuteCallback_1_0 = std::function<void(V1_0::ErrorStatus status, std::string callingFunction)>; + +struct ArmnnCallback_1_0 +{ + armnnExecuteCallback_1_0 callback; +}; template <typename HalVersion> class ArmnnPreparedModel : public V1_0::IPreparedModel @@ -39,7 +45,7 @@ public: void ExecuteGraph(std::shared_ptr<std::vector<::android::nn::RunTimePoolInfo>>& pMemPools, std::shared_ptr<armnn::InputTensors>& pInputTensors, std::shared_ptr<armnn::OutputTensors>& pOutputTensors, - const ::android::sp<V1_0::IExecutionCallback>& callback); + ArmnnCallback_1_0 callback); /// Executes this model with dummy inputs (e.g. all zeroes). /// \return false on failure, otherwise true @@ -49,15 +55,15 @@ private: template <typename TensorBindingCollection> void DumpTensorsIfRequired(char const* tensorNamePrefix, const TensorBindingCollection& tensorBindings); - armnn::NetworkId m_NetworkId; - armnn::IRuntime* m_Runtime; - HalModel m_Model; + armnn::NetworkId m_NetworkId; + armnn::IRuntime* m_Runtime; + HalModel m_Model; // There must be a single RequestThread for all ArmnnPreparedModel objects to ensure serial execution of workloads // It is specific to this class, so it is declared as static here - static RequestThread<ArmnnPreparedModel, HalVersion> m_RequestThread; - uint32_t m_RequestCount; - const std::string& m_RequestInputsAndOutputsDumpDir; - const bool m_GpuProfilingEnabled; + static RequestThread<ArmnnPreparedModel, HalVersion, ArmnnCallback_1_0> m_RequestThread; + uint32_t m_RequestCount; + const std::string& m_RequestInputsAndOutputsDumpDir; + const bool m_GpuProfilingEnabled; }; } |