aboutsummaryrefslogtreecommitdiff
path: root/src/backends/cl/ClWorkloadFactory.hpp
diff options
context:
space:
mode:
authorAron Virginas-Tar <Aron.Virginas-Tar@arm.com>2018-10-19 16:46:15 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2018-10-22 16:57:54 +0100
commita8e06ed540a934f966679e1ef1cf7acf295211b3 (patch)
tree247035d1bce6ddb8543081a88294a85e34968035 /src/backends/cl/ClWorkloadFactory.hpp
parentf0b4845c1c6f24f59d4c88473b852cf69a3c7ae9 (diff)
downloadarmnn-a8e06ed540a934f966679e1ef1cf7acf295211b3.tar.gz
IVGCVSW-1955: Unify backend exceptions (wrap cl::Error)
* Added wrapper function around arm_compute::IFunction::run() that catches cl::Error and wraps it into an armnn::RuntimeException * Added MakeWorkload template inside ClWorkloadFactory that catches cl::Error and wraps it into an armnn::RuntimeException * Replaced cl::Error with armnn::RuntimeException in catch statements inside LoadedNetwork Change-Id: I2340f41ae02b8db1d7ef5157824a50e7410854e3
Diffstat (limited to 'src/backends/cl/ClWorkloadFactory.hpp')
-rw-r--r--src/backends/cl/ClWorkloadFactory.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/backends/cl/ClWorkloadFactory.hpp b/src/backends/cl/ClWorkloadFactory.hpp
index 9f8ec62db7..66de3a50f1 100644
--- a/src/backends/cl/ClWorkloadFactory.hpp
+++ b/src/backends/cl/ClWorkloadFactory.hpp
@@ -132,6 +132,16 @@ public:
private:
#ifdef ARMCOMPUTECL_ENABLED
+ template<typename FloatWorkload, typename Uint8Workload, typename QueueDescriptorType, typename... Args>
+ static std::unique_ptr<IWorkload> MakeWorkload(const QueueDescriptorType& descriptor,
+ const WorkloadInfo& info,
+ Args&&... args);
+
+ template <typename Workload, typename QueueDescriptorType, typename... Args>
+ static std::unique_ptr<IWorkload> MakeWorkload(const QueueDescriptorType& descriptor,
+ const WorkloadInfo& info,
+ Args&&... args);
+
mutable ClMemoryManager m_MemoryManager;
#endif
};