Overview
Converts a floating point number to a 32-bit integer after applying a scaling factor.
Dispatcher Prototype
Inputs
- inputVector: the input vector of floats.
- scalar: The value multiplied against each point in the input buffer.
- num_points: The number of data points.
Outputs
- outputVector: The output vector.
Example Convert floats from [-1,1] to integers with a scale of 5 to maintain smallest delta
int N = 10;
float* increasing = (
float*)
volk_malloc(
sizeof(
float)*N, alignment);
for(unsigned int ii = 0; ii < N; ++ii){
increasing[ii] = 2.f * ((float)ii / (float)N) - 1.f;
}
float scale = 5.f;
for(unsigned int ii = 0; ii < N; ++ii){
printf("out[%u] = %i\n", ii, out[ii]);
}