Loading...
Searching...
No Matches
volk_32f_s32f_power_32f

Overview

Takes each input vector value to the specified power and stores the results in the return vector.

Dispatcher Prototype

void volk_32f_s32f_power_32f(float* cVector, const float* aVector, const float power,
unsigned int num_points)

Inputs

- aVector: The input vector of floats.
- power: The power to raise the input value to.
- num_points: The number of data points.

Outputs

- cVector: The output vector.

Example Square the numbers (0,9)

int N = 10;
unsigned int alignment = volk_get_alignment();
float* increasing = (float*)volk_malloc(sizeof(float)*N, alignment);
float* out = (float*)volk_malloc(sizeof(float)*N, alignment);
for(unsigned int ii = 0; ii < N; ++ii){
increasing[ii] = (float)ii;
}
// Normalize by the smallest delta (0.2 in this example)
float scale = 2.0f;
volk_32f_s32f_power_32f(out, increasing, scale, N);
for(unsigned int ii = 0; ii < N; ++ii){
printf("out[%u] = %f\n", ii, out[ii]);
}
volk_free(increasing);
volk_free(out);