aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Bentham <matthew.bentham@arm.com>2019-05-03 22:54:36 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-05-07 08:24:25 +0000
commit9e80cd2195e64902951c3207b0d2aa82fe77c61f (patch)
tree659baacd57a99854817f5556224ee44a00beaff9
parent912b36224f19952663ebd3edc2a69d9031662fd1 (diff)
downloadandroid-nn-driver-9e80cd2195e64902951c3207b0d2aa82fe77c61f.tar.gz
IVGCVSW-2911 More Q compatiblity
Changes needed to RequestThread and ArmnnPreparedModel to compile in the Q environment Change-Id: Ib072afa1fe6a6a1b0931df79cec76cfac8b21f0c Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
-rw-r--r--1.1/HalPolicy.hpp2
-rw-r--r--ArmnnPreparedModel.cpp6
-rw-r--r--RequestThread.cpp4
-rw-r--r--RequestThread.hpp8
4 files changed, 11 insertions, 9 deletions
diff --git a/1.1/HalPolicy.hpp b/1.1/HalPolicy.hpp
index bcaf5637..da0f7e41 100644
--- a/1.1/HalPolicy.hpp
+++ b/1.1/HalPolicy.hpp
@@ -18,6 +18,8 @@ class HalPolicy
{
public:
using Model = V1_1::Model;
+ using Operand = V1_0::Operand;
+ using OperandType = V1_0::OperandType;
using Operation = V1_1::Operation;
using OperationType = V1_1::OperationType;
using getSupportedOperations_cb = V1_1::IDevice::getSupportedOperations_1_1_cb;
diff --git a/ArmnnPreparedModel.cpp b/ArmnnPreparedModel.cpp
index edb1c934..f183caff 100644
--- a/ArmnnPreparedModel.cpp
+++ b/ArmnnPreparedModel.cpp
@@ -27,7 +27,7 @@ namespace
{
using namespace armnn_driver;
-void NotifyCallbackAndCheck(const ::android::sp<IExecutionCallback>& callback, ErrorStatus errorStatus,
+void NotifyCallbackAndCheck(const ::android::sp<V1_0::IExecutionCallback>& callback, ErrorStatus errorStatus,
std::string callingFunction)
{
Return<void> returned = callback->notify(errorStatus);
@@ -141,7 +141,7 @@ ArmnnPreparedModel<HalVersion>::~ArmnnPreparedModel()
template<typename HalVersion>
Return<ErrorStatus> ArmnnPreparedModel<HalVersion>::execute(const Request& request,
- const ::android::sp<IExecutionCallback>& callback)
+ const ::android::sp<V1_0::IExecutionCallback>& callback)
{
ALOGV("ArmnnPreparedModel::execute(): %s", GetModelSummary(m_Model).c_str());
m_RequestCount++;
@@ -230,7 +230,7 @@ void ArmnnPreparedModel<HalVersion>::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<IExecutionCallback>& callback)
+ const ::android::sp<V1_0::IExecutionCallback>& callback)
{
ALOGV("ArmnnPreparedModel::ExecuteGraph(...)");
diff --git a/RequestThread.cpp b/RequestThread.cpp
index 4731489e..bc1eccc0 100644
--- a/RequestThread.cpp
+++ b/RequestThread.cpp
@@ -55,7 +55,7 @@ void RequestThread<HalVersion>::PostMsg(ArmnnPreparedModel<HalVersion>* model,
std::shared_ptr<std::vector<::android::nn::RunTimePoolInfo>>& memPools,
std::shared_ptr<armnn::InputTensors>& inputTensors,
std::shared_ptr<armnn::OutputTensors>& outputTensors,
- const ::android::sp<IExecutionCallback>& callback)
+ const ::android::sp<V1_0::IExecutionCallback>& callback)
{
ALOGV("RequestThread::PostMsg(...)");
auto data = std::make_shared<AsyncExecuteData>(model,
@@ -141,4 +141,4 @@ template class RequestThread<hal_1_0::HalPolicy>;
template class RequestThread<hal_1_1::HalPolicy>;
#endif
-} // namespace armnn_driver \ No newline at end of file
+} // namespace armnn_driver
diff --git a/RequestThread.hpp b/RequestThread.hpp
index 53f145b4..67069205 100644
--- a/RequestThread.hpp
+++ b/RequestThread.hpp
@@ -42,7 +42,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<IExecutionCallback>& callback);
+ const ::android::sp<V1_0::IExecutionCallback>& callback);
private:
RequestThread(const RequestThread&) = delete;
@@ -55,7 +55,7 @@ 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<IExecutionCallback>& cb)
+ const ::android::sp<V1_0::IExecutionCallback>& cb)
: m_Model(model)
, m_MemPools(memPools)
, m_InputTensors(inputTensors)
@@ -68,7 +68,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<IExecutionCallback> m_callback;
+ const ::android::sp<V1_0::IExecutionCallback> m_callback;
};
enum class ThreadMsgType
@@ -104,4 +104,4 @@ private:
std::condition_variable m_Cv;
};
-} // namespace armnn_driver \ No newline at end of file
+} // namespace armnn_driver