onnx2versal
Loading...
Searching...
No Matches
graph_identity.h
1#ifndef __IDENTITY_GRAPH_H__
2#define __IDENTITY_GRAPH_H__
3
4#include <adf.h>
5#include "identity.h"
6#include "graph_utils.h"
7
27template <typename TT, int N>
28class IdentityGraph : public adf::graph {
29
30 private:
31 adf::kernel k[1];
32
33 public:
34 adf::port<input> pin[1];
35 adf::port<output> pout[1];
36
37 IdentityGraph() {
38 k[0] = adf::kernel::create_object<Identity<TT, N>>();
39 adf::source(k[0]) = "identity.cc";
40 adf::headers(k[0]) = {"identity.h"};
41 adf::runtime<ratio>(k[0]) = 0.6;
42
43 adf::connect<adf::stream> (pin[0], k[0].in[0]);
44 adf::connect<adf::stream> (k[0].out[0], pout[0]);
45 adf::samples_per_iteration(k[0].out[0]) = N;
46 }
47
48};
52#endif // __IDENTITY_GRAPH_H__
Single instance graph.
Definition graph_identity.h:28