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;
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]);
}
size_t volk_get_alignment(void)
Get the machine alignment in bytes.
Definition volk.tmpl.c:90
__VOLK_DECL_BEGIN VOLK_API void * volk_malloc(size_t size, size_t alignment)
Allocate size bytes of data aligned to alignment.
Definition volk_malloc.c:38
VOLK_API void volk_free(void *aptr)
Free's memory allocated by volk_malloc.
Definition volk_malloc.c:70