aboutsummaryrefslogtreecommitdiff
path: root/src/backends/reference/workloads/RefElementwiseWorkload.cpp
diff options
context:
space:
mode:
authorMatthew Sloyan <matthew.sloyan@arm.com>2022-06-30 17:13:04 +0100
committerNikhil Raj <nikhil.raj@arm.com>2022-07-27 15:52:10 +0100
commit2d213a759e68f753ef4696e02a8535f7edfe421d (patch)
treef4003d0a60e907937e04d96fc434c0bfac596f86 /src/backends/reference/workloads/RefElementwiseWorkload.cpp
parent28aa6691accfd78c5eb5c4356316220d0e82ddef (diff)
downloadarmnn-2d213a759e68f753ef4696e02a8535f7edfe421d.tar.gz
IVGCVSW-6620 Update the async api to use ExecutionData
* ExecutionData holds a void* which can be assigned to data required for execution in a backend. WorkingMemDescriptors are used in the Ref backend which hold TensorHandles for inputs and outputs. * Updated ExecuteAsync functions to take ExecutionData. * Added CreateExecutionData and UpdateExectutionData to IBackendInternal. * Streamlined experimental IWorkingMemHandle API by removing map related function and unused m_workingMemDescriptorMap from WorkingMemHandle. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I54b0aab12872011743a141eb42dae200227769af
Diffstat (limited to 'src/backends/reference/workloads/RefElementwiseWorkload.cpp')
-rw-r--r--src/backends/reference/workloads/RefElementwiseWorkload.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backends/reference/workloads/RefElementwiseWorkload.cpp b/src/backends/reference/workloads/RefElementwiseWorkload.cpp
index d14ce075b0..344ca344e3 100644
--- a/src/backends/reference/workloads/RefElementwiseWorkload.cpp
+++ b/src/backends/reference/workloads/RefElementwiseWorkload.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017 Arm Ltd. All rights reserved.
+// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -33,9 +33,10 @@ void RefElementwiseWorkload<Functor, ParentDescriptor, DebugString>::Execute() c
template <typename Functor, typename ParentDescriptor, typename armnn::StringMapping::Id DebugString>
void RefElementwiseWorkload<Functor, ParentDescriptor, DebugString>::ExecuteAsync(
- WorkingMemDescriptor &workingMemDescriptor)
+ ExecutionData& executionData)
{
- Execute(workingMemDescriptor.m_Inputs, workingMemDescriptor.m_Outputs);
+ WorkingMemDescriptor* workingMemDescriptor = static_cast<WorkingMemDescriptor*>(executionData.m_Data);
+ Execute(workingMemDescriptor->m_Inputs, workingMemDescriptor->m_Outputs);
}
template <typename Functor, typename ParentDescriptor, typename armnn::StringMapping::Id DebugString>