Loading...
Searching...
No Matches
volk_32fc_x2_multiply_conjugate_32fc

Overview

Multiplies a complex vector by the conjugate of a second complex vector and returns the complex result.

Dispatcher Prototype

void volk_32fc_x2_multiply_conjugate_32fc(lv_32fc_t* cVector, const lv_32fc_t* aVector,
const lv_32fc_t* bVector, unsigned int num_points);

Inputs

- aVector: The first input vector of complex floats.
- bVector: The second input vector of complex floats that is conjugated.
- num_points: The number of data points.

Outputs

- outputVector: The output vector complex floats.

Example Calculate mag^2 of a signal using x * conj(x).

int N = 10;
unsigned int alignment = volk_get_alignment();
lv_32fc_t* sig_1 = (lv_32fc_t*)volk_malloc(sizeof(lv_32fc_t)*N, alignment);
lv_32fc_t* out = (lv_32fc_t*)volk_malloc(sizeof(lv_32fc_t)*N, alignment);
float delta = 2.f*M_PI / (float)N;
for(unsigned int ii = 0; ii < N; ++ii){
float real_1 = std::cos(0.3f * (float)ii);
float imag_1 = std::sin(0.3f * (float)ii);
sig_1[ii] = lv_cmake(real_1, imag_1);
}
volk_32fc_x2_multiply_conjugate_32fc(out, sig_1, sig_1, N);
for(unsigned int ii = 0; ii < N; ++ii){
printf("%1.4f%+1.4fj,", lv_creal(out[ii]), lv_cimag(out[ii]));
}
printf("\n");
volk_free(sig_1);
volk_free(out);