mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Merge branch 'new_volk_module' of git+ssh://github.com/gnss-sdr/gnss-sdr
into new_volk_module # Conflicts: # src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_16ic_x2_dot_prod_16ic_xn.h # src/algorithms/tracking/libs/volk_gnsssdr_16ic_xn_resampler_16ic_xn.h
This commit is contained in:
		| @@ -1,9 +1,9 @@ | ||||
| #ifndef SATURATED_ARITHMETIC_H_ | ||||
| #define SATURATED_ARITHMETIC_H_ | ||||
| #ifndef SATURATION_ARITHMETIC_H_ | ||||
| #define SATURATION_ARITHMETIC_H_ | ||||
| 
 | ||||
| #include <limits.h> | ||||
| //#include <types.h>
 | ||||
| static inline int16_t sat_adds16b(int16_t x, int16_t y) | ||||
| static inline int16_t sat_adds16i(int16_t x, int16_t y) | ||||
| { | ||||
|     //	int16_t ux = x;
 | ||||
|     //	int16_t uy = y;
 | ||||
| @@ -28,4 +28,4 @@ static inline int16_t sat_adds16b(int16_t x, int16_t y) | ||||
|     return res; | ||||
| } | ||||
| 
 | ||||
| #endif /*SATURATED_ARITHMETIC_H_*/ | ||||
| #endif /*SATURATION_ARITHMETIC_H_*/ | ||||
| @@ -39,7 +39,6 @@ | ||||
| #include <math.h> | ||||
| #include <volk_gnsssdr/volk_gnsssdr_common.h> | ||||
| #include <volk_gnsssdr/volk_gnsssdr_complex.h> | ||||
| #include <volk_gnsssdr/saturated_arithmetic.h> | ||||
|  | ||||
| //#pragma STDC FENV_ACCESS ON | ||||
|  | ||||
|   | ||||
| @@ -37,11 +37,9 @@ | ||||
| #define INCLUDED_volk_gnsssdr_16ic_x2_dot_prod_16ic_u_H | ||||
|  | ||||
| #include <inttypes.h> | ||||
| #include <stdio.h> | ||||
| #include <string.h> | ||||
| #include <volk_gnsssdr/volk_gnsssdr_common.h> | ||||
| #include <volk_gnsssdr/volk_gnsssdr_complex.h> | ||||
| #include <volk_gnsssdr/saturated_arithmetic.h> | ||||
| #include <volk_gnsssdr/saturation_arithmetic.h> | ||||
|  | ||||
|  | ||||
| #ifdef LV_HAVE_GENERIC | ||||
| @@ -60,9 +58,9 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_generic(lv_16sc_t* result, | ||||
|             //r*a.r - i*a.i, i*a.r + r*a.i | ||||
|             //result[0]+=in_a[n]*in_b[n]; | ||||
|             lv_16sc_t tmp = in_a[n] * in_b[n]; | ||||
|             result[0] = lv_cmake(sat_adds16b(lv_creal(result[0]), lv_creal(tmp)), sat_adds16b(lv_cimag(result[0]), lv_cimag(tmp) )); | ||||
|             //result[0].real(sat_adds16b(result[0].real(),lv_creal(tmp))); | ||||
|             //result[0].imag(sat_adds16b(result[0].imag(),tmp.imag())); | ||||
|             result[0] = lv_cmake(sat_adds16i(lv_creal(result[0]), lv_creal(tmp)), sat_adds16i(lv_cimag(result[0]), lv_cimag(tmp) )); | ||||
|             //result[0].real(sat_adds16i(result[0].real(),lv_creal(tmp))); | ||||
|             //result[0].imag(sat_adds16i(result[0].imag(),tmp.imag())); | ||||
|         } | ||||
| } | ||||
|  | ||||
| @@ -130,9 +128,9 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_a_sse2(lv_16sc_t* out, con | ||||
|  | ||||
|             for (int i = 0; i < 4; ++i) | ||||
|                 { | ||||
|                     dotProduct = lv_cmake(sat_adds16b(lv_creal(dotProduct), lv_creal(dotProductVector[i])), sat_adds16b(lv_cimag(dotProduct), lv_cimag(dotProductVector[i]))); | ||||
|                     //dotProduct.real(sat_adds16b(lv_creal(dotProduct),lv_creal(dotProductVector[i]))); | ||||
|                     //dotProduct.imag(sat_adds16b(lv_cimag(dotProduct),lv_cimag(dotProductVector[i]))); | ||||
|                     dotProduct = lv_cmake(sat_adds16i(lv_creal(dotProduct), lv_creal(dotProductVector[i])), sat_adds16i(lv_cimag(dotProduct), lv_cimag(dotProductVector[i]))); | ||||
|                     //dotProduct.real(sat_adds16i(lv_creal(dotProduct),lv_creal(dotProductVector[i]))); | ||||
|                     //dotProduct.imag(sat_adds16i(lv_cimag(dotProduct),lv_cimag(dotProductVector[i]))); | ||||
|                 } | ||||
|         } | ||||
|  | ||||
| @@ -140,9 +138,9 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_a_sse2(lv_16sc_t* out, con | ||||
|         { | ||||
|             //dotProduct += (*_in_a++) * (*_in_b++); | ||||
|             lv_16sc_t tmp = (*_in_a++) * (*_in_b++); | ||||
|             dotProduct = lv_cmake( sat_adds16b(lv_creal(dotProduct), lv_creal(tmp)), sat_adds16b(lv_cimag(dotProduct), lv_cimag(tmp))); | ||||
|             //dotProduct.real(sat_adds16b(lv_creal(dotProduct),lv_creal(tmp))); | ||||
|             //dotProduct.imag(sat_adds16b(lv_cimag(dotProduct),lv_cimag(tmp))); | ||||
|             dotProduct = lv_cmake( sat_adds16i(lv_creal(dotProduct), lv_creal(tmp)), sat_adds16i(lv_cimag(dotProduct), lv_cimag(tmp))); | ||||
|             //dotProduct.real(sat_adds16i(lv_creal(dotProduct),lv_creal(tmp))); | ||||
|             //dotProduct.imag(sat_adds16i(lv_cimag(dotProduct),lv_cimag(tmp))); | ||||
|         } | ||||
|  | ||||
|     *_out = dotProduct; | ||||
|   | ||||
| @@ -1,12 +1,12 @@ | ||||
| /*! | ||||
|  * \file volk_gnsssdr_16ic_x2_dot_prod_16ic.h | ||||
|  * \brief Volk protokernel: multiplies two 16 bits vectors and accumulates them | ||||
|  * \file volk_gnsssdr_16ic_xn_dot_prod_16ic_xn.h | ||||
|  * \brief Volk protokernel: multiplies N 16 bits vectors by a common vector and accumulates the results in N 16 bits short complex outputs. | ||||
|  * \authors <ul> | ||||
|  *          <li> Javier Arribas, 2015. jarribas(at)cttc.es | ||||
|  *          </ul> | ||||
|  * | ||||
|  * Volk protokernel that multiplies two 16 bits vectors (8 bits the real part  | ||||
|  * and 8 bits the imaginary part) and accumulates them | ||||
|  * Volk protokernel that multiplies N 16 bits vectors by a common vector and accumulates the results in N 16 bits short complex outputs. | ||||
|  * It is optimized to perform the N tap correlation process in GNSS receivers. | ||||
|  * | ||||
|  * ------------------------------------------------------------------------- | ||||
|  * | ||||
| @@ -38,7 +38,7 @@ | ||||
|  | ||||
|  | ||||
| #include <volk_gnsssdr/volk_gnsssdr_complex.h> | ||||
| #include <volk_gnsssdr/saturated_arithmetic.h> | ||||
| #include <volk_gnsssdr/saturation_arithmetic.h> | ||||
|  | ||||
| #ifdef LV_HAVE_GENERIC | ||||
| /*! | ||||
| @@ -58,7 +58,7 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_generic(lv_16sc_t* resu | ||||
|                     //r*a.r - i*a.i, i*a.r + r*a.i | ||||
|                     //result[n_vec]+=in_common[n]*in_a[n_vec][n]; | ||||
|                     lv_16sc_t tmp = in_common[n] * in_a[n_vec][n]; | ||||
|                     result[n_vec] = lv_cmake(sat_adds16b(lv_creal(result[n_vec]), lv_creal(tmp)), sat_adds16b(lv_cimag(result[n_vec]), lv_cimag(tmp))); | ||||
|                     result[n_vec] = lv_cmake(sat_adds16i(lv_creal(result[n_vec]), lv_creal(tmp)), sat_adds16i(lv_cimag(result[n_vec]), lv_cimag(tmp))); | ||||
|                 } | ||||
|         } | ||||
| } | ||||
| @@ -137,8 +137,8 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_a_sse2(lv_16sc_t* out, | ||||
|                     dotProduct = lv_cmake(0,0); | ||||
|                     for (int i = 0; i<4; ++i) | ||||
|                         { | ||||
|                             dotProduct = lv_cmake(sat_adds16b(lv_creal(dotProduct), lv_creal(dotProductVector[i])), | ||||
|                                     sat_adds16b(lv_cimag(dotProduct), lv_cimag(dotProductVector[i]))); | ||||
|                             dotProduct = lv_cmake(sat_adds16i(lv_creal(dotProduct), lv_creal(dotProductVector[i])), | ||||
|                                     sat_adds16i(lv_cimag(dotProduct), lv_cimag(dotProductVector[i]))); | ||||
|                         } | ||||
|                     _out[n_vec] = dotProduct; | ||||
|                 } | ||||
| @@ -152,9 +152,9 @@ static inline void volk_gnsssdr_16ic_x2_dot_prod_16ic_xn_a_sse2(lv_16sc_t* out, | ||||
|                 { | ||||
|                     lv_16sc_t tmp = in_common[n] * in_a[n_vec][n]; | ||||
|  | ||||
|                     _out[n_vec] = lv_cmake(sat_adds16b(lv_creal(_out[n_vec]), lv_creal(tmp)), | ||||
|                             sat_adds16b(lv_cimag(_out[n_vec]), lv_cimag(tmp))); | ||||
|                 } | ||||
|                     _out[n_vec] = lv_cmake(sat_adds16i(lv_creal(_out[n_vec]), lv_creal(tmp)), | ||||
|                             sat_adds16i(lv_cimag(_out[n_vec]), lv_cimag(tmp))); | ||||
|             } | ||||
|         } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -38,8 +38,6 @@ | ||||
|  | ||||
| #include <volk_gnsssdr/volk_gnsssdr_common.h> | ||||
| #include <volk_gnsssdr/volk_gnsssdr_complex.h> | ||||
| #include <stdio.h> | ||||
| #include <string.h> | ||||
|  | ||||
| #ifdef LV_HAVE_GENERIC | ||||
| /*! | ||||
|   | ||||
| @@ -1,12 +1,13 @@ | ||||
| /*! | ||||
|  * \file volk_gnsssdr_16ic_xn_resampler_16ic_xn.h | ||||
|  * \brief Volk protokernel: resample a 16 bits complex vector | ||||
|  * \brief Volk protokernel: Resamples N 16 bits integer short complex vectors using zero hold resample algorithm. | ||||
|  * \authors <ul> | ||||
|  *          <li> Javier Arribas, 2015. jarribas(at)cttc.es | ||||
|  *          </ul> | ||||
|  * | ||||
|  * Volk protokernel that multiplies two 16 bits vectors (8 bits the real part  | ||||
|  * and 8 bits the imaginary part) and accumulates them | ||||
|  * Volk protokernel that esamples N 16 bits integer short complex vectors using zero hold resample algorithm. | ||||
|  * It is optimized to resample a sigle GNSS local code signal replica into N vectors fractional-resampled and fractional-delayed | ||||
|  * (i.e. it creates the Early, Prompt, and Late code replicas) | ||||
|  * | ||||
|  * ------------------------------------------------------------------------- | ||||
|  * | ||||
|   | ||||
| @@ -31,7 +31,6 @@ | ||||
|  */ | ||||
|  | ||||
| #include <inttypes.h> | ||||
| #include <stdio.h> | ||||
| #include <math.h> | ||||
| #include "volk_gnsssdr/volk_gnsssdr_complex.h" | ||||
|  | ||||
|   | ||||
| @@ -32,7 +32,6 @@ | ||||
|  | ||||
|  | ||||
| #include <inttypes.h> | ||||
| #include <stdio.h> | ||||
| #include <math.h> | ||||
| #include "volk_gnsssdr/volk_gnsssdr_complex.h" | ||||
|  | ||||
|   | ||||
| @@ -37,7 +37,6 @@ | ||||
|  | ||||
| #include <volk_gnsssdr/volk_gnsssdr_common.h> | ||||
| #include <inttypes.h> | ||||
| #include <stdio.h> | ||||
|  | ||||
| #ifdef LV_HAVE_AVX | ||||
| #include <immintrin.h> | ||||
|   | ||||
| @@ -37,7 +37,6 @@ | ||||
|  | ||||
| #include <volk_gnsssdr/volk_gnsssdr_common.h> | ||||
| #include <inttypes.h> | ||||
| #include <stdio.h> | ||||
|  | ||||
| #ifdef LV_HAVE_SSE3 | ||||
| #include <pmmintrin.h> | ||||
|   | ||||
| @@ -37,7 +37,6 @@ | ||||
|  | ||||
| #include <volk_gnsssdr/volk_gnsssdr_common.h> | ||||
| #include <inttypes.h> | ||||
| #include <stdio.h> | ||||
|  | ||||
| #ifdef LV_HAVE_AVX | ||||
| #include <immintrin.h> | ||||
|   | ||||
| @@ -37,7 +37,6 @@ | ||||
|  | ||||
| #include <volk_gnsssdr/volk_gnsssdr_common.h> | ||||
| #include <inttypes.h> | ||||
| #include <stdio.h> | ||||
|  | ||||
| #ifdef LV_HAVE_SSE4_1 | ||||
| #include <smmintrin.h> | ||||
|   | ||||
| @@ -36,7 +36,6 @@ | ||||
| #define INCLUDED_volk_gnsssdr_8i_x2_add_8i_u_H | ||||
|  | ||||
| #include <inttypes.h> | ||||
| #include <stdio.h> | ||||
|  | ||||
| #ifdef LV_HAVE_SSE2 | ||||
| #include <emmintrin.h> | ||||
|   | ||||
| @@ -37,7 +37,6 @@ | ||||
| #define INCLUDED_volk_gnsssdr_8ic_conjugate_8ic_u_H | ||||
|  | ||||
| #include <inttypes.h> | ||||
| #include <stdio.h> | ||||
| #include <volk_gnsssdr/volk_gnsssdr_complex.h> | ||||
|  | ||||
| #ifdef LV_HAVE_AVX | ||||
|   | ||||
| @@ -38,7 +38,6 @@ | ||||
| #define INCLUDED_volk_gnsssdr_8ic_magnitude_squared_8i_u_H | ||||
|  | ||||
| #include <inttypes.h> | ||||
| #include <stdio.h> | ||||
| #include <math.h> | ||||
|  | ||||
| #ifdef LV_HAVE_SSSE3 | ||||
|   | ||||
| @@ -37,7 +37,6 @@ | ||||
| #define INCLUDED_volk_gnsssdr_8ic_s8ic_multiply_8ic_u_H | ||||
|  | ||||
| #include <inttypes.h> | ||||
| #include <stdio.h> | ||||
| #include <volk_gnsssdr/volk_gnsssdr_complex.h> | ||||
| #include <float.h> | ||||
|  | ||||
|   | ||||
| @@ -38,8 +38,6 @@ | ||||
|  | ||||
| #include <volk_gnsssdr/volk_gnsssdr_common.h> | ||||
| #include <volk_gnsssdr/volk_gnsssdr_complex.h> | ||||
| #include <stdio.h> | ||||
| #include <string.h> | ||||
|  | ||||
| #ifdef LV_HAVE_GENERIC | ||||
| /*! | ||||
|   | ||||
| @@ -37,7 +37,6 @@ | ||||
| #define INCLUDED_volk_gnsssdr_8ic_x2_multiply_8ic_u_H | ||||
|  | ||||
| #include <inttypes.h> | ||||
| #include <stdio.h> | ||||
| #include <volk_gnsssdr/volk_gnsssdr_complex.h> | ||||
|  | ||||
| #ifdef LV_HAVE_SSE2 | ||||
|   | ||||
| @@ -36,7 +36,6 @@ | ||||
| #define INCLUDED_volk_gnsssdr_8u_x2_multiply_8u_u_H | ||||
|  | ||||
| #include <inttypes.h> | ||||
| #include <stdio.h> | ||||
|  | ||||
| #ifdef LV_HAVE_SSE3 | ||||
| #include <pmmintrin.h> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez