aboutsummaryrefslogtreecommitdiff
path: root/driver_library/include
diff options
context:
space:
mode:
authorDavide Grohmann <davide.grohmann@arm.com>2022-04-25 15:27:52 +0200
committerDavide Grohmann <davide.grohmann@arm.com>2022-04-26 14:09:46 +0200
commitfc49559b7800bd13652102b779adcdecccd520e3 (patch)
treed38f06eedc86ca53f5d35888d32294f51e29a93a /driver_library/include
parent80f8ddf050d594ec663b01cb800e9547c9f919d0 (diff)
downloadethos-u-linux-driver-stack-fc49559b7800bd13652102b779adcdecccd520e3.tar.gz
Fix: always close fd when destructing buffers
Also always rethrow exceptions not swallow them Change-Id: I7a4b1e408858aa0d0128ca7bd6d6a7715662f9fb
Diffstat (limited to 'driver_library/include')
-rw-r--r--driver_library/include/ethosu.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/driver_library/include/ethosu.hpp b/driver_library/include/ethosu.hpp
index 547e346..a12d668 100644
--- a/driver_library/include/ethosu.hpp
+++ b/driver_library/include/ethosu.hpp
@@ -129,7 +129,7 @@ public:
class Device {
public:
Device(const char *device = "/dev/ethosu0");
- virtual ~Device();
+ virtual ~Device() noexcept(false);
int ioctl(unsigned long cmd, void *data = nullptr) const;
Capabilities capabilities() const;
@@ -141,7 +141,7 @@ private:
class Buffer {
public:
Buffer(const Device &device, const size_t capacity);
- virtual ~Buffer();
+ virtual ~Buffer() noexcept(false);
size_t capacity() const;
void clear() const;
@@ -162,7 +162,7 @@ class Network {
public:
Network(const Device &device, std::shared_ptr<Buffer> &buffer);
Network(const Device &device, const unsigned index);
- virtual ~Network();
+ virtual ~Network() noexcept(false);
int ioctl(unsigned long cmd, void *data = nullptr);
std::shared_ptr<Buffer> getBuffer();
@@ -215,7 +215,7 @@ public:
create(counterConfigs, enableCycleCounter);
}
- virtual ~Inference();
+ virtual ~Inference() noexcept(false);
int wait(int64_t timeoutNanos = -1) const;
const std::vector<uint32_t> getPmuCounters() const;