diff options
author | Kevin May <kevin.may@arm.com> | 2023-01-09 16:06:45 +0000 |
---|---|---|
committer | Nikhil Raj <nikhil.raj@arm.com> | 2023-01-17 15:19:12 +0000 |
commit | 05509cba30e095d20da47ff5e614d54ce25c6ab5 (patch) | |
tree | dbca88c060edd7b20da7fbf31c8a51c161150d53 /shim/sl/canonical/ArmnnDevice.hpp | |
parent | c6fb7d1c33da73924696d8bdfe63aac02c25b147 (diff) | |
download | armnn-branches/armnn_22_11_01.tar.gz |
IVGCVSW-7402 Fix for Native crashes in Arm NNAPI SLv22.11.01branches/armnn_22_11_01
* 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.hpp | 8 |
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; |