diff options
author | Tom Rondeau | 2011-08-27 16:44:32 -0400 |
---|---|---|
committer | Tom Rondeau | 2011-08-27 16:44:32 -0400 |
commit | 54881f8803d4f796dde2af031e6f1a37df9445f1 (patch) | |
tree | b1e4e6c34004f22a29c03815ed3ae49065693dce /volk/gen/make_h.py | |
parent | 50cde24aea52d66d69313a490f7eab78a5085849 (diff) | |
parent | f4cc7884c608a7ec1969e68b73e12cdbcc26145c (diff) | |
download | gnuradio-54881f8803d4f796dde2af031e6f1a37df9445f1.tar.gz gnuradio-54881f8803d4f796dde2af031e6f1a37df9445f1.tar.bz2 gnuradio-54881f8803d4f796dde2af031e6f1a37df9445f1.zip |
Merge branch 'master' of gnuradio.org:gnuradio
Diffstat (limited to 'volk/gen/make_h.py')
-rw-r--r-- | volk/gen/make_h.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/volk/gen/make_h.py b/volk/gen/make_h.py new file mode 100644 index 000000000..354e57258 --- /dev/null +++ b/volk/gen/make_h.py @@ -0,0 +1,38 @@ +from xml.dom import minidom +from volk_regexp import * + +def make_h(funclist, arched_arglist) : + tempstring = ""; + tempstring = tempstring + '/*this file is auto generated by make_h.py*/\n'; + + tempstring = tempstring + '\n#ifndef INCLUDED_VOLK_RUNTIME'; + tempstring = tempstring + '\n#define INCLUDED_VOLK_RUNTIME'; + tempstring = tempstring + '\n\n#include<volk/volk_typedefs.h>\n'; + tempstring = tempstring + '#include<volk/volk_config_fixed.h>\n'; + tempstring = tempstring + '#include<volk/volk_common.h>\n'; + tempstring = tempstring + '#include<volk/volk_complex.h>\n'; + tempstring = tempstring + '__VOLK_DECL_BEGIN\n'; + + tempstring = tempstring + '\n'; + + tempstring += """ +struct volk_func_desc { + const char **indices; + const int *arch_defs; + const int n_archs; +}; + +VOLK_API unsigned int volk_get_alignment(void); + +""" + for i in range(len(funclist)): + tempstring += "extern VOLK_API " + replace_volk.sub("p", funclist[i]) + " " + funclist[i] + ";\n" + tempstring += "extern VOLK_API void %s_manual%s;\n" % (funclist[i], arched_arglist[i]) + tempstring = strip_trailing(tempstring, " {") + tempstring += "extern VOLK_API struct volk_func_desc %s_get_func_desc(void);\n" % (funclist[i]) + + tempstring = tempstring + '__VOLK_DECL_END\n'; + tempstring = tempstring + "#endif /*INCLUDED_VOLK_RUNTIME*/\n"; + + return tempstring; + |