summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py
diff options
context:
space:
mode:
authorAndrej Rode <mail@andrejro.de>2018-06-23 23:41:42 +0200
committerAndrej Rode <mail@andrejro.de>2018-06-24 00:03:35 +0200
commit167a6152bad060fc53dd29e0fa79ef83eff1be5b (patch)
treea01049672d9d7d1bf3d295ed96698a323941f8e8 /gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py
parent3c8e6008b092287246234001db7cf1a4038300da (diff)
parentfcd002b6ac82e1e0c1224e24506410ff0833e1aa (diff)
Merge branch 'python3_fix' into next
Manual merge conflict resolution has been applied to following conflicts: * Typos: * gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py * gr-blocks/python/blocks/qa_wavfile.py * gr-filter/examples/gr_filtdes_api.py * grc/blocks/parameter.xml * gr-uhd/python/uhd/__init__.py * ValueError -> RuntimeError: * gr-blocks/python/blocks/qa_hier_block2.py * relative Imports & other Py3k: * gr-digital/python/digital/psk_constellations.py * gr-digital/python/digital/qam_constellations.py * gr-digital/python/digital/test_soft_decisions.py * gr-digital/python/digital/gfsk.py * SequenceCompleter: * gr-utils/python/modtool/modtool_add.py * gr-utils/python/modtool/modtool_rename.py * gr-utils/python/modtool/modtool_rm.py * Updated API on next: * gr-blocks/grc/blocks_file_source.xml * gr-blocks/python/blocks/qa_file_source_sink.py * gr-qtgui/grc/qtgui_time_sink_x.xml * GRC Py3k Updates: * grc/core/Block.py * grc/core/Constants.py * grc/core/Platform.py * grc/core/utils/odict.py * grc/gui/Actions.py * grc/gui/Block.py * grc/gui/Executor.py * grc/gui/Port.py
Diffstat (limited to 'gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py')
-rw-r--r--gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py b/gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py
index a7dd7b705c..603c2ae5c3 100644
--- a/gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py
+++ b/gnuradio-runtime/examples/volk_benchmark/volk_test_funcs.py
@@ -1,5 +1,7 @@
#!/usr/bin/env python
+from __future__ import print_function
+from __future__ import unicode_literals
from gnuradio import gr
from gnuradio import blocks
import math, sys, os, time
@@ -122,18 +124,18 @@ class helper(gr.top_block):
self.snks = []
self.head = blocks.head(isizeof, N)
- for n in xrange(nsrcs):
+ for n in range(nsrcs):
self.srcs.append(blocks.null_source(isizeof))
- for n in xrange(nsnks):
+ for n in range(nsnks):
self.snks.append(blocks.null_sink(osizeof))
self.connect(self.srcs[0], self.head, (self.op,0))
- for n in xrange(1, nsrcs):
+ for n in range(1, nsrcs):
self.connect(self.srcs[n], (self.op,n))
- for n in xrange(nsnks):
+ for n in range(nsnks):
self.connect((self.op,n), self.snks[n])
def timeit(tb, iterations):
@@ -143,10 +145,10 @@ def timeit(tb, iterations):
'''
r = gr.enable_realtime_scheduling()
if r != gr.RT_OK:
- print "Warning: failed to enable realtime scheduling"
+ print("Warning: failed to enable realtime scheduling")
times = []
- for i in xrange(iterations):
+ for i in range(iterations):
start_time = time.time()
tb.run()
end_time = time.time()