Skip to content

Commit 9daf33f

Browse files
committed
Add minimal code usage to README
1 parent 3daaa83 commit 9daf33f

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,31 @@ Edgerunner is in an early development stage. Refer to the [HACKING](/HACKING.md)
6666

6767
## 🕹 Usage
6868

69-
See [examples](example/README.md) for basic usage instructions.
69+
Edgerunner is designed around the following usage pattern;
70+
71+
```cpp
72+
#include <edgerunner/edgerunner.hpp>
73+
#include <edgerunner/model.hpp>
74+
75+
auto model = edge::createModel("/path/to/model");
76+
77+
model.applyDelegate(DELEGATE::NPU);
78+
79+
auto input = model.getInput(0).getTensorAs<float>();
80+
81+
/* overwrite input data */
82+
83+
model.execute();
84+
85+
auto output = model.getInput(0).getTensorAs<float>();
86+
87+
/* interpret output data */
88+
```
89+
90+
See [examples](example/README.md) for more detailed usage.
91+
92+
See [model.hpp](/include/edgerunner/model.hpp) and
93+
[tensor.hpp](/include/edgerunner/tensor.hpp) for complete API.
7094

7195
## 🏆 Contributing
7296

0 commit comments

Comments
 (0)