Overview
Converts the samples in the inputVector from 32-bit integers into floating point values and then divides them by the input scalar.
Dispatcher Prototype
void volk_32i_s32f_convert_32f(float* outputVector, const int32_t* inputVector, const
float scalar, unsigned int num_points)
Inputs
- inputVector: The vector of 32-bit integers.
- scalar: The value that the output is divided by after being converted to a float.
- num_points: The number of values.
Outputs
- complexVector: The output vector of floats.
Example Convert full-range integers to floats in range [0,1].
int N = 1<<8;
int32_t* x = (int32_t*)
volk_malloc(N*
sizeof(int32_t), alignment);
float* z = (
float*)
volk_malloc(N*
sizeof(
float), alignment);
float scale = (float)N;
for(unsigned int ii=0; ii<N; ++ii){
x[ii] = ii;
}
volk_32i_s32f_convert_32f(z, x, scale, N);
size_t volk_get_alignment(void)
Get the machine alignment in bytes.
Definition: volk.tmpl.c:90
__VOLK_DECL_BEGIN VOLK_API void * volk_malloc(size_t size, size_t alignment)
Allocate size bytes of data aligned to alignment.
Definition: volk_malloc.c:38
VOLK_API void volk_free(void *aptr)
Free's memory allocated by volk_malloc.
Definition: volk_malloc.c:80