summaryrefslogtreecommitdiff
path: root/volk/tmpl
diff options
context:
space:
mode:
authorJosh Blum2012-04-15 19:11:52 -0700
committerJosh Blum2012-04-19 18:12:55 -0700
commit37f9a62fd45ece1e6a92769fbb1798403c86ba9b (patch)
tree5593d79e550e30ff8fce9a5c39d49238bd196979 /volk/tmpl
parent95e91b44d2ef3535129c0a402c51bc56cfd74d06 (diff)
downloadgnuradio-37f9a62fd45ece1e6a92769fbb1798403c86ba9b.tar.gz
gnuradio-37f9a62fd45ece1e6a92769fbb1798403c86ba9b.tar.bz2
gnuradio-37f9a62fd45ece1e6a92769fbb1798403c86ba9b.zip
volk: working build w/ cmakelists
Diffstat (limited to 'volk/tmpl')
-rw-r--r--volk/tmpl/volk.tmpl.c6
-rw-r--r--volk/tmpl/volk_cpu.tmpl.c3
-rw-r--r--volk/tmpl/volk_machine_xxx.tmpl.c23
-rw-r--r--volk/tmpl/volk_typedefs.tmpl.h2
4 files changed, 19 insertions, 15 deletions
diff --git a/volk/tmpl/volk.tmpl.c b/volk/tmpl/volk.tmpl.c
index 161f49a43..c3a1544ff 100644
--- a/volk/tmpl/volk.tmpl.c
+++ b/volk/tmpl/volk.tmpl.c
@@ -56,7 +56,7 @@ unsigned int volk_get_alignment(void) {
#for $kern in $kernels
-void get_$(kern.name)($kern.arglist_defs) {
+void get_$(kern.name)($kern.arglist_namedefs) {
$kern.name = get_machine()->$(kern.name)_archs[volk_rank_archs(
get_machine()->$(kern.name)_indices,
get_machine()->$(kern.name)_arch_defs,
@@ -69,7 +69,7 @@ void get_$(kern.name)($kern.arglist_defs) {
$kern.pname $kern.name = &get_$(kern.name);
-void $(kern.name)_manual($kern.arglist_defs, const char* arch) {
+void $(kern.name)_manual($kern.arglist_namedefs, const char* arch) {
const size_t index = get_index(
get_machine()->$(kern.name)_indices,
get_machine()->$(kern.name)_n_archs,
@@ -80,7 +80,7 @@ void $(kern.name)_manual($kern.arglist_defs, const char* arch) {
);
}
-struct volk_func_desc volk_32f_x2_add_32f_a_get_func_desc(void) {
+struct volk_func_desc $(kern.name)_get_func_desc(void) {
struct volk_func_desc desc = {
get_machine()->$(kern.name)_indices,
get_machine()->$(kern.name)_arch_defs,
diff --git a/volk/tmpl/volk_cpu.tmpl.c b/volk/tmpl/volk_cpu.tmpl.c
index dc24309f7..c278afc2e 100644
--- a/volk/tmpl/volk_cpu.tmpl.c
+++ b/volk/tmpl/volk_cpu.tmpl.c
@@ -77,7 +77,7 @@ static inline unsigned int cpuid_edx(unsigned int op) {
#endif
static int has_neon(void){
-#ifdef LOOK_FOR_NEON
+#if defined(LOOK_FOR_NEON)
FILE *auxvec_f;
unsigned long auxvec[2];
unsigned int found_neon = 0;
@@ -97,6 +97,7 @@ static int has_neon(void){
#else
return 0;
+#endif
}
static int has_ppc(void){
diff --git a/volk/tmpl/volk_machine_xxx.tmpl.c b/volk/tmpl/volk_machine_xxx.tmpl.c
index 57e652e4c..87204ee99 100644
--- a/volk/tmpl/volk_machine_xxx.tmpl.c
+++ b/volk/tmpl/volk_machine_xxx.tmpl.c
@@ -20,6 +20,7 @@
*/
#set $this_machine = $machine_dict[$which]
+#set $arch_names = map(lambda a: a.name, $this_machine.archs)
#for $arch in $this_machine.archs
#define LV_HAVE_$(arch.name.upper()) 1
@@ -58,30 +59,32 @@ $(' | '.join(['(1 << LV_%s)'%a.name.upper() for a in $archs]))#slurp
#end def
#ifdef LV_HAVE_ORC
-struct volk_machine volk_machine_generic = {
+struct volk_machine volk_machine_$(this_machine.name) = {
$make_arch_have_list($this_machine.archs) | (1 << LV_ORC),
"$this_machine.name",
$this_machine.alignment,
#for $kern in $kernels
+ #set $taglist, $tagdeps = $kern.get_tags($arch_names + ["orc"])
"$kern.name",
- $make_tag_str_list($kern.taglist),
- $make_tag_have_list($kern.tagdeps),
- $make_tag_kern_list($kern.name, $kern.taglist),
- $(len($kern.taglist)),
+ $make_tag_str_list($taglist),
+ $make_tag_have_list($tagdeps),
+ $make_tag_kern_list($kern.name, $taglist),
+ $(len($taglist)),
#end for
};
#else
-struct volk_machine volk_machine_generic = {
+struct volk_machine volk_machine_$(this_machine.name) = {
$make_arch_have_list($this_machine.archs),
"$this_machine.name",
$this_machine.alignment,
#for $kern in $kernels
+ #set $taglist, $tagdeps = $kern.get_tags($arch_names)
"$kern.name",
- $make_tag_str_list($kern.taglist),
- $make_tag_have_list($kern.tagdeps),
- $make_tag_kern_list($kern.name, $kern.taglist),
- $(len($kern.taglist)),
+ $make_tag_str_list($taglist),
+ $make_tag_have_list($tagdeps),
+ $make_tag_kern_list($kern.name, $taglist),
+ $(len($taglist)),
#end for
};
diff --git a/volk/tmpl/volk_typedefs.tmpl.h b/volk/tmpl/volk_typedefs.tmpl.h
index 2577df14e..52a87242f 100644
--- a/volk/tmpl/volk_typedefs.tmpl.h
+++ b/volk/tmpl/volk_typedefs.tmpl.h
@@ -26,7 +26,7 @@
#include <volk/volk_complex.h>
#for $kern in $kernels
-typedef $kern.rettype (*$(kern.pname))($kern.arglist);
+typedef $kern.rettype (*$(kern.pname))($kern.arglist_defs);
#end for
#endif /*INCLUDED_VOLK_TYPEDEFS*/