commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 01/02: volk: force use of generic kernel wh


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/02: volk: force use of generic kernel when VOLK_GENERIC env variable is defined.
Date: Fri, 4 Jul 2014 00:03:41 +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 4ca2456b0120a6d1468665a6afd2094ad2da8998
Author: Tom Rondeau <address@hidden>
Date:   Wed Jul 2 22:58:41 2014 -0400

    volk: force use of generic kernel when VOLK_GENERIC env variable is defined.
    
    cmake: insert VOLK_GENERIC into QA codes to only test generic versions of 
kernels. Helps control precision issues.
---
 cmake/Modules/GrTest.cmake | 2 +-
 volk/lib/volk_rank_archs.c | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake
index 7b64204..62caab4 100644
--- a/cmake/Modules/GrTest.cmake
+++ b/cmake/Modules/GrTest.cmake
@@ -66,7 +66,7 @@ function(GR_ADD_TEST test_name)
     file(TO_NATIVE_PATH "${GR_TEST_LIBRARY_DIRS}" libpath) #ok to use on dir 
list?
     file(TO_NATIVE_PATH "${GR_TEST_PYTHON_DIRS}" pypath) #ok to use on dir 
list?
 
-    set(environs "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}")
+    set(environs "VOLK_GENERIC=1" "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}")
     list(APPEND environs ${GR_TEST_ENVIRONS})
 
     #http://www.cmake.org/pipermail/cmake/2009-May/029464.html
diff --git a/volk/lib/volk_rank_archs.c b/volk/lib/volk_rank_archs.c
index 6ab013f..0e98ac0 100644
--- a/volk/lib/volk_rank_archs.c
+++ b/volk/lib/volk_rank_archs.c
@@ -74,6 +74,13 @@ int volk_rank_archs(
       prefs_loaded = 1;
   }
 
+  // If we've defined VOLK_GENERIC to be anything, always return the
+  // 'generic' kernel. Used in GR's QA code.
+  char *gen_env = getenv("VOLK_GENERIC");
+  if(gen_env) {
+    return volk_get_index(impl_names, n_impls, "generic");
+  }
+
     //now look for the function name in the prefs list
     for(i = 0; i < n_arch_prefs; i++)
     {



reply via email to

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