diff options
author | Josh Blum <josh@joshknows.com> | 2011-11-15 06:12:28 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-11-15 06:12:28 +0000 |
commit | aed619727e47bf2353164ac1788a6e3479b2fe16 (patch) | |
tree | 3822cdf56344d8af2974ae4379d5bed0d36cefca /host/lib/convert | |
parent | 986f6f8d0b14c4e56468c1c8887fadb2dc4e1463 (diff) | |
download | uhd-aed619727e47bf2353164ac1788a6e3479b2fe16.tar.gz uhd-aed619727e47bf2353164ac1788a6e3479b2fe16.tar.bz2 uhd-aed619727e47bf2353164ac1788a6e3479b2fe16.zip |
convert: move priorities to implementation, different for arm
Diffstat (limited to 'host/lib/convert')
-rw-r--r-- | host/lib/convert/CMakeLists.txt | 6 | ||||
-rw-r--r-- | host/lib/convert/convert_common.hpp | 16 |
2 files changed, 17 insertions, 5 deletions
diff --git a/host/lib/convert/CMakeLists.txt b/host/lib/convert/CMakeLists.txt index 1fe92d93a..98907dc29 100644 --- a/host/lib/convert/CMakeLists.txt +++ b/host/lib/convert/CMakeLists.txt @@ -91,11 +91,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX) UNSET(CMAKE_REQUIRED_FLAGS) ENDIF(CMAKE_COMPILER_IS_GNUCXX) -IF(HAVE_ARM_NEON_H AND ENABLE_ORC) - #prefer orc support, its faster than the current intrinsic implementations - MESSAGE(STATUS "Enabled conversion support with ORC.") -ELSEIF(HAVE_ARM_NEON_H) - MESSAGE(STATUS "Enabled conversion support with NEON intrinsics.") +IF(HAVE_ARM_NEON_H) SET_SOURCE_FILES_PROPERTIES( ${CMAKE_CURRENT_SOURCE_DIR}/convert_with_neon.cpp PROPERTIES COMPILE_FLAGS "${NEON_FLAGS}" diff --git a/host/lib/convert/convert_common.hpp b/host/lib/convert/convert_common.hpp index f963e29ee..cc287114a 100644 --- a/host/lib/convert/convert_common.hpp +++ b/host/lib/convert/convert_common.hpp @@ -46,6 +46,22 @@ _DECLARE_CONVERTER(__convert_##in_form##_##num_in##_##out_form##_##num_out##_##prio, in_form, num_in, out_form, num_out, prio) /*********************************************************************** + * Setup priorities + **********************************************************************/ +static const int PRIORITY_GENERAL = 0; +static const int PRIORITY_EMPTY = -1; + +#ifdef __ARM_NEON__ +static const int PRIORITY_LIBORC = 3; +static const int PRIORITY_SIMD = 1; //neon conversions could be implemented better, orc wins +static const int PRIORITY_TABLE = 2; //tables require large cache, so they are slower on arm +#else +static const int PRIORITY_LIBORC = 1; +static const int PRIORITY_SIMD = 2; +static const int PRIORITY_TABLE = 3; +#endif + +/*********************************************************************** * Typedefs **********************************************************************/ typedef std::complex<double> fc64_t; |