summaryrefslogtreecommitdiff
path: root/volk/gen
diff options
context:
space:
mode:
authorNick Foster2011-05-12 14:21:17 -0700
committerNick Foster2011-05-12 14:21:17 -0700
commit30fdc38d20d4e38908059b6e351c550de5741621 (patch)
tree2f74d3bd790bfbae2ca7e4ccac963446e8cb86be /volk/gen
parentb50dbc4498842fecd7f0c6adc22f25726f8d27d3 (diff)
downloadgnuradio-30fdc38d20d4e38908059b6e351c550de5741621.tar.gz
gnuradio-30fdc38d20d4e38908059b6e351c550de5741621.tar.bz2
gnuradio-30fdc38d20d4e38908059b6e351c550de5741621.zip
Volk: profiling works. loads prefs on init. volk_rank_archs looks in prefs first.
Diffstat (limited to 'volk/gen')
-rw-r--r--volk/gen/make_c.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/volk/gen/make_c.py b/volk/gen/make_c.py
index 11b614644..fa08bbb0e 100644
--- a/volk/gen/make_c.py
+++ b/volk/gen/make_c.py
@@ -66,23 +66,11 @@ struct volk_machine *get_machine(void) {
}
}
-static unsigned int get_index(const char *indices[], unsigned int n_archs, const char *arch_name) {
- int i;
- for(i=0; i<n_archs; i++) {
- if(!strncmp(indices[i], arch_name, 20)) {
- return i;
- }
- }
- //something terrible should happen here
- printf("Volk warning: no arch found, returning generic impl\n");
- return get_index(indices, n_archs, "generic"); //but we'll fake it for now
-}
-
"""
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, get_machine()->%s_name, volk_get_lvarch())];\n" % (functions[i], functions[i], functions[i], functions[i], functions[i])
+ tempstring += " %s = get_machine()->%s_archs[volk_rank_archs(get_machine()->%s_indices, 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], 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])