Loading...
Searching...
No Matches
volk_64f_convert_32f

Overview

Converts doubles into floats.

Dispatcher Prototype

void volk_64f_convert_32f(float* outputVector, const double* inputVector, unsigned int
num_points)

Inputs

- inputVector: The vector of doubles to convert to floats.
- num_points: The number of data points.

Outputs

- outputVector: returns the converted floats.

Example

int N = 10;
unsigned int alignment = volk_get_alignment();
double* increasing = (double*)volk_malloc(sizeof(double)*N, alignment);
float* out = (float*)volk_malloc(sizeof(float)*N, alignment);
for(unsigned int ii = 0; ii < N; ++ii){
increasing[ii] = (double)ii;
}
volk_64f_convert_32f(out, increasing, N);
for(unsigned int ii = 0; ii < N; ++ii){
printf("out[%u] = %1.2f\n", ii, out[ii]);
}
volk_free(increasing);
volk_free(out);