From 62a17dc3d790c1b54815a7bd016ac0eff63c13aa Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Thu, 21 Jan 2016 11:30:09 +0100 Subject: [PATCH] Replaced literal limits with values stored in limits.h for volk gnss-sdr kernel --- .../volk_gnsssdr_32fc_convert_16ic.h | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_convert_16ic.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_convert_16ic.h index 21e15038e..51662263d 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_convert_16ic.h +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_convert_16ic.h @@ -30,13 +30,13 @@ * ------------------------------------------------------------------------- */ -#include -#include -#include "volk_gnsssdr/volk_gnsssdr_complex.h" - #ifndef INCLUDED_volk_gnsssdr_32fc_convert_16ic_H #define INCLUDED_volk_gnsssdr_32fc_convert_16ic_H +#include +#include +#include +#include "volk_gnsssdr/volk_gnsssdr_complex.h" #ifdef LV_HAVE_SSE2 #include @@ -53,8 +53,8 @@ static inline void volk_gnsssdr_32fc_convert_16ic_u_sse2(lv_16sc_t* outputVector float* inputVectorPtr = (float*)inputVector; int16_t* outputVectorPtr = (int16_t*)outputVector; - float min_val = -32768; - float max_val = 32767; + float min_val = SHRT_MIN; + float max_val = SHRT_MAX; __m128 inputVal1, inputVal2; __m128i intInputVal1, intInputVal2; @@ -106,8 +106,8 @@ static inline void volk_gnsssdr_32fc_convert_16ic_u_sse(lv_16sc_t* outputVector, float* inputVectorPtr = (float*)inputVector; int16_t* outputVectorPtr = (int16_t*)outputVector; - float min_val = -32768; - float max_val = 32767; + float min_val = SHRT_MIN; + float max_val = SHRT_MAX; __m128 inputVal1, inputVal2; __m128i intInputVal1, intInputVal2; // is __m128i defined in xmmintrin.h? @@ -160,8 +160,8 @@ static inline void volk_gnsssdr_32fc_convert_16ic_a_sse2(lv_16sc_t* outputVector float* inputVectorPtr = (float*)inputVector; int16_t* outputVectorPtr = (int16_t*)outputVector; - float min_val = -32768; - float max_val = 32767; + float min_val = SHRT_MIN; + float max_val = SHRT_MAX; __m128 inputVal1, inputVal2; __m128i intInputVal1, intInputVal2; @@ -213,8 +213,8 @@ static inline void volk_gnsssdr_32fc_convert_16ic_a_sse(lv_16sc_t* outputVector, float* inputVectorPtr = (float*)inputVector; int16_t* outputVectorPtr = (int16_t*)outputVector; - float min_val = -32768; - float max_val = 32767; + float min_val = SHRT_MIN; + float max_val = SHRT_MAX; __m128 inputVal1, inputVal2; __m128i intInputVal1, intInputVal2; @@ -262,8 +262,8 @@ static inline void volk_gnsssdr_32fc_convert_16ic_generic(lv_16sc_t* outputVecto { float* inputVectorPtr = (float*)inputVector; int16_t* outputVectorPtr = (int16_t*)outputVector; - float min_val = -32768; - float max_val = 32767; + float min_val = SHRT_MIN; + float max_val = SHRT_MAX; for(unsigned int i = 0; i < num_points*2; i++) {