Loading...
Searching...
No Matches
volk_32f_reciprocal_32f

Overview

Computes the reciprocal of the input vector and stores the results in the output vector. For the AVX512F implementation the relative error is < 2**(-14) = 6.1e-05

Dispatcher Prototype

void volk_32f_reciprocal_32f(float* out, const float* in, unsigned int num_points)

Inputs

- in: A pointer to the input vector of floats.
- num_points: The number of data points.

Outputs

- bVector: A pointer to the output vector of floats.

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 = 1; ii < N; ++ii){
in[ii] = (float)(ii*ii);
}
volk_32f_reciprocal_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);