aboutsummaryrefslogtreecommitdiff
path: root/include/armnn/IAsyncNetwork.hpp
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2021-03-30 11:05:36 +0100
committerSadik Armagan <sadik.armagan@arm.com>2021-03-30 11:05:36 +0100
commita004251094074d7453531a25342d19dd66ee115f (patch)
tree32f9e14dd679641c27c3e86f1a16073348738466 /include/armnn/IAsyncNetwork.hpp
parent34b9aba8fb89ec6874d3d72555714955db9c1b72 (diff)
downloadarmnn-a004251094074d7453531a25342d19dd66ee115f.tar.gz
IVGCVSW-5799 'Create Pimpl Idiom for Async prototype'
* Implemented Pimpl Idiom for IAsyncNetwork Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Ic7311880563568b014a27f6347f8d41f2ad96df6
Diffstat (limited to 'include/armnn/IAsyncNetwork.hpp')
-rw-r--r--include/armnn/IAsyncNetwork.hpp31
1 files changed, 22 insertions, 9 deletions
diff --git a/include/armnn/IAsyncNetwork.hpp b/include/armnn/IAsyncNetwork.hpp
index 7ef83bbff1..c234ae55ac 100644
--- a/include/armnn/IAsyncNetwork.hpp
+++ b/include/armnn/IAsyncNetwork.hpp
@@ -17,33 +17,46 @@
namespace armnn
{
+struct INetworkProperties;
+
+namespace profiling
+{
+class ProfilingService;
+}
namespace experimental
{
+class AsyncNetworkImpl;
class IAsyncNetwork
{
public:
- virtual ~IAsyncNetwork() {};
+ IAsyncNetwork(std::unique_ptr<IOptimizedNetwork> net,
+ const INetworkProperties& networkProperties,
+ profiling::ProfilingService& profilingService);
+ ~IAsyncNetwork();
- virtual TensorInfo GetInputTensorInfo(LayerBindingId layerId) const = 0;
- virtual TensorInfo GetOutputTensorInfo(LayerBindingId layerId) const = 0;
+ TensorInfo GetInputTensorInfo(LayerBindingId layerId) const;
+ TensorInfo GetOutputTensorInfo(LayerBindingId layerId) const;
/// Thread safe execution of the network. Returns once execution is complete.
/// Will block until this and any other thread using the same workingMem object completes.
- virtual Status Execute(const InputTensors& inputTensors,
- const OutputTensors& outputTensors,
- IWorkingMemHandle& workingMemHandle) = 0;
+ Status Execute(const InputTensors& inputTensors,
+ const OutputTensors& outputTensors,
+ IWorkingMemHandle& workingMemHandle);
/// Create a new unique WorkingMemHandle object. Create multiple handles if you wish to have
/// overlapped Execution by calling this function from different threads.
- virtual std::unique_ptr<IWorkingMemHandle> CreateWorkingMemHandle() = 0;
+ std::unique_ptr<IWorkingMemHandle> CreateWorkingMemHandle();
/// Get the profiler used for this network
- virtual std::shared_ptr<IProfiler> GetProfiler() const = 0;
+ std::shared_ptr<IProfiler> GetProfiler() const;
/// Register a debug callback function to be used with this network
- virtual void RegisterDebugCallback(const DebugCallbackFunction& func) = 0;
+ void RegisterDebugCallback(const DebugCallbackFunction& func);
+
+private:
+ std::unique_ptr<AsyncNetworkImpl> pAsyncNetworkImpl;
};
} // end experimental namespace