mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 20:20:35 +00:00
Merge branch 'michaelld-fix_volk_max_API_index_uint16_t' into next
Fix issue related to the change in the VOLK API
This commit is contained in:
commit
0aa980a9a1
@ -9,22 +9,22 @@ FIND_PATH(
|
||||
VOLK_INCLUDE_DIRS
|
||||
NAMES volk/volk.h
|
||||
HINTS $ENV{VOLK_DIR}/include
|
||||
${PC_VOLK_INCLUDEDIR}
|
||||
${PC_VOLK_INCLUDEDIR}
|
||||
PATHS /usr/local/include
|
||||
/usr/include
|
||||
${GNURADIO_INSTALL_PREFIX}/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
VOLK_LIBRARIES
|
||||
NAMES volk
|
||||
HINTS $ENV{VOLK_DIR}/lib
|
||||
${PC_VOLK_LIBDIR}
|
||||
${PC_VOLK_LIBDIR}
|
||||
PATHS /usr/local/lib
|
||||
/usr/local/lib64
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
${GNURADIO_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
)
|
||||
|
||||
set(VOLK_VERSION ${PC_VOLK_VERSION})
|
||||
|
@ -47,6 +47,32 @@ include_directories(
|
||||
)
|
||||
|
||||
|
||||
## Workaround for issues with the change of VOLK API
|
||||
## See https://github.com/gnuradio/volk/issues/84
|
||||
## and https://github.com/gnss-sdr/gnss-sdr/issues/31
|
||||
|
||||
if(NOT VOLK_VERSION)
|
||||
set(VOLK_VERSION "1.2.2")
|
||||
endif(NOT VOLK_VERSION)
|
||||
|
||||
if(VOLK_VERSION VERSION_EQUAL 1.2.2)
|
||||
find_file(VOLK_GREATER_THAN_122
|
||||
NAMES volk/volk_32f_index_max_32u.h
|
||||
HINTS ${CMAKE_INSTALL_PREFIX}/include
|
||||
PATHS /usr/local/include
|
||||
/usr/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
)
|
||||
if(VOLK_GREATER_THAN_122)
|
||||
set(VOLK_VERSION "1.2.3+")
|
||||
endif(VOLK_GREATER_THAN_122)
|
||||
endif(VOLK_VERSION VERSION_EQUAL 1.2.2)
|
||||
|
||||
if(VOLK_VERSION VERSION_GREATER 1.2.2)
|
||||
add_definitions(-DVOLK_GT_122=1)
|
||||
endif(VOLK_VERSION VERSION_GREATER 1.2.2)
|
||||
|
||||
|
||||
if(OPENCL_FOUND)
|
||||
include_directories( ${OPENCL_INCLUDE_DIRS} )
|
||||
if(OS_IS_MACOSX)
|
||||
|
@ -424,11 +424,19 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
|
||||
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
#if VOLK_GT_122
|
||||
uint16_t indext = 0;
|
||||
uint16_t indext_IA = 0;
|
||||
uint16_t indext_IB = 0;
|
||||
uint16_t indext_QA = 0;
|
||||
uint16_t indext_QB = 0;
|
||||
#else
|
||||
unsigned int indext = 0;
|
||||
unsigned int indext_IA = 0;
|
||||
unsigned int indext_IB = 0;
|
||||
unsigned int indext_QA = 0;
|
||||
unsigned int indext_QB = 0;
|
||||
#endif
|
||||
float magt = 0.0;
|
||||
float magt_IA = 0.0;
|
||||
float magt_IB = 0.0;
|
||||
|
@ -242,9 +242,15 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
#if VOLK_GT_122
|
||||
uint16_t indext = 0;
|
||||
uint16_t indext_A = 0;
|
||||
uint16_t indext_B = 0;
|
||||
#else
|
||||
unsigned int indext = 0;
|
||||
unsigned int indext_A = 0;
|
||||
unsigned int indext_B = 0;
|
||||
#endif
|
||||
float magt = 0.0;
|
||||
float magt_A = 0.0;
|
||||
float magt_B = 0.0;
|
||||
|
@ -284,7 +284,11 @@ int pcps_acquisition_cc::general_work(int noutput_items,
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
#if VOLK_GT_122
|
||||
uint16_t indext = 0;
|
||||
#else
|
||||
unsigned int indext = 0;
|
||||
#endif
|
||||
float magt = 0.0;
|
||||
const gr_complex *in = (const gr_complex *)input_items[0]; //Get the input samples pointer
|
||||
|
||||
|
@ -222,8 +222,13 @@ double pcps_acquisition_fine_doppler_cc::search_maximum()
|
||||
float magt = 0.0;
|
||||
float fft_normalization_factor;
|
||||
int index_doppler = 0;
|
||||
unsigned int tmp_intex_t;
|
||||
#if VOLK_GT_122
|
||||
uint16_t tmp_intex_t;
|
||||
uint16_t index_time = 0;
|
||||
#else
|
||||
unsigned int tmp_intex_t = 0;
|
||||
unsigned int index_time = 0;
|
||||
#endif
|
||||
|
||||
for (int i=0;i<d_num_doppler_points;i++)
|
||||
{
|
||||
@ -359,7 +364,11 @@ int pcps_acquisition_fine_doppler_cc::estimate_Doppler(gr_vector_const_void_star
|
||||
|
||||
volk_32fc_magnitude_squared_32f(p_tmp_vector, fft_operator->get_outbuf(), fft_size_extended);
|
||||
|
||||
#if VOLK_GT_122
|
||||
uint16_t tmp_index_freq = 0;
|
||||
#else
|
||||
unsigned int tmp_index_freq = 0;
|
||||
#endif
|
||||
volk_32f_index_max_16u(&tmp_index_freq, p_tmp_vector, fft_size_extended);
|
||||
|
||||
//case even
|
||||
|
@ -281,7 +281,11 @@ int pcps_acquisition_sc::general_work(int noutput_items,
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
#if VOLK_GT_122
|
||||
uint16_t indext = 0;
|
||||
#else
|
||||
unsigned int indext = 0;
|
||||
#endif
|
||||
float magt = 0.0;
|
||||
const lv_16sc_t *in = (const lv_16sc_t *)input_items[0]; //Get the input samples pointer
|
||||
int effective_fft_size = ( d_bit_transition_flag ? d_fft_size/2 : d_fft_size );
|
||||
|
@ -268,8 +268,13 @@ double pcps_assisted_acquisition_cc::search_maximum()
|
||||
float magt = 0.0;
|
||||
float fft_normalization_factor;
|
||||
int index_doppler = 0;
|
||||
unsigned int tmp_intex_t;
|
||||
#if VOLK_GT_122
|
||||
uint16_t tmp_intex_t;
|
||||
uint16_t index_time = 0;
|
||||
#else
|
||||
unsigned int tmp_intex_t = 0;
|
||||
unsigned int index_time = 0;
|
||||
#endif
|
||||
|
||||
for (int i=0;i<d_num_doppler_points;i++)
|
||||
{
|
||||
|
@ -254,9 +254,16 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
#if VOLK_GT_122
|
||||
uint16_t indext = 0;
|
||||
uint16_t indext_plus = 0;
|
||||
uint16_t indext_minus = 0;
|
||||
#else
|
||||
|
||||
unsigned int indext = 0;
|
||||
unsigned int indext_plus = 0;
|
||||
unsigned int indext_minus = 0;
|
||||
#endif
|
||||
float magt = 0.0;
|
||||
float magt_plus = 0.0;
|
||||
float magt_minus = 0.0;
|
||||
|
@ -200,7 +200,11 @@ void pcps_multithread_acquisition_cc::acquisition_core()
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
#if VOLK_GT_122
|
||||
uint16_t indext = 0;
|
||||
#else
|
||||
unsigned int indext = 0;
|
||||
#endif
|
||||
float magt = 0.0;
|
||||
float fft_normalization_factor = (float)d_fft_size * (float)d_fft_size;
|
||||
gr_complex* in = d_in_buffer[d_well_count];
|
||||
|
@ -386,7 +386,11 @@ void pcps_opencl_acquisition_cc::acquisition_core_volk()
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
#if VOLK_GT_122
|
||||
uint16_t indext = 0;
|
||||
#else
|
||||
unsigned int indext = 0;
|
||||
#endif
|
||||
float magt = 0.0;
|
||||
float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size);
|
||||
gr_complex* in = d_in_buffer[d_well_count];
|
||||
@ -508,7 +512,11 @@ void pcps_opencl_acquisition_cc::acquisition_core_opencl()
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
#if VOLK_GT_122
|
||||
uint16_t indext = 0;
|
||||
#else
|
||||
unsigned int indext = 0;
|
||||
#endif
|
||||
float magt = 0.0;
|
||||
float fft_normalization_factor = (static_cast<float>(d_fft_size_pow2) * static_cast<float>(d_fft_size)); //This works, but I am not sure why.
|
||||
gr_complex* in = d_in_buffer[d_well_count];
|
||||
|
@ -301,7 +301,11 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
||||
/* initialize acquisition implementing the QuickSync algorithm*/
|
||||
//DLOG(INFO) << "START CASE 1";
|
||||
int doppler;
|
||||
#if VOLK_GT_122
|
||||
uint16_t indext = 0;
|
||||
#else
|
||||
unsigned int indext = 0;
|
||||
#endif
|
||||
float magt = 0.0;
|
||||
const gr_complex *in = (const gr_complex *)input_items[0]; //Get the input samples pointer
|
||||
|
||||
|
@ -279,7 +279,11 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
||||
{
|
||||
// initialize acquisition algorithm
|
||||
int doppler;
|
||||
#if VOLK_GT_122
|
||||
uint16_t indext = 0;
|
||||
#else
|
||||
unsigned int indext = 0;
|
||||
#endif
|
||||
float magt = 0.0;
|
||||
const gr_complex *in = (const gr_complex *)input_items[0]; //Get the input samples pointer
|
||||
float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size);
|
||||
|
Loading…
Reference in New Issue
Block a user