diff options
author | Nick Foster | 2011-02-15 21:59:19 -0800 |
---|---|---|
committer | Nick Foster | 2011-02-15 21:59:19 -0800 |
commit | fd03c0ee7cb9af71a5e0292569b626ba3dabd885 (patch) | |
tree | b235723bd39c18e1168a7a100e7e97b1ebf9de14 /volk/include | |
parent | d364316fa2e047890af09c7bdeed776d6391b3db (diff) | |
download | gnuradio-fd03c0ee7cb9af71a5e0292569b626ba3dabd885.tar.gz gnuradio-fd03c0ee7cb9af71a5e0292569b626ba3dabd885.tar.bz2 gnuradio-fd03c0ee7cb9af71a5e0292569b626ba3dabd885.zip |
Moved the fn indices gen from volk.c to volk_registry.h so the qa code has access to the static stuff
Diffstat (limited to 'volk/include')
-rw-r--r-- | volk/include/volk/make_c.py | 18 | ||||
-rw-r--r-- | volk/include/volk/make_registry.py | 23 | ||||
-rwxr-xr-x | volk/include/volk/volk_register.py | 2 |
3 files changed, 23 insertions, 20 deletions
diff --git a/volk/include/volk/make_c.py b/volk/include/volk/make_c.py index 6e75067d0..f845ce7d4 100644 --- a/volk/include/volk/make_c.py +++ b/volk/include/volk/make_c.py @@ -43,24 +43,6 @@ def make_c(funclist, taglist, arched_arglist, retlist, my_arglist, fcountlist) : lindex = tempstring.rfind(","); tempstring = tempstring[0:lindex] + string.replace(tempstring[lindex:len(tempstring)], ",", ""); tempstring = tempstring + "};\n\n"; - - tempstring = tempstring + "static const char* " + funclist[i] + "_indices[] = {\n"; - - tags_counter = 0; - for arch_list in fcountlist[i]: - tempstring = tempstring + "#if LV_HAVE_" - for ind in range(len(arch_list)): - - tempstring = tempstring + arch_list[ind]; - if ind < len(arch_list) - 1: - tempstring = tempstring + " && LV_HAVE_"; - - tempstring = tempstring + "\n \"" + str(taglist[i][tags_counter]) + "\",\n#endif\n"; - tags_counter = tags_counter + 1; - - lindex = tempstring.rfind(","); - tempstring = tempstring[0:lindex] + string.replace(tempstring[lindex:len(tempstring)], ",", ""); - tempstring = tempstring + "};\n\n"; tempstring = tempstring + retlist[i] + "inline " + funclist[i] + "_manual" + arched_arglist[i] + '\n'; tempstring = tempstring + "return " + funclist[i] + "_archs[volk_get_index(" + funclist[i] + "_indices, arch, " + funclist[i] + "_arch_defs)](" + my_arglist[i] + ");" + "\n}\n"; diff --git a/volk/include/volk/make_registry.py b/volk/include/volk/make_registry.py index 8457d61f3..2bc8bda28 100644 --- a/volk/include/volk/make_registry.py +++ b/volk/include/volk/make_registry.py @@ -2,7 +2,7 @@ from xml.dom import minidom from emit_omnilog import * import string -def make_registry(dom, funclist, fcountlist) : +def make_registry(dom, funclist, fcountlist, taglist) : tempstring = ""; tempstring = tempstring + "/*this file is auto_generated by volk_register.py*/\n\n"; tempstring = tempstring +'\n#ifndef INCLUDED_VOLK_REGISTRY_H'; @@ -24,6 +24,27 @@ def make_registry(dom, funclist, fcountlist) : tempstring = tempstring +"#endif /*LV_HAVE_" + arch.swapcase() + "*/\n\n"; counter = 0; + + for i in range(len(funclist)): + tempstring = tempstring + "static const char* " + funclist[i] + "_indices[] = {\n"; + + tags_counter = 0; + for arch_list in fcountlist[i]: + tempstring = tempstring + "#if LV_HAVE_" + for ind in range(len(arch_list)): + + tempstring = tempstring + arch_list[ind]; + if ind < len(arch_list) - 1: + tempstring = tempstring + " && LV_HAVE_"; + + tempstring = tempstring + "\n \"" + str(taglist[i][tags_counter]) + "\",\n#endif\n"; + tags_counter = tags_counter + 1; + + lindex = tempstring.rfind(","); + tempstring = tempstring[0:lindex] + string.replace(tempstring[lindex:len(tempstring)], ",", ""); + tempstring = tempstring + "};\n\n"; + + for fcount in fcountlist: tempstring = tempstring + "static const int " + funclist[counter] + "_arch_defs[] = {\n"; counter = counter + 1; diff --git a/volk/include/volk/volk_register.py b/volk/include/volk/volk_register.py index 242a8dee7..77290f12a 100755 --- a/volk/include/volk/volk_register.py +++ b/volk/include/volk/volk_register.py @@ -229,7 +229,7 @@ outfile_set_simd.close(); outfile_config_in.write(make_config_in(filearchs)); outfile_config_in.close(); -outfile_reg.write(make_registry(filearchs, functions, fcountlist)); +outfile_reg.write(make_registry(filearchs, functions, fcountlist, taglist)); outfile_reg.close(); outfile_h.write(make_h(functions, arched_arglist, retlist)); |