diff options
-rw-r--r-- | cmake/Modules/GrTest.cmake | 2 | ||||
-rw-r--r-- | volk/lib/volk_rank_archs.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake index 7b642046e6..62caab4b51 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 6ab013f269..0e98ac0709 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++) { |