commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 02/06: Merge branch 'maint'


From: git
Subject: [Commit-gnuradio] [gnuradio] 02/06: Merge branch 'maint'
Date: Wed, 29 Jan 2014 00:04:25 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch master
in repository gnuradio.

commit b2e85d34c52d5e8faca2514aa2eefddbe3763112
Merge: 300f5fb e2acdc5
Author: Tom Rondeau <address@hidden>
Date:   Tue Jan 28 17:56:40 2014 -0500

    Merge branch 'maint'

 volk/tmpl/volk.tmpl.c | 44 ++++++++++++++++++++++++--------------------
 1 file changed, 24 insertions(+), 20 deletions(-)

diff --cc volk/tmpl/volk.tmpl.c
index 431b154,eb22435..df37247
--- a/volk/tmpl/volk.tmpl.c
+++ b/volk/tmpl/volk.tmpl.c
@@@ -32,67 -32,34 +32,71 @@@
  static size_t __alignment = 0;
  static intptr_t __alignment_mask = 0;
  
- struct volk_machine *get_machine(void) {
-     extern struct volk_machine *volk_machines[];
-     extern unsigned int n_volk_machines;
-     static struct volk_machine *machine = NULL;
-     
-     if(machine != NULL) return machine;
-     else {
-         unsigned int max_score = 0;
-         unsigned int i;
-         for(i=0; i<n_volk_machines; i++) {
-             if(!(volk_machines[i]->caps & (~volk_get_lvarch()))) {
-                 if(volk_machines[i]->caps > max_score) {
-                     max_score = volk_machines[i]->caps;
-                     machine = volk_machines[i];
-                 }
-             }
+ struct volk_machine *get_machine(void)
+ {
+   extern struct volk_machine *volk_machines[];
+   extern unsigned int n_volk_machines;
+   static struct volk_machine *machine = NULL;
+ 
+   if(machine != NULL)
+     return machine;
+   else {
+     unsigned int max_score = 0;
+     unsigned int i;
+     struct volk_machine *max_machine = NULL;
+     for(i=0; i<n_volk_machines; i++) {
+       if(!(volk_machines[i]->caps & (~volk_get_lvarch()))) {
+         if(volk_machines[i]->caps > max_score) {
+           max_score = volk_machines[i]->caps;
+           max_machine = volk_machines[i];
          }
-         printf("Using Volk machine: %s\n", machine->name);
-         __alignment = machine->alignment;
-         __alignment_mask = (intptr_t)(__alignment-1);
-         return machine;
+       }
      }
+     machine = max_machine;
+     printf("Using Volk machine: %s\n", machine->name);
+     __alignment = machine->alignment;
+     __alignment_mask = (intptr_t)(__alignment-1);
+     return machine;
+   }
  }
  
 +void volk_list_machines(void)
 +{
 +  extern struct volk_machine *volk_machines[];
 +  extern unsigned int n_volk_machines;
 +
 +  unsigned int i;
 +  for(i=0; i<n_volk_machines; i++) {
 +    if(!(volk_machines[i]->caps & (~volk_get_lvarch()))) {
 +        printf("%s;", volk_machines[i]->name);
 +    }
 +  }
 +  printf("\n");
 +}
 +
 +const char* volk_get_machine(void)
 +{
 +  extern struct volk_machine *volk_machines[];
 +  extern unsigned int n_volk_machines;
 +  static struct volk_machine *machine = NULL;
 +
 +  if(machine != NULL)
 +    return machine->name;
 +  else {
 +    unsigned int max_score = 0;
 +    unsigned int i;
 +    for(i=0; i<n_volk_machines; i++) {
 +      if(!(volk_machines[i]->caps & (~volk_get_lvarch()))) {
 +        if(volk_machines[i]->caps > max_score) {
 +          max_score = volk_machines[i]->caps;
 +          machine = volk_machines[i];
 +        }
 +      }
 +    }
 +    return machine->name;
 +  }
 +}
 +
  size_t volk_get_alignment(void)
  {
      get_machine(); //ensures alignment is set



reply via email to

[Prev in Thread] Current Thread [Next in Thread]