summary refs log tree commit diff
path: root/benchtests/scripts/bench.py
diff options
context:
space:
mode:
Diffstat (limited to 'benchtests/scripts/bench.py')
-rwxr-xr-xbenchtests/scripts/bench.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/benchtests/scripts/bench.py b/benchtests/scripts/bench.py
index 492c764aa7..eb5a14141a 100755
--- a/benchtests/scripts/bench.py
+++ b/benchtests/scripts/bench.py
@@ -128,6 +128,10 @@ def gen_source(func, directives, all_vals):
     else:
         getret = ''
 
+    # Test initialization.
+    if directives['init']:
+        print('#define BENCH_INIT %s' % directives['init'])
+
     print(EPILOGUE % {'getret': getret, 'func': func})
 
 
@@ -232,7 +236,8 @@ def parse_file(func):
             'args': [],
             'includes': [],
             'include-sources': [],
-            'ret': ''
+            'ret': '',
+            'init': ''
     }
 
     try: