srsLTE: Added set vector zeros for float and cf

master
Xavier Arteaga 5 years ago committed by Xavier Arteaga
parent b08c1f003e
commit 9ee651d094

@ -89,6 +89,11 @@ SRSLTE_API uint8_t* srslte_vec_u8_malloc(uint32_t nsamples);
SRSLTE_API void* srslte_vec_realloc(void* ptr, uint32_t old_size, uint32_t new_size);
/* Zero memory */
SRSLTE_API void srslte_vec_cf_zero(cf_t* ptr, uint32_t nsamples);
SRSLTE_API void srslte_vec_f_zero(float* ptr, uint32_t nsamples);
/* print vectors */
SRSLTE_API void srslte_vec_fprint_c(FILE* stream, cf_t* x, const uint32_t len);
SRSLTE_API void srslte_vec_fprint_f(FILE* stream, float* x, const uint32_t len);

@ -174,6 +174,16 @@ uint8_t* srslte_vec_u8_malloc(uint32_t nsamples)
return (uint8_t*)srslte_vec_malloc((uint32_t)sizeof(uint8_t) * nsamples);
}
void srslte_vec_cf_zero(cf_t* ptr, uint32_t nsamples)
{
memset(ptr, 0, sizeof(cf_t) * nsamples);
}
void srslte_vec_f_zero(float* ptr, uint32_t nsamples)
{
memset(ptr, 0, sizeof(float) * nsamples);
}
void* srslte_vec_realloc(void* ptr, uint32_t old_size, uint32_t new_size)
{
#ifndef LV_HAVE_SSE

Loading…
Cancel
Save