summaryrefslogtreecommitdiff
path: root/volk
diff options
context:
space:
mode:
Diffstat (limited to 'volk')
-rw-r--r--volk/cmake/FindORC.cmake2
-rw-r--r--volk/config/orc.m42
-rw-r--r--volk/gen/make_each_machine_c.py4
-rw-r--r--volk/include/volk/volk_32f_s32f_convert_16i_a.h4
-rw-r--r--volk/include/volk/volk_32f_s32f_convert_32i_a.h4
-rw-r--r--volk/include/volk/volk_32f_s32f_convert_32i_u.h6
-rw-r--r--volk/include/volk/volk_32fc_x2_dot_prod_32fc_a.h12
-rw-r--r--volk/lib/CMakeLists.txt22
-rw-r--r--volk/lib/volk_prefs.c10
9 files changed, 34 insertions, 32 deletions
diff --git a/volk/cmake/FindORC.cmake b/volk/cmake/FindORC.cmake
index 8d8c2d13e..1c4c417ad 100644
--- a/volk/cmake/FindORC.cmake
+++ b/volk/cmake/FindORC.cmake
@@ -1,5 +1,5 @@
FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_ORC orc-0.4)
+PKG_CHECK_MODULES(PC_ORC "orc-0.4 > 0.4.11")
diff --git a/volk/config/orc.m4 b/volk/config/orc.m4
index d17160a9a..e332939d3 100644
--- a/volk/config/orc.m4
+++ b/volk/config/orc.m4
@@ -5,7 +5,7 @@ dnl ORC_CHECK([REQUIRED_VERSION])
AC_DEFUN([ORC_CHECK],
[
- ORC_REQ=ifelse([$1], , "0.4.10", [$1])
+ ORC_REQ=ifelse([$1], , "0.4.12", [$1])
if test "x$enable_orc" != "xno" ; then
PKG_CHECK_MODULES(ORC, orc-0.4 >= $ORC_REQ, [
diff --git a/volk/gen/make_each_machine_c.py b/volk/gen/make_each_machine_c.py
index 44e2ef3f2..a3f6203ba 100644
--- a/volk/gen/make_each_machine_c.py
+++ b/volk/gen/make_each_machine_c.py
@@ -65,6 +65,10 @@ def make_each_machine_c(machine_name, archs, functions, fcountlist, taglist, ali
#include "volk_machines.h"
#include <volk/volk_config_fixed.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
"""
for func in functions:
tempstring += "#include <volk/" + func + ".h>\n"
diff --git a/volk/include/volk/volk_32f_s32f_convert_16i_a.h b/volk/include/volk/volk_32f_s32f_convert_16i_a.h
index c2a07398f..a24959678 100644
--- a/volk/include/volk/volk_32f_s32f_convert_16i_a.h
+++ b/volk/include/volk/volk_32f_s32f_convert_16i_a.h
@@ -1,10 +1,6 @@
#ifndef INCLUDED_volk_32f_s32f_convert_16i_a_H
#define INCLUDED_volk_32f_s32f_convert_16i_a_H
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <volk/volk_common.h>
#include <inttypes.h>
#include <stdio.h>
diff --git a/volk/include/volk/volk_32f_s32f_convert_32i_a.h b/volk/include/volk/volk_32f_s32f_convert_32i_a.h
index 8f2fc791e..15fa282fb 100644
--- a/volk/include/volk/volk_32f_s32f_convert_32i_a.h
+++ b/volk/include/volk/volk_32f_s32f_convert_32i_a.h
@@ -22,7 +22,7 @@ static inline void volk_32f_s32f_convert_32i_a_avx(int32_t* outputVector, const
const float* inputVectorPtr = (const float*)inputVector;
int32_t* outputVectorPtr = outputVector;
- float min_val = -2147483648;
+ float min_val = -2147483647;
float max_val = 2147483647;
float r;
@@ -71,7 +71,7 @@ static inline void volk_32f_s32f_convert_32i_a_sse2(int32_t* outputVector, const
const float* inputVectorPtr = (const float*)inputVector;
int32_t* outputVectorPtr = outputVector;
- float min_val = -2147483648;
+ float min_val = -2147483647;
float max_val = 2147483647;
float r;
diff --git a/volk/include/volk/volk_32f_s32f_convert_32i_u.h b/volk/include/volk/volk_32f_s32f_convert_32i_u.h
index d8493454b..d203546c6 100644
--- a/volk/include/volk/volk_32f_s32f_convert_32i_u.h
+++ b/volk/include/volk/volk_32f_s32f_convert_32i_u.h
@@ -22,10 +22,8 @@ static inline void volk_32f_s32f_convert_32i_u_sse2(int32_t* outputVector, const
const float* inputVectorPtr = (const float*)inputVector;
int32_t* outputVectorPtr = outputVector;
- //float min_val = -2147483647;
- //float max_val = 2147483647;
- float min_val = -2146400000;
- float max_val = 2146400000;
+ float min_val = -2147483647;
+ float max_val = 2147483647;
float r;
__m128 vScalar = _mm_set_ps1(scalar);
diff --git a/volk/include/volk/volk_32fc_x2_dot_prod_32fc_a.h b/volk/include/volk/volk_32fc_x2_dot_prod_32fc_a.h
index a865e0737..cde9240cc 100644
--- a/volk/include/volk/volk_32fc_x2_dot_prod_32fc_a.h
+++ b/volk/include/volk/volk_32fc_x2_dot_prod_32fc_a.h
@@ -196,7 +196,10 @@ static inline void volk_32fc_x2_dot_prod_32fc_a_sse_64(lv_32fc_t* result, const
#if LV_HAVE_SSE && LV_HAVE_32
static inline void volk_32fc_x2_dot_prod_32fc_a_sse_32(lv_32fc_t* result, const lv_32fc_t* input, const lv_32fc_t* taps, unsigned int num_bytes) {
-
+
+ volk_32fc_x2_dot_prod_32fc_a_generic(result, input, taps, num_bytes);
+
+#if 0
asm volatile
(
" #pushl %%ebp\n\t"
@@ -307,12 +310,7 @@ static inline void volk_32fc_x2_dot_prod_32fc_a_sse_32(lv_32fc_t* result, const
}
return;
-
-
-
-
-
-
+#endif
}
#endif /*LV_HAVE_SSE*/
diff --git a/volk/lib/CMakeLists.txt b/volk/lib/CMakeLists.txt
index 00d8660ab..b491f94bb 100644
--- a/volk/lib/CMakeLists.txt
+++ b/volk/lib/CMakeLists.txt
@@ -254,13 +254,18 @@ add_custom_command(
)
########################################################################
-# Handle orc support
+# Set local include directories first
########################################################################
+include_directories(
+ ${CMAKE_BINARY_DIR}/include
+ ${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
-
-
-
-
+########################################################################
+# Handle orc support
+########################################################################
if(ORC_FOUND)
#setup orc library usage
include_directories(${ORC_INCLUDE_DIRS})
@@ -294,13 +299,6 @@ if(NOT WIN32)
add_definitions(-fvisibility=hidden)
endif()
-include_directories(
- ${CMAKE_SOURCE_DIR}/include
- ${CMAKE_BINARY_DIR}/include
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}
-)
-
list(APPEND volk_sources
${CMAKE_CURRENT_SOURCE_DIR}/volk_prefs.c
${CMAKE_CURRENT_SOURCE_DIR}/volk_rank_archs.c
diff --git a/volk/lib/volk_prefs.c b/volk/lib/volk_prefs.c
index b29d5fd87..7e705bed4 100644
--- a/volk/lib/volk_prefs.c
+++ b/volk/lib/volk_prefs.c
@@ -9,7 +9,14 @@
void get_config_path(char *path) {
const char *suffix = "/.volk/volk_config";
- strcpy(path, getenv("HOME"));
+ char *home = NULL;
+ if (home == NULL) home = getenv("HOME");
+ if (home == NULL) home = getenv("APPDATA");
+ if (home == NULL){
+ path = NULL;
+ return;
+ }
+ strcpy(path, home);
strcat(path, suffix);
}
@@ -22,6 +29,7 @@ int load_preferences(struct volk_arch_pref **prefs) {
//get the config path
get_config_path(path);
+ if (path == NULL) return n_arch_prefs; //no prefs found
config_file = fopen(path, "r");
if(!config_file) return n_arch_prefs; //no prefs found