onnx2versal
Loading...
Searching...
No Matches
graph_argmax.h
1#ifndef __ARGMAX_GRAPH_H__
2#define __ARGMAX_GRAPH_H__
3
4#include <adf.h>
5#include "argmax.h"
6
7
28template <template<int, int> class ARGMAX, int CHUNK_CNT, int CHUNK_SIZE>
29class ArgmaxGraph : public adf::graph {
30
31 private:
32 adf::kernel k[1];
33 std::string id;
34
35 public:
36 adf::port<input> pin[1];
37 adf::port<output> pout[1];
38
39 ArgmaxGraph() {
40 k[0] = adf::kernel::create_object<ARGMAX<CHUNK_CNT, CHUNK_SIZE>>();
41 adf::source(k[0]) = "argmax.cc";
42 adf::headers(k[0]) = {"argmax.h"};
43 adf::runtime<ratio>(k[0]) = 0.6;
44
45 adf::connect<adf::window<CHUNK_CNT*CHUNK_SIZE*4>> (pin[0], k[0].in[0]);
46 adf::connect<adf::window<CHUNK_CNT*4>> (k[0].out[0], pout[0]);
47 }
48
49};
53#endif // __ARGMAX_GRAPH_H__
Single instance graph.
Definition graph_argmax.h:29