summaryrefslogtreecommitdiff
path: root/volk/gen
diff options
context:
space:
mode:
authorNick Foster2011-05-11 21:45:03 -0700
committerNick Foster2011-05-11 21:45:03 -0700
commitb50dbc4498842fecd7f0c6adc22f25726f8d27d3 (patch)
treef47590beea8d78ba9b9c16baa5fcff8ab5fc1eae /volk/gen
parente3997ada93a25569a05bbfd615d73d00cee6eca5 (diff)
downloadgnuradio-b50dbc4498842fecd7f0c6adc22f25726f8d27d3.tar.gz
gnuradio-b50dbc4498842fecd7f0c6adc22f25726f8d27d3.tar.bz2
gnuradio-b50dbc4498842fecd7f0c6adc22f25726f8d27d3.zip
Volk: Profiler is in apps/ now. Added name to function info. Going to C++-ify the whole thing.
Diffstat (limited to 'volk/gen')
-rw-r--r--volk/gen/make_c.py2
-rw-r--r--volk/gen/make_each_machine_c.py1
-rw-r--r--volk/gen/make_machines_h.py1
3 files changed, 3 insertions, 1 deletions
diff --git a/volk/gen/make_c.py b/volk/gen/make_c.py
index 4e67f31ff..11b614644 100644
--- a/volk/gen/make_c.py
+++ b/volk/gen/make_c.py
@@ -82,7 +82,7 @@ static unsigned int get_index(const char *indices[], unsigned int n_archs, const
for i in range(len(functions)):
tempstring += "void get_" + functions[i] + replace_arch.sub("", arched_arglist[i]) + "\n"
- tempstring += " %s = get_machine()->%s_archs[volk_rank_archs(get_machine()->%s_arch_defs, get_machine()->%s_n_archs, volk_get_lvarch())];\n" % (functions[i], functions[i], functions[i], functions[i])
+ tempstring += " %s = get_machine()->%s_archs[volk_rank_archs(get_machine()->%s_arch_defs, get_machine()->%s_n_archs, get_machine()->%s_name, volk_get_lvarch())];\n" % (functions[i], functions[i], functions[i], functions[i], functions[i])
tempstring += " %s(%s);\n}\n\n" % (functions[i], my_arglist[i])
tempstring += replace_volk.sub("p", functions[i]) + " " + functions[i] + " = &get_" + functions[i] + ";\n\n"
tempstring += "void %s_manual%s\n" % (functions[i], arched_arglist[i])
diff --git a/volk/gen/make_each_machine_c.py b/volk/gen/make_each_machine_c.py
index a7d3bb752..dfb7011b4 100644
--- a/volk/gen/make_each_machine_c.py
+++ b/volk/gen/make_each_machine_c.py
@@ -41,6 +41,7 @@ def _make_each_machine_struct(machine_name, archs, functions, fcountlist, taglis
#fill in the description for each function
for i in range(len(functions)):
+ tempstring += " \"%s\",\n"%functions[i]
tempstring += " {%s},\n"%(', '.join(['"%s"'%tag for tag in machine_taglists[i]]))
tempstring += " {%s},\n"%(', '.join([' | '.join(['(1 << LV_%s)'%fc for fc in fcount]) for fcount in machine_fcountlists[i]]))
tempstring += " {%s},\n"%(', '.join(['%s_%s'%(functions[i], tag) for tag in machine_taglists[i]]))
diff --git a/volk/gen/make_machines_h.py b/volk/gen/make_machines_h.py
index 09ada3e0d..563de18a6 100644
--- a/volk/gen/make_machines_h.py
+++ b/volk/gen/make_machines_h.py
@@ -35,6 +35,7 @@ struct volk_machine {
const char *name;
"""
for function in functions:
+ tempstring += " const char *%s_name;\n"%function
tempstring += " const char *%s_indices[%d];\n"%(function, len(archs))
tempstring += " const int %s_arch_defs[%d];\n"%(function, len(archs))
tempstring += " const %s %s_archs[%d];\n"%(replace_volk.sub("p", function), function, len(archs))