diff options
author | Josh Morman <jmorman@gnuradio.org> | 2021-11-24 12:53:58 -0500 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-11-24 14:41:53 -0500 |
commit | 51ec89501552c35b2bd0721c0501302f224fe44d (patch) | |
tree | 442036c424c286ece0976dcd3c36891cddefcd25 /gnuradio-runtime/examples/mp-sched/synthetic.py | |
parent | e426b9ad20dbbf41326c103b31a7418a80362b06 (diff) |
runtime: pep8 formatting
Signed-off-by: Josh Morman <jmorman@gnuradio.org>
Diffstat (limited to 'gnuradio-runtime/examples/mp-sched/synthetic.py')
-rw-r--r-- | gnuradio-runtime/examples/mp-sched/synthetic.py | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/gnuradio-runtime/examples/mp-sched/synthetic.py b/gnuradio-runtime/examples/mp-sched/synthetic.py index 4d6f3b9a22..cff6fd970d 100644 --- a/gnuradio-runtime/examples/mp-sched/synthetic.py +++ b/gnuradio-runtime/examples/mp-sched/synthetic.py @@ -24,7 +24,7 @@ class pipeline(gr.hier_block2): gr.hier_block2.__init__(self, "pipeline", gr.io_signature(1, 1, gr.sizeof_float), gr.io_signature(0, 0, 0)) - taps = ntaps*[1.0 / ntaps] + taps = ntaps * [1.0 / ntaps] upstream = self for i in range(nstages): op = filter.fir_filter_fff(1, taps) @@ -41,14 +41,14 @@ class top(gr.top_block): default_nsamples = 10e6 parser = ArgumentParser() parser.add_argument("-p", "--npipelines", type=intx, default=1, - metavar="NPIPES", help="the number of pipelines to create (default=%(default)s)") + metavar="NPIPES", help="the number of pipelines to create (default=%(default)s)") parser.add_argument("-s", "--nstages", type=intx, default=1, metavar="NSTAGES", - help="the number of stages in each pipeline (default=%(default)s)") + help="the number of stages in each pipeline (default=%(default)s)") parser.add_argument("-N", "--nsamples", type=eng_float, default=default_nsamples, - help=("the number of samples to run through the graph (default=%s)" % - (eng_notation.num_to_str(default_nsamples)))) + help=("the number of samples to run through the graph (default=%s)" % + (eng_notation.num_to_str(default_nsamples)))) parser.add_argument("-m", "--machine-readable", action="store_true", default=False, - help="enable machine readable output") + help="enable machine readable output") args = parser.parse_args() @@ -74,23 +74,24 @@ def time_it(tb): start = os.times() tb.run() stop = os.times() - delta = list(map((lambda a, b: a-b), stop, start)) + delta = list(map((lambda a, b: a - b), stop, start)) user, sys, childrens_user, childrens_sys, real = delta total_user = user + childrens_user - total_sys = sys + childrens_sys + total_sys = sys + childrens_sys if tb.machine_readable: print("%3d %3d %.3e %7.3f %7.3f %7.3f %7.3f %.6e %.3e" % ( - tb.npipes, tb.nstages, tb.nsamples, real, total_user, total_sys, (total_user+total_sys) / real, tb.flop, tb.flop / real)) + tb.npipes, tb.nstages, tb.nsamples, real, total_user, total_sys, (total_user + total_sys) / real, tb.flop, tb.flop / real)) else: - print("npipes %7d" % (tb.npipes,)) - print("nstages %7d" % (tb.nstages,)) - print("nsamples %s" % (eng_notation.num_to_str(tb.nsamples),)) + print("npipes %7d" % (tb.npipes,)) + print("nstages %7d" % (tb.nstages,)) + print("nsamples %s" % (eng_notation.num_to_str(tb.nsamples),)) print("real %7.3f" % (real,)) print("user %7.3f" % (total_user,)) print("sys %7.3f" % (total_sys,)) print("(user+sys)/real %7.3f" % ((total_user + total_sys) / real,)) - print("pseudo_flop %s" % (eng_notation.num_to_str(tb.flop),)) - print("pseudo_flop/real %s" % (eng_notation.num_to_str(tb.flop / real),)) + print("pseudo_flop %s" % (eng_notation.num_to_str(tb.flop),)) + print("pseudo_flop/real %s" % + (eng_notation.num_to_str(tb.flop / real),)) if __name__ == "__main__": @@ -99,7 +100,3 @@ if __name__ == "__main__": time_it(tb) except KeyboardInterrupt: raise SystemExit(128) - - - - |