aboutsummaryrefslogtreecommitdiff
path: root/RequestThread.hpp
diff options
context:
space:
mode:
authorMike Kelly <mike.kelly@arm.com>2019-07-22 14:06:00 +0100
committerMike Kelly <mike.kelly@arm.com>2019-07-22 14:06:00 +0100
commit65c42dc4d68ac163b77a3139feee3e7d4530b5c5 (patch)
treeb3ae65334c2dbfc1cc3d5a2cb336a0244b1ececc /RequestThread.hpp
parent9843c014726028b9082d5a9901db80b9dc519121 (diff)
downloadandroid-nn-driver-65c42dc4d68ac163b77a3139feee3e7d4530b5c5.tar.gz
IVGCVSW-3463 Fix Hal 1.2 Dynamic Output Shape VTS test failures
*Updating ArmnnPreparedModel_1_2 to work with output shapes and timing. Change-Id: I06c4ecaf1e2c36ef77a0731ece4885fc3997cd3b Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Diffstat (limited to 'RequestThread.hpp')
-rw-r--r--RequestThread.hpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/RequestThread.hpp b/RequestThread.hpp
index dc1b535a..253d104c 100644
--- a/RequestThread.hpp
+++ b/RequestThread.hpp
@@ -18,8 +18,10 @@
namespace armnn_driver
{
+using TimePoint = std::chrono::steady_clock::time_point;
+static const TimePoint g_Min = std::chrono::steady_clock::time_point::min();
-template<template <typename HalVersion> class PreparedModel, typename HalVersion>
+template<template <typename HalVersion> class PreparedModel, typename HalVersion, typename Callback>
class RequestThread
{
public:
@@ -39,7 +41,7 @@ public:
std::shared_ptr<std::vector<::android::nn::RunTimePoolInfo>>& memPools,
std::shared_ptr<armnn::InputTensors>& inputTensors,
std::shared_ptr<armnn::OutputTensors>& outputTensors,
- const ::android::sp<V1_0::IExecutionCallback>& callback);
+ Callback callback);
private:
RequestThread(const RequestThread&) = delete;
@@ -52,12 +54,12 @@ private:
std::shared_ptr<std::vector<::android::nn::RunTimePoolInfo>>& memPools,
std::shared_ptr<armnn::InputTensors>& inputTensors,
std::shared_ptr<armnn::OutputTensors>& outputTensors,
- const ::android::sp<V1_0::IExecutionCallback>& cb)
+ Callback callback)
: m_Model(model)
, m_MemPools(memPools)
, m_InputTensors(inputTensors)
, m_OutputTensors(outputTensors)
- , m_callback(cb)
+ , m_Callback(callback)
{
}
@@ -65,7 +67,7 @@ private:
std::shared_ptr<std::vector<::android::nn::RunTimePoolInfo>> m_MemPools;
std::shared_ptr<armnn::InputTensors> m_InputTensors;
std::shared_ptr<armnn::OutputTensors> m_OutputTensors;
- const ::android::sp<V1_0::IExecutionCallback> m_callback;
+ Callback m_Callback;
};
enum class ThreadMsgType