1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-07-01 09:23:15 +00:00
This commit is contained in:
Carles Fernandez 2016-02-16 18:46:37 +01:00
parent 8991b455fb
commit 505b13a21a

View File

@ -76,8 +76,10 @@ void load_random_data(void *data, volk_gnsssdr_type_t type, unsigned int n)
else ((uint32_t *)data)[i] = (uint32_t) scaled_rand; else ((uint32_t *)data)[i] = (uint32_t) scaled_rand;
break; break;
case 2: case 2:
if(type.is_signed) ((int16_t *)data)[i] = (int16_t) scaled_rand; // 16 bits dot product saturates very fast even with moderate length vectors
else ((uint16_t *)data)[i] = (uint16_t) scaled_rand; // we produce here only 4 bits input range
if(type.is_signed) ((int16_t *)data)[i] = (int16_t)((int16_t) scaled_rand % 16);
else ((uint16_t *)data)[i] = (uint16_t) (int16_t)((int16_t) scaled_rand % 16);
break; break;
case 1: case 1:
if(type.is_signed) ((int8_t *)data)[i] = (int8_t) scaled_rand; if(type.is_signed) ((int8_t *)data)[i] = (int8_t) scaled_rand;