diff options
author | Nick Foster | 2011-05-18 18:03:26 -0700 |
---|---|---|
committer | Nick Foster | 2011-05-18 18:03:26 -0700 |
commit | 3a41b3208e222965e908c6a04e3ab05379c782c4 (patch) | |
tree | 4dcc39d3d7a765aa347a6d34bb2c6464fdb8fe17 /volk/gen/make_each_machine_c.py | |
parent | c80e7b00de836a388013a002008c7256481414cb (diff) | |
download | gnuradio-3a41b3208e222965e908c6a04e3ab05379c782c4.tar.gz gnuradio-3a41b3208e222965e908c6a04e3ab05379c782c4.tar.bz2 gnuradio-3a41b3208e222965e908c6a04e3ab05379c782c4.zip |
Volk: added alignment prop to each machine. call volk_get_alignment() to get your machine's reqd alignment for malloc.
Diffstat (limited to 'volk/gen/make_each_machine_c.py')
-rw-r--r-- | volk/gen/make_each_machine_c.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/volk/gen/make_each_machine_c.py b/volk/gen/make_each_machine_c.py index d4f5f01de..44e2ef3f2 100644 --- a/volk/gen/make_each_machine_c.py +++ b/volk/gen/make_each_machine_c.py @@ -18,7 +18,7 @@ from volk_regexp import * import string -def _make_each_machine_struct(machine_name, archs, functions, fcountlist, taglist): +def _make_each_machine_struct(machine_name, archs, functions, fcountlist, taglist, alignment): #make the machine fcountlist and taglist a subset given the archs list machine_fcountlists = list() @@ -38,6 +38,7 @@ def _make_each_machine_struct(machine_name, archs, functions, fcountlist, taglis tempstring += "struct volk_machine volk_machine_" + machine_name + " = {\n" tempstring += " " + ' | '.join(["(1 << LV_" + arch.swapcase() + ")" for arch in archs]) + ",\n" tempstring += " \"%s\",\n"%machine_name + tempstring += " %s,\n"%alignment #fill in the description for each function for i in range(len(functions)): @@ -51,8 +52,7 @@ def _make_each_machine_struct(machine_name, archs, functions, fcountlist, taglis tempstring += "};\n" return tempstring -def make_each_machine_c(machine_name, archs, functions, fcountlist, taglist): - +def make_each_machine_c(machine_name, archs, functions, fcountlist, taglist, alignment): tempstring = r""" // This file is automatically generated by make_each_machine_c.py. // Do not edit this file. @@ -77,8 +77,8 @@ def make_each_machine_c(machine_name, archs, functions, fcountlist, taglist): %s #endif """%( - _make_each_machine_struct(machine_name, archs+["orc"], functions, fcountlist, taglist), - _make_each_machine_struct(machine_name, archs, functions, fcountlist, taglist) + _make_each_machine_struct(machine_name, archs+["orc"], functions, fcountlist, taglist, alignment), + _make_each_machine_struct(machine_name, archs, functions, fcountlist, taglist, alignment) ) return tempstring |