diff options
-rw-r--r-- | benchmark/bm_registry.py | 15 | ||||
-rw-r--r-- | benchmark/tb_grextras_delay.py | 8 | ||||
-rw-r--r-- | benchmark/tb_grextras_math.py | 8 |
3 files changed, 19 insertions, 12 deletions
diff --git a/benchmark/bm_registry.py b/benchmark/bm_registry.py index c1be8ea..bb9c0cc 100644 --- a/benchmark/bm_registry.py +++ b/benchmark/bm_registry.py @@ -68,10 +68,12 @@ BENCHMARK_MATH_OPS = tokwargs( - GrExtras math blocks avoid an unnecessary memcpy. - GrExtras math blocks enable automatic bufer in-placing.''', tests = [ - tokwargs(wat='GrExtras Adder', args=['tb_grextras_math.py', '1e8', 'extras_add'], env=GRAS_ENV), - tokwargs(wat='gr-blocks Adder', args=['tb_grextras_math.py', '1e8', 'blocks_add'], env=GRAS_ENV), - tokwargs(wat='GrExtras Multiplier', args=['tb_grextras_math.py', '1e8', 'extras_mult'], env=GRAS_ENV), - tokwargs(wat='gr-blocks Multiplier', args=['tb_grextras_math.py', '1e8', 'blocks_mult'], env=GRAS_ENV), + tokwargs(wat='GrExtras Add\n(GRAS)', args=['tb_grextras_math.py', '1e8', 'extras_add'], env=GRAS_ENV), + tokwargs(wat='gr-blocks Add\n(GRAS)', args=['tb_grextras_math.py', '1e8', 'blocks_add'], env=GRAS_ENV), + tokwargs(wat='gr-blocks Add\n(GR)', args=['tb_grextras_math.py', '1e8', 'blocks_add'], env=GR_ENV), + tokwargs(wat='GrExtras Mult\n(GRAS)', args=['tb_grextras_math.py', '1e8', 'extras_mult'], env=GRAS_ENV), + tokwargs(wat='gr-blocks Mult\n(GRAS)', args=['tb_grextras_math.py', '1e8', 'blocks_mult'], env=GRAS_ENV), + tokwargs(wat='gr-blocks Mult\n(GR)', args=['tb_grextras_math.py', '1e8', 'blocks_mult'], env=GR_ENV), ], to_result = lambda t: 1e8/t ) @@ -82,8 +84,9 @@ BENCHMARK_DELAY_BLOCKS = tokwargs( - Compare delay block implementations using GRAS. - The GrExtras implementation uses zero-copy.''', tests = [ - tokwargs(wat='GrExtras Delay\n(zero-copy)', args=['tb_grextras_delay.py', '1e8', 'extras_delay'], env=GRAS_ENV), - tokwargs(wat='gr-core Delay\n(mem-copy)', args=['tb_grextras_delay.py', '1e8', 'core_delay'], env=GRAS_ENV), + tokwargs(wat='GrExtras Delay\n(GRAS)', args=['tb_grextras_delay.py', '1e8', 'extras_delay'], env=GRAS_ENV), + tokwargs(wat='gr-core Delay\n(GRAS)', args=['tb_grextras_delay.py', '1e8', 'core_delay'], env=GRAS_ENV), + tokwargs(wat='gr-core Delay\n(GR)', args=['tb_grextras_delay.py', '1e8', 'core_delay'], env=GR_ENV), ], to_result = lambda t: 1e8/t ) diff --git a/benchmark/tb_grextras_delay.py b/benchmark/tb_grextras_delay.py index 815ab3d..c24a440 100644 --- a/benchmark/tb_grextras_delay.py +++ b/benchmark/tb_grextras_delay.py @@ -1,5 +1,7 @@ -import gras -import grextras +try: + import gras + import grextras +except ImportError: pass import gnuradio from gnuradio import gr import sys @@ -9,7 +11,7 @@ if __name__ == '__main__': num = long(float(sys.argv[1])) what = sys.argv[2] - tb = gras.TopBlock() + tb = gr.top_block() src0 = gr.null_source(8) sink = gr.null_sink(8) head = gr.head(8, num) diff --git a/benchmark/tb_grextras_math.py b/benchmark/tb_grextras_math.py index e238472..144f34c 100644 --- a/benchmark/tb_grextras_math.py +++ b/benchmark/tb_grextras_math.py @@ -1,5 +1,7 @@ -import gras -import grextras +try: + import gras + import grextras +except ImportError: pass import gnuradio from gnuradio import gr from gnuradio import blocks as grblocks @@ -10,7 +12,7 @@ if __name__ == '__main__': num = long(float(sys.argv[1])) what = sys.argv[2] - tb = gras.TopBlock() + tb = gr.top_block() src0 = gr.null_source(8) src1 = gr.null_source(8) sink = gr.null_sink(8) |