Loading...
Searching...
No Matches
volk_32f_invsqrt_32f

Overview

Computes the inverse square root of the input vector and stores result in the output vector.

Dispatcher Prototype

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

Inputs

- aVector: the input vector of floats.
- num_points: The number of data points.

Outputs

- cVector: The output vector.

Example

int N = 10;
unsigned int alignment = volk_get_alignment();
float* in = (float*)volk_malloc(sizeof(float)*N, alignment);
float* out = (float*)volk_malloc(sizeof(float)*N, alignment);
for(unsigned int ii = 0; ii < N; ++ii){
in[ii] = 1.0 / (float)(ii*ii);
}
volk_32f_invsqrt_32f(out, in, N);
for(unsigned int ii = 0; ii < N; ++ii){
printf("out(%i) = %f\n", ii, out[ii]);
}
volk_free(in);
volk_free(out);