mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-11-04 09:13:05 +00:00 
			
		
		
		
	Added 32fc_s32f_x4_update_local_code_32fc kernel
Added a new protokernel to substitute update_local_code function, inside tracking: volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc Volk implementation is 7x times faster than generic implementation.
This commit is contained in:
		@@ -106,10 +106,9 @@ int main(int argc, char *argv[]) {
 | 
			
		||||
    //GNSS-SDR PROTO-KERNELS
 | 
			
		||||
    //lv_32fc_t sfv = lv_cmake((float)1, (float)2);
 | 
			
		||||
    //example: VOLK_PROFILE(volk_gnsssdr_8ic_s8ic_multiply_8ic, 1e-4, sfv, 204602, 1000, &results, benchmark_mode, kernel_regex);
 | 
			
		||||
     VOLK_PROFILE(volk_gnsssdr_32fc_convert_8ic, 1e-4, 0, 16000, 250, &results, benchmark_mode, kernel_regex);
 | 
			
		||||
 | 
			
		||||
     VOLK_PROFILE(volk_gnsssdr_32fc_s32f_convert_8ic, 1e-4, 5, 16000, 250, &results, benchmark_mode, kernel_regex);
 | 
			
		||||
    
 | 
			
		||||
     VOLK_PROFILE(volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc, 1e-4, 0, 7, 1, &results, benchmark_mode, kernel_regex);
 | 
			
		||||
 | 
			
		||||
     VOLK_PROFILE(volk_gnsssdr_8ic_x7_cw_vepl_corr_safe_32fc_x5, 1e-4, 0, 16000, 250, &results, benchmark_mode, kernel_regex);
 | 
			
		||||
     VOLK_PROFILE(volk_gnsssdr_8ic_x7_cw_vepl_corr_unsafe_32fc_x5, 1e-4, 0, 16000, 250, &results, benchmark_mode, kernel_regex);
 | 
			
		||||
     VOLK_PROFILE(volk_gnsssdr_8ic_x7_cw_vepl_corr_TEST_32fc_x5, 1e-4, 0, 16000, 250, &results, benchmark_mode, kernel_regex);
 | 
			
		||||
@@ -125,6 +124,8 @@ int main(int argc, char *argv[]) {
 | 
			
		||||
     VOLK_PROFILE(volk_gnsssdr_32fc_x5_cw_epl_corr_32fc_x3, 1e-4, 0, 16000, 250, &results, benchmark_mode, kernel_regex);
 | 
			
		||||
    
 | 
			
		||||
     VOLK_PROFILE(volk_gnsssdr_32fc_convert_16ic, 1e-4, 0, 16000, 250, &results, benchmark_mode, kernel_regex);
 | 
			
		||||
     VOLK_PROFILE(volk_gnsssdr_32fc_convert_8ic, 1e-4, 0, 16000, 250, &results, benchmark_mode, kernel_regex);
 | 
			
		||||
     VOLK_PROFILE(volk_gnsssdr_32fc_s32f_convert_8ic, 1e-4, 5, 16000, 250, &results, benchmark_mode, kernel_regex);
 | 
			
		||||
    
 | 
			
		||||
     /*VOLK_PROFILE(volk_gnsssdr_32f_accumulator_s32f, 1e-4, 0, 204602, 10000, &results, benchmark_mode, kernel_regex);
 | 
			
		||||
     VOLK_PROFILE(volk_gnsssdr_8i_accumulator_s8i, 1e-4, 0, 204602, 10000, &results, benchmark_mode, kernel_regex);
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,232 @@
 | 
			
		||||
#ifndef INCLUDED_volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc_u_H
 | 
			
		||||
#define INCLUDED_volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc_u_H
 | 
			
		||||
 | 
			
		||||
#include <inttypes.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
 | 
			
		||||
#include <float.h>
 | 
			
		||||
 | 
			
		||||
#ifdef LV_HAVE_SSE4_1
 | 
			
		||||
#include <smmintrin.h>
 | 
			
		||||
  /*!
 | 
			
		||||
    \brief Takes the conjugate of a complex vector.
 | 
			
		||||
    \param cVector The vector where the results will be stored
 | 
			
		||||
    \param aVector Vector to be conjugated
 | 
			
		||||
    \param num_points The number of complex values in aVector to be conjugated and stored into cVector
 | 
			
		||||
  */
 | 
			
		||||
static inline void volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc_u_sse4_1(lv_32fc_t* d_very_early_code, const float d_very_early_late_spc_chips, const float code_length_half_chips, const float code_phase_step_half_chips, const float tcode_half_chips_input, const lv_32fc_t* d_ca_code, unsigned int num_points){
 | 
			
		||||
    
 | 
			
		||||
//    float* pointer1 = (float*)&d_very_early_late_spc_chips;
 | 
			
		||||
//    *pointer1 = 1;
 | 
			
		||||
//    float* pointer2 = (float*)&code_length_half_chips;
 | 
			
		||||
//    *pointer2 = 6;
 | 
			
		||||
//    float* pointer3 = (float*)&code_phase_step_half_chips;
 | 
			
		||||
//    *pointer3 = 7;
 | 
			
		||||
//    float* pointer4 = (float*)&tcode_half_chips_input;
 | 
			
		||||
//    *pointer4 = 8;
 | 
			
		||||
    
 | 
			
		||||
    const unsigned int sse_iters = num_points / 4;
 | 
			
		||||
    
 | 
			
		||||
    __m128 tquot, fmod_num, fmod_result, associated_chip_index_array;
 | 
			
		||||
    
 | 
			
		||||
    __m128 tcode_half_chips_array = _mm_set_ps (tcode_half_chips_input+3*code_phase_step_half_chips, tcode_half_chips_input+2*code_phase_step_half_chips, tcode_half_chips_input+code_phase_step_half_chips, tcode_half_chips_input);
 | 
			
		||||
    __m128 code_phase_step_half_chips_array = _mm_set1_ps (code_phase_step_half_chips*4);
 | 
			
		||||
    __m128 d_very_early_late_spc_chips_Multiplied_by_2 =  _mm_set1_ps (2*d_very_early_late_spc_chips);
 | 
			
		||||
    __m128 code_length_half_chips_array =  _mm_set1_ps (code_length_half_chips);
 | 
			
		||||
    __m128 twos =  _mm_set1_ps (2);
 | 
			
		||||
    __m128i associated_chip_index_array_int;
 | 
			
		||||
    
 | 
			
		||||
    __VOLK_ATTR_ALIGNED(16) int32_t output[4];
 | 
			
		||||
    
 | 
			
		||||
    for (unsigned int i = 0; i < sse_iters; i++)
 | 
			
		||||
    {
 | 
			
		||||
        //fmod = numer - tquot * denom; tquot = numer/denom truncated
 | 
			
		||||
        //associated_chip_index = 2 + round(fmod(tcode_half_chips - 2*d_very_early_late_spc_chips, code_length_half_chips));
 | 
			
		||||
        fmod_num = _mm_sub_ps (tcode_half_chips_array, d_very_early_late_spc_chips_Multiplied_by_2);
 | 
			
		||||
        tquot = _mm_div_ps (fmod_num, code_length_half_chips_array);
 | 
			
		||||
        tquot = _mm_round_ps (tquot, (_MM_FROUND_TO_ZERO |_MM_FROUND_NO_EXC) );
 | 
			
		||||
        fmod_result = _mm_sub_ps (fmod_num, _mm_mul_ps (tquot, code_length_half_chips_array));
 | 
			
		||||
        
 | 
			
		||||
        associated_chip_index_array = _mm_round_ps (fmod_result, (_MM_FROUND_TO_NEAREST_INT |_MM_FROUND_NO_EXC));
 | 
			
		||||
        associated_chip_index_array = _mm_add_ps(twos, associated_chip_index_array);
 | 
			
		||||
        associated_chip_index_array_int = _mm_cvtps_epi32 (associated_chip_index_array);
 | 
			
		||||
        _mm_storeu_si128 ((__m128i*)output, associated_chip_index_array_int);
 | 
			
		||||
        
 | 
			
		||||
        //d_very_early_code[i] = d_ca_code[associated_chip_index];
 | 
			
		||||
        *d_very_early_code++ = d_ca_code[output[0]];
 | 
			
		||||
        *d_very_early_code++ = d_ca_code[output[1]];
 | 
			
		||||
        *d_very_early_code++ = d_ca_code[output[2]];
 | 
			
		||||
        *d_very_early_code++ = d_ca_code[output[3]];
 | 
			
		||||
 | 
			
		||||
        //tcode_half_chips = tcode_half_chips + code_phase_step_half_chips;
 | 
			
		||||
        tcode_half_chips_array = _mm_add_ps (tcode_half_chips_array, code_phase_step_half_chips_array);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    if (num_points%4!=0)
 | 
			
		||||
    {
 | 
			
		||||
        __VOLK_ATTR_ALIGNED(16) float tcode_half_chips_stored[4];
 | 
			
		||||
        _mm_storeu_si128 ((__m128i*)tcode_half_chips_stored, tcode_half_chips_array);
 | 
			
		||||
        
 | 
			
		||||
        int associated_chip_index;
 | 
			
		||||
        float tcode_half_chips = tcode_half_chips_stored[0];
 | 
			
		||||
        float d_very_early_late_spc_chips_multiplied_by_2 = 2*d_very_early_late_spc_chips;
 | 
			
		||||
        
 | 
			
		||||
        for (unsigned int i = 0; i < num_points%4; i++)
 | 
			
		||||
        {
 | 
			
		||||
            associated_chip_index = 2 + round(fmod(tcode_half_chips - d_very_early_late_spc_chips_multiplied_by_2, code_length_half_chips));
 | 
			
		||||
            d_very_early_code[i] = d_ca_code[associated_chip_index];
 | 
			
		||||
            tcode_half_chips = tcode_half_chips + code_phase_step_half_chips;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
#endif /* LV_HAVE_SSE4_1 */
 | 
			
		||||
 | 
			
		||||
#ifdef LV_HAVE_GENERIC
 | 
			
		||||
  /*!
 | 
			
		||||
    \brief Takes the conjugate of a complex vector.
 | 
			
		||||
    \param cVector The vector where the results will be stored
 | 
			
		||||
    \param aVector Vector to be conjugated
 | 
			
		||||
    \param num_points The number of complex values in aVector to be conjugated and stored into cVector
 | 
			
		||||
  */
 | 
			
		||||
static inline void volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc_generic(lv_32fc_t* d_very_early_code, const float d_very_early_late_spc_chips, const float code_length_half_chips, const float code_phase_step_half_chips, const float tcode_half_chips_input, const lv_32fc_t* d_ca_code, unsigned int num_points){
 | 
			
		||||
    
 | 
			
		||||
    float* pointer1 = (float*)&d_very_early_late_spc_chips;
 | 
			
		||||
    *pointer1 = 1;
 | 
			
		||||
    float* pointer2 = (float*)&code_length_half_chips;
 | 
			
		||||
    *pointer2 = 6;
 | 
			
		||||
    float* pointer3 = (float*)&code_phase_step_half_chips;
 | 
			
		||||
    *pointer3 = 7;
 | 
			
		||||
    float* pointer4 = (float*)&tcode_half_chips_input;
 | 
			
		||||
    *pointer4 = 8;
 | 
			
		||||
    
 | 
			
		||||
    int associated_chip_index;
 | 
			
		||||
    float tcode_half_chips = tcode_half_chips_input;
 | 
			
		||||
    float d_very_early_late_spc_chips_multiplied_by_2 = 2*d_very_early_late_spc_chips;
 | 
			
		||||
    
 | 
			
		||||
    for (unsigned int i = 0; i < num_points; i++)
 | 
			
		||||
    {
 | 
			
		||||
        associated_chip_index = 2 + round(fmod(tcode_half_chips - d_very_early_late_spc_chips_multiplied_by_2, code_length_half_chips));
 | 
			
		||||
        d_very_early_code[i] = d_ca_code[associated_chip_index];
 | 
			
		||||
        tcode_half_chips = tcode_half_chips + code_phase_step_half_chips;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
#endif /* LV_HAVE_GENERIC */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif /* INCLUDED_volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc_u_H */
 | 
			
		||||
#ifndef INCLUDED_volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc_a_H
 | 
			
		||||
#define INCLUDED_volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc_a_H
 | 
			
		||||
 | 
			
		||||
#include <inttypes.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <volk_gnsssdr/volk_gnsssdr_complex.h>
 | 
			
		||||
#include <float.h>
 | 
			
		||||
 | 
			
		||||
#ifdef LV_HAVE_SSE4_1
 | 
			
		||||
#include <smmintrin.h>
 | 
			
		||||
  /*!
 | 
			
		||||
    \brief Takes the conjugate of a complex vector.
 | 
			
		||||
    \param cVector The vector where the results will be stored
 | 
			
		||||
    \param aVector Vector to be conjugated
 | 
			
		||||
    \param num_points The number of complex values in aVector to be conjugated and stored into cVector
 | 
			
		||||
  */
 | 
			
		||||
static inline void volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc_a_sse4_1(lv_32fc_t* d_very_early_code, const float d_very_early_late_spc_chips, const float code_length_half_chips, const float code_phase_step_half_chips, const float tcode_half_chips_input, const lv_32fc_t* d_ca_code, unsigned int num_points){
 | 
			
		||||
    
 | 
			
		||||
    //    float* pointer1 = (float*)&d_very_early_late_spc_chips;
 | 
			
		||||
    //    *pointer1 = 1;
 | 
			
		||||
    //    float* pointer2 = (float*)&code_length_half_chips;
 | 
			
		||||
    //    *pointer2 = 6;
 | 
			
		||||
    //    float* pointer3 = (float*)&code_phase_step_half_chips;
 | 
			
		||||
    //    *pointer3 = 7;
 | 
			
		||||
    //    float* pointer4 = (float*)&tcode_half_chips_input;
 | 
			
		||||
    //    *pointer4 = 8;
 | 
			
		||||
    
 | 
			
		||||
    const unsigned int sse_iters = num_points / 4;
 | 
			
		||||
    
 | 
			
		||||
    __m128 tquot, fmod_num, fmod_result, associated_chip_index_array;
 | 
			
		||||
    
 | 
			
		||||
    __m128 tcode_half_chips_array = _mm_set_ps (tcode_half_chips_input+3*code_phase_step_half_chips, tcode_half_chips_input+2*code_phase_step_half_chips, tcode_half_chips_input+code_phase_step_half_chips, tcode_half_chips_input);
 | 
			
		||||
    __m128 code_phase_step_half_chips_array = _mm_set1_ps (code_phase_step_half_chips*4);
 | 
			
		||||
    __m128 d_very_early_late_spc_chips_Multiplied_by_2 =  _mm_set1_ps (2*d_very_early_late_spc_chips);
 | 
			
		||||
    __m128 code_length_half_chips_array =  _mm_set1_ps (code_length_half_chips);
 | 
			
		||||
    __m128 twos =  _mm_set1_ps (2);
 | 
			
		||||
    __m128i associated_chip_index_array_int;
 | 
			
		||||
    
 | 
			
		||||
    __VOLK_ATTR_ALIGNED(16) int32_t output[4];
 | 
			
		||||
    
 | 
			
		||||
    for (unsigned int i = 0; i < sse_iters; i++)
 | 
			
		||||
    {
 | 
			
		||||
        //fmod = numer - tquot * denom; tquot = numer/denom truncated
 | 
			
		||||
        //associated_chip_index = 2 + round(fmod(tcode_half_chips - 2*d_very_early_late_spc_chips, code_length_half_chips));
 | 
			
		||||
        fmod_num = _mm_sub_ps (tcode_half_chips_array, d_very_early_late_spc_chips_Multiplied_by_2);
 | 
			
		||||
        tquot = _mm_div_ps (fmod_num, code_length_half_chips_array);
 | 
			
		||||
        tquot = _mm_round_ps (tquot, (_MM_FROUND_TO_ZERO |_MM_FROUND_NO_EXC) );
 | 
			
		||||
        fmod_result = _mm_sub_ps (fmod_num, _mm_mul_ps (tquot, code_length_half_chips_array));
 | 
			
		||||
        
 | 
			
		||||
        associated_chip_index_array = _mm_round_ps (fmod_result, (_MM_FROUND_TO_NEAREST_INT |_MM_FROUND_NO_EXC));
 | 
			
		||||
        associated_chip_index_array = _mm_add_ps(twos, associated_chip_index_array);
 | 
			
		||||
        associated_chip_index_array_int = _mm_cvtps_epi32 (associated_chip_index_array);
 | 
			
		||||
        _mm_store_si128 ((__m128i*)output, associated_chip_index_array_int);
 | 
			
		||||
        
 | 
			
		||||
        //d_very_early_code[i] = d_ca_code[associated_chip_index];
 | 
			
		||||
        *d_very_early_code++ = d_ca_code[output[0]];
 | 
			
		||||
        *d_very_early_code++ = d_ca_code[output[1]];
 | 
			
		||||
        *d_very_early_code++ = d_ca_code[output[2]];
 | 
			
		||||
        *d_very_early_code++ = d_ca_code[output[3]];
 | 
			
		||||
        
 | 
			
		||||
        //tcode_half_chips = tcode_half_chips + code_phase_step_half_chips;
 | 
			
		||||
        tcode_half_chips_array = _mm_add_ps (tcode_half_chips_array, code_phase_step_half_chips_array);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    if (num_points%4!=0)
 | 
			
		||||
    {
 | 
			
		||||
        __VOLK_ATTR_ALIGNED(16) float tcode_half_chips_stored[4];
 | 
			
		||||
        _mm_store_si128 ((__m128i*)tcode_half_chips_stored, tcode_half_chips_array);
 | 
			
		||||
        
 | 
			
		||||
        int associated_chip_index;
 | 
			
		||||
        float tcode_half_chips = tcode_half_chips_stored[0];
 | 
			
		||||
        float d_very_early_late_spc_chips_multiplied_by_2 = 2*d_very_early_late_spc_chips;
 | 
			
		||||
        
 | 
			
		||||
        for (unsigned int i = 0; i < num_points%4; i++)
 | 
			
		||||
        {
 | 
			
		||||
            associated_chip_index = 2 + round(fmod(tcode_half_chips - d_very_early_late_spc_chips_multiplied_by_2, code_length_half_chips));
 | 
			
		||||
            d_very_early_code[i] = d_ca_code[associated_chip_index];
 | 
			
		||||
            tcode_half_chips = tcode_half_chips + code_phase_step_half_chips;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
#endif /* LV_HAVE_SSE4_1 */
 | 
			
		||||
 | 
			
		||||
#ifdef LV_HAVE_GENERIC
 | 
			
		||||
  /*!
 | 
			
		||||
    \brief Takes the conjugate of a complex vector.
 | 
			
		||||
    \param cVector The vector where the results will be stored
 | 
			
		||||
    \param aVector Vector to be conjugated
 | 
			
		||||
    \param num_points The number of complex values in aVector to be conjugated and stored into cVector
 | 
			
		||||
  */
 | 
			
		||||
static inline void volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc_a_generic(lv_32fc_t* d_very_early_code, const float d_very_early_late_spc_chips, const float code_length_half_chips, const float code_phase_step_half_chips, const float tcode_half_chips_input, const lv_32fc_t* d_ca_code, unsigned int num_points){
 | 
			
		||||
    
 | 
			
		||||
    //    float* pointer1 = (float*)&d_very_early_late_spc_chips;
 | 
			
		||||
    //    *pointer1 = 1;
 | 
			
		||||
    //    float* pointer2 = (float*)&code_length_half_chips;
 | 
			
		||||
    //    *pointer2 = 6;
 | 
			
		||||
    //    float* pointer3 = (float*)&code_phase_step_half_chips;
 | 
			
		||||
    //    *pointer3 = 7;
 | 
			
		||||
    //    float* pointer4 = (float*)&tcode_half_chips_input;
 | 
			
		||||
    //    *pointer4 = 8;
 | 
			
		||||
    
 | 
			
		||||
    int associated_chip_index;
 | 
			
		||||
    float tcode_half_chips = tcode_half_chips_input;
 | 
			
		||||
    float d_very_early_late_spc_chips_multiplied_by_2 = 2*d_very_early_late_spc_chips;
 | 
			
		||||
    
 | 
			
		||||
    for (unsigned int i = 0; i < num_points; i++)
 | 
			
		||||
    {
 | 
			
		||||
        associated_chip_index = 2 + round(fmod(tcode_half_chips - d_very_early_late_spc_chips_multiplied_by_2, code_length_half_chips));
 | 
			
		||||
        d_very_early_code[i] = d_ca_code[associated_chip_index];
 | 
			
		||||
        tcode_half_chips = tcode_half_chips + code_phase_step_half_chips;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
#endif /* LV_HAVE_GENERIC */
 | 
			
		||||
 | 
			
		||||
#endif /* INCLUDED_volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc_a_H */
 | 
			
		||||
@@ -67,9 +67,7 @@ VOLK_RUN_TESTS(volk_gnsssdr_8ic_x7_cw_vepl_corr_unsafe_32fc_x5, 1e-4, 0, 20462,
 | 
			
		||||
VOLK_RUN_TESTS(volk_gnsssdr_8ic_x7_cw_vepl_corr_32fc_x5, 1e-4, 0, 20462, 1);
 | 
			
		||||
VOLK_RUN_TESTS(volk_gnsssdr_8ic_x7_cw_vepl_corr_TEST_32fc_x5, 1e-4, 0, 20462, 1);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
VOLK_RUN_TESTS(volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc, 1e-4, 0, 20462, 1);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -272,12 +272,18 @@ void galileo_e1_dll_pll_veml_tracking_cc::update_local_code()
 | 
			
		||||
 | 
			
		||||
    epl_loop_length_samples = d_current_prn_length_samples + very_early_late_spc_samples*2;
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < epl_loop_length_samples; i++)
 | 
			
		||||
        {
 | 
			
		||||
            associated_chip_index = 2 + round(fmod(tcode_half_chips - 2*d_very_early_late_spc_chips, code_length_half_chips));
 | 
			
		||||
            d_very_early_code[i] = d_ca_code[associated_chip_index];
 | 
			
		||||
            tcode_half_chips = tcode_half_chips + code_phase_step_half_chips;
 | 
			
		||||
        }
 | 
			
		||||
    volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc_manual(d_very_early_code, (float) d_very_early_late_spc_chips, (float) code_length_half_chips, (float) code_phase_step_half_chips, (float) tcode_half_chips, d_ca_code, epl_loop_length_samples, "generic");
 | 
			
		||||
    
 | 
			
		||||
    volk_gnsssdr_32fc_s32f_x4_update_local_code_32fc_manual(d_very_early_code, (float) d_very_early_late_spc_chips, (float) code_length_half_chips, (float) code_phase_step_half_chips, (float) tcode_half_chips, d_ca_code, epl_loop_length_samples, "u_sse4_1");
 | 
			
		||||
    
 | 
			
		||||
//    float d_very_early_late_spc_chips_multiplied_by_2 = 2*d_very_early_late_spc_chips;
 | 
			
		||||
//    for (int i = 0; i < epl_loop_length_samples; i++)
 | 
			
		||||
//        {
 | 
			
		||||
//            associated_chip_index = 2 + round(fmod(tcode_half_chips - d_very_early_late_spc_chips_multiplied_by_2, code_length_half_chips));
 | 
			
		||||
//            d_very_early_code[i] = d_ca_code[associated_chip_index];
 | 
			
		||||
//            tcode_half_chips = tcode_half_chips + code_phase_step_half_chips;
 | 
			
		||||
//        }
 | 
			
		||||
    
 | 
			
		||||
    memcpy(d_early_code, &d_very_early_code[very_early_late_spc_samples - early_late_spc_samples], d_current_prn_length_samples* sizeof(gr_complex));
 | 
			
		||||
    memcpy(d_prompt_code, &d_very_early_code[very_early_late_spc_samples], d_current_prn_length_samples* sizeof(gr_complex));
 | 
			
		||||
    memcpy(d_late_code, &d_very_early_code[very_early_late_spc_samples + early_late_spc_samples], d_current_prn_length_samples* sizeof(gr_complex));
 | 
			
		||||
@@ -377,32 +383,32 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items,gr_vect
 | 
			
		||||
            update_local_carrier();
 | 
			
		||||
 | 
			
		||||
            //perform carrier wipe-off and compute Very Early, Early, Prompt, Late and Very Late correlation
 | 
			
		||||
            d_correlator.Carrier_wipeoff_and_VEPL_volk(d_current_prn_length_samples,
 | 
			
		||||
                    in,
 | 
			
		||||
                    d_carr_sign,
 | 
			
		||||
                    d_very_early_code,
 | 
			
		||||
                    d_early_code,
 | 
			
		||||
                    d_prompt_code,
 | 
			
		||||
                    d_late_code,
 | 
			
		||||
                    d_very_late_code,
 | 
			
		||||
                    d_Very_Early,
 | 
			
		||||
                    d_Early,
 | 
			
		||||
                    d_Prompt,
 | 
			
		||||
                    d_Late,
 | 
			
		||||
                    d_Very_Late,
 | 
			
		||||
                    is_unaligned());
 | 
			
		||||
            
 | 
			
		||||
            volk_gnsssdr_32fc_x7_cw_vepl_corr_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in, d_carr_sign, d_very_early_code, d_early_code, d_prompt_code, d_late_code, d_very_late_code, d_current_prn_length_samples);
 | 
			
		||||
            
 | 
			
		||||
            volk_gnsssdr_32fc_convert_16ic(d_very_early_code16, d_very_early_code, d_current_prn_length_samples);
 | 
			
		||||
            volk_gnsssdr_32fc_convert_16ic(d_early_code16, d_early_code, d_current_prn_length_samples);
 | 
			
		||||
            volk_gnsssdr_32fc_convert_16ic(d_prompt_code16, d_prompt_code, d_current_prn_length_samples);
 | 
			
		||||
            volk_gnsssdr_32fc_convert_16ic(d_late_code16, d_late_code, d_current_prn_length_samples);
 | 
			
		||||
            volk_gnsssdr_32fc_convert_16ic(d_very_late_code16, d_very_late_code, d_current_prn_length_samples);
 | 
			
		||||
            volk_gnsssdr_32fc_convert_16ic(in16, in, d_current_prn_length_samples);
 | 
			
		||||
            volk_gnsssdr_32fc_convert_16ic(d_carr_sign16, d_carr_sign, d_current_prn_length_samples);
 | 
			
		||||
            
 | 
			
		||||
            volk_gnsssdr_16ic_x7_cw_vepl_corr_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in16, d_carr_sign16, d_very_early_code16, d_early_code16, d_prompt_code16, d_late_code16, d_very_late_code16, d_current_prn_length_samples);
 | 
			
		||||
//            d_correlator.Carrier_wipeoff_and_VEPL_volk(d_current_prn_length_samples,
 | 
			
		||||
//                    in,
 | 
			
		||||
//                    d_carr_sign,
 | 
			
		||||
//                    d_very_early_code,
 | 
			
		||||
//                    d_early_code,
 | 
			
		||||
//                    d_prompt_code,
 | 
			
		||||
//                    d_late_code,
 | 
			
		||||
//                    d_very_late_code,
 | 
			
		||||
//                    d_Very_Early,
 | 
			
		||||
//                    d_Early,
 | 
			
		||||
//                    d_Prompt,
 | 
			
		||||
//                    d_Late,
 | 
			
		||||
//                    d_Very_Late,
 | 
			
		||||
//                    is_unaligned());
 | 
			
		||||
//            
 | 
			
		||||
//            volk_gnsssdr_32fc_x7_cw_vepl_corr_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in, d_carr_sign, d_very_early_code, d_early_code, d_prompt_code, d_late_code, d_very_late_code, d_current_prn_length_samples);
 | 
			
		||||
//            
 | 
			
		||||
//            volk_gnsssdr_32fc_convert_16ic(d_very_early_code16, d_very_early_code, d_current_prn_length_samples);
 | 
			
		||||
//            volk_gnsssdr_32fc_convert_16ic(d_early_code16, d_early_code, d_current_prn_length_samples);
 | 
			
		||||
//            volk_gnsssdr_32fc_convert_16ic(d_prompt_code16, d_prompt_code, d_current_prn_length_samples);
 | 
			
		||||
//            volk_gnsssdr_32fc_convert_16ic(d_late_code16, d_late_code, d_current_prn_length_samples);
 | 
			
		||||
//            volk_gnsssdr_32fc_convert_16ic(d_very_late_code16, d_very_late_code, d_current_prn_length_samples);
 | 
			
		||||
//            volk_gnsssdr_32fc_convert_16ic(in16, in, d_current_prn_length_samples);
 | 
			
		||||
//            volk_gnsssdr_32fc_convert_16ic(d_carr_sign16, d_carr_sign, d_current_prn_length_samples);
 | 
			
		||||
//            
 | 
			
		||||
//            volk_gnsssdr_16ic_x7_cw_vepl_corr_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in16, d_carr_sign16, d_very_early_code16, d_early_code16, d_prompt_code16, d_late_code16, d_very_late_code16, d_current_prn_length_samples);
 | 
			
		||||
            
 | 
			
		||||
            volk_gnsssdr_32fc_convert_8ic(d_very_early_code8, d_very_early_code, d_current_prn_length_samples);
 | 
			
		||||
            volk_gnsssdr_32fc_convert_8ic(d_early_code8, d_early_code, d_current_prn_length_samples);
 | 
			
		||||
@@ -412,9 +418,9 @@ int galileo_e1_dll_pll_veml_tracking_cc::general_work (int noutput_items,gr_vect
 | 
			
		||||
            volk_gnsssdr_32fc_convert_8ic(d_carr_sign8, d_carr_sign, d_current_prn_length_samples);
 | 
			
		||||
            volk_gnsssdr_32fc_s32f_convert_8ic(in8, in, 4, d_current_prn_length_samples);
 | 
			
		||||
            
 | 
			
		||||
            volk_gnsssdr_8ic_x7_cw_vepl_corr_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in8, d_carr_sign8, d_very_early_code8, d_early_code8, d_prompt_code8, d_late_code8, d_very_late_code8, d_current_prn_length_samples);
 | 
			
		||||
            //volk_gnsssdr_8ic_x7_cw_vepl_corr_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in8, d_carr_sign8, d_very_early_code8, d_early_code8, d_prompt_code8, d_late_code8, d_very_late_code8, d_current_prn_length_samples);
 | 
			
		||||
 | 
			
		||||
            volk_gnsssdr_8ic_x7_cw_vepl_corr_unsafe_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in8, d_carr_sign8, d_very_early_code8, d_early_code8, d_prompt_code8, d_late_code8, d_very_late_code8, d_current_prn_length_samples);
 | 
			
		||||
            //volk_gnsssdr_8ic_x7_cw_vepl_corr_unsafe_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in8, d_carr_sign8, d_very_early_code8, d_early_code8, d_prompt_code8, d_late_code8, d_very_late_code8, d_current_prn_length_samples);
 | 
			
		||||
           
 | 
			
		||||
            volk_gnsssdr_8ic_x7_cw_vepl_corr_safe_32fc_x5(d_Very_Early, d_Early, d_Prompt, d_Late, d_Very_Late, in8, d_carr_sign8, d_very_early_code8, d_early_code8, d_prompt_code8, d_late_code8, d_very_late_code8, d_current_prn_length_samples);
 | 
			
		||||
            
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user