SRSLTE: Added float and complex vector allocation

master
Xavier Arteaga 5 years ago
parent a0d53b0d84
commit 78dd9d7854

@ -80,6 +80,8 @@ SRSLTE_API float srslte_vec_acc_ff(const float *x, const uint32_t len);
SRSLTE_API cf_t srslte_vec_acc_cc(const cf_t *x, const uint32_t len);
SRSLTE_API void *srslte_vec_malloc(uint32_t size);
SRSLTE_API cf_t* srslte_vec_cf_malloc(uint32_t size);
SRSLTE_API float* srslte_vec_f_malloc(uint32_t size);
SRSLTE_API void *srslte_vec_realloc(void *ptr, uint32_t old_size, uint32_t new_size);

@ -124,6 +124,16 @@ void *srslte_vec_malloc(uint32_t size) {
}
}
cf_t* srslte_vec_cf_malloc(uint32_t nsamples)
{
return (cf_t*)srslte_vec_malloc((uint32_t)sizeof(cf_t) * nsamples);
}
float* srslte_vec_f_malloc(uint32_t nsamples)
{
return (float*)srslte_vec_malloc((uint32_t)sizeof(float) * nsamples);
}
void *srslte_vec_realloc(void *ptr, uint32_t old_size, uint32_t new_size) {
#ifndef LV_HAVE_SSE
return realloc(ptr, new_size);

Loading…
Cancel
Save