MCPcopy Create free account
hub / github.com/FutureSDR/FutureSDR / null_flowgraph

Method null_flowgraph

perf/null/null_flowgraph.cpp:20–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19null_flowgraph::null_flowgraph(int pipes, int stages, uint64_t samples, size_t chunk) {
20
21 this->tb = gr::make_top_block("buf_flowgraph");
22
23 for(int pipe = 0; pipe < pipes; pipe++) {
24
25 auto src = blocks::null_source::make(4);
26 auto head = blocks::head::make(4, samples);
27 tb->connect(src, 0, head, 0);
28
29 auto prev = sched::copy_n::make(sizeof(float), chunk);
30 tb->connect(head, 0, prev, 0);
31
32 for(int stage = 1; stage < stages; stage++) {
33 auto block = sched::copy_n::make(sizeof(float), chunk);
34 tb->connect(prev, 0, block, 0);
35 prev = block;
36 }
37
38 auto sink = blocks::null_sink::make(sizeof(float));
39 tb->connect(prev, 0, sink, 0);
40 }
41}
42
43int main (int argc, char **argv) {
44 int run;
45 int pipes;

Callers

nothing calls this directly

Calls 1

connectMethod · 0.45

Tested by

no test coverage detected