aboutsummaryrefslogtreecommitdiff
path: root/shim/sl/canonical/ArmnnDevice.hpp
diff options
context:
space:
mode:
authorKevin May <kevin.may@arm.com>2023-01-09 16:06:45 +0000
committerKevin May <kevin.may@arm.com>2023-01-10 10:22:04 +0000
commit69bcb88a2d87171181e3bc11f8709a03d77f3b04 (patch)
tree67df8b2fe2a61af41e4f8dddaa3b1b39353ccb03 /shim/sl/canonical/ArmnnDevice.hpp
parent4512b921b3533d7476c941cf61edcf57418b17d4 (diff)
downloadarmnn-69bcb88a2d87171181e3bc11f8709a03d77f3b04.tar.gz
IVGCVSW-7402 Fix for Native crashes in Arm NNAPI SL
* Instead of extending ArmnnDevice with ArmnnDriver make it a member * This will allow us to construct the ArmnnDriver and return a DEVICE_UNAVAILABLE NN_ERROR instead of segfaulting with the armnn::InvalidArgumentException if we cannot create a device Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: Ibbcdbeb33dfd170dd1fb393204620e5b9e6342b8
Diffstat (limited to 'shim/sl/canonical/ArmnnDevice.hpp')
-rw-r--r--shim/sl/canonical/ArmnnDevice.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/shim/sl/canonical/ArmnnDevice.hpp b/shim/sl/canonical/ArmnnDevice.hpp
index 9597bfc013..93109696f7 100644
--- a/shim/sl/canonical/ArmnnDevice.hpp
+++ b/shim/sl/canonical/ArmnnDevice.hpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -14,11 +14,11 @@ namespace armnn_driver
class ArmnnDevice
{
+friend class ArmnnDriver;
-protected:
+public:
ArmnnDevice(DriverOptions options);
- virtual ~ArmnnDevice() {}
-
+ ~ArmnnDevice() {}
protected:
armnn::IRuntimePtr m_Runtime;
armnn::IGpuAccTunedParametersPtr m_ClTunedParameters;