Vector Optimized Library of Kernels  3.0.0
Architecture-tuned implementations of math kernels

Overview

Computes arcsine of input vector and stores results in output vector.

Dispatcher Prototype

void volk_32f_atan_32f(float* bVector, const float* aVector, unsigned int num_points)

Inputs

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

Outputs

  • bVector: The vector where results will be stored.

Example Calculate common angles around the top half of the unit circle.

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);
in[0] = 0.f;
in[1] = 1.f/std::sqrt(3.f);
in[2] = 1.f;
in[3] = std::sqrt(3.f);
in[4] = in[5] = 1e99;
for(unsigned int ii = 6; ii < N; ++ii){
in[ii] = - in[N-ii-1];
}
volk_32f_atan_32f(out, in, N);
for(unsigned int ii = 0; ii < N; ++ii){
printf("atan(%1.3f) = %1.3f\n", in[ii], out[ii]);
}
volk_free(out);
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:80