aboutsummaryrefslogtreecommitdiff
path: root/driver_library/include/ethosu.hpp
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2020-10-16 14:42:19 +0200
committerKristofer Jonsson <kristofer.jonsson@arm.com>2020-10-16 14:42:19 +0200
commit79689c5fefc8c37cc35e43f6e2bcc8402eb56707 (patch)
tree1f64fb48ba4b2734572f50784bb9e0f063e1244f /driver_library/include/ethosu.hpp
parentd748336bf17ad9f4f52315294b9eb4ea5132095a (diff)
downloadethos-u-linux-driver-stack-79689c5fefc8c37cc35e43f6e2bcc8402eb56707.tar.gz
Clang format
Change-Id: I2ebac7df9c4716be7fee10ce4cba350e40860ca2
Diffstat (limited to 'driver_library/include/ethosu.hpp')
-rw-r--r--driver_library/include/ethosu.hpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/driver_library/include/ethosu.hpp b/driver_library/include/ethosu.hpp
index c3a310c..4e45485 100644
--- a/driver_library/include/ethosu.hpp
+++ b/driver_library/include/ethosu.hpp
@@ -25,12 +25,9 @@
#include <string>
#include <vector>
-namespace EthosU
-{
+namespace EthosU {
-class Exception :
- public std::exception
-{
+class Exception : public std::exception {
public:
Exception(const char *msg);
virtual ~Exception() throw();
@@ -40,8 +37,7 @@ private:
std::string msg;
};
-class Device
-{
+class Device {
public:
Device(const char *device = "/dev/ethosu0");
virtual ~Device();
@@ -52,8 +48,7 @@ private:
int fd;
};
-class Buffer
-{
+class Buffer {
public:
Buffer(Device &device, const size_t capacity);
virtual ~Buffer();
@@ -73,8 +68,7 @@ private:
const size_t dataCapacity;
};
-class Network
-{
+class Network {
public:
Network(Device &device, std::shared_ptr<Buffer> &buffer);
virtual ~Network();
@@ -93,13 +87,15 @@ private:
std::vector<size_t> ofmDims;
};
-class Inference
-{
+class Inference {
public:
template <typename T>
- Inference(std::shared_ptr<Network> &network, const T &ifmBegin, const T &ifmEnd, const T &ofmBegin, const T &ofmEnd) :
- network(network)
- {
+ Inference(std::shared_ptr<Network> &network,
+ const T &ifmBegin,
+ const T &ifmEnd,
+ const T &ofmBegin,
+ const T &ofmEnd) :
+ network(network) {
std::copy(ifmBegin, ifmEnd, std::back_inserter(ifmBuffers));
std::copy(ofmBegin, ofmEnd, std::back_inserter(ofmBuffers));
create();
@@ -122,4 +118,4 @@ private:
std::vector<std::shared_ptr<Buffer>> ofmBuffers;
};
-}
+} // namespace EthosU