GNU Radio Manual and C++ API Reference  3.7.7
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages

Overview

Computes arccosine of the input vector and stores results in the output vector.

Dispatcher Prototype

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