Deprecation
This kernel is deprecated, because passing in lv_32fc_t
by value results in Undefined Behaviour, causing a segmentation fault on some architectures. Use volk_32fc_x2_s32fc_multiply_conjugate_add2_32fc
instead.
Overview
Conjugate the input complex vector, multiply them by a complex scalar, add the another input complex vector and returns the results.
c[i] = a[i] + conj(b[i]) * scalar
Dispatcher Prototype
void volk_32fc_x2_s32fc_multiply_conjugate_add_32fc(
lv_32fc_t* cVector,
const
num_points);
Inputs
- aVector: The input vector to be added.
- bVector: The input vector to be conjugate and multiplied.
- scalar: The complex scalar to multiply against conjugated bVector.
- num_points: The number of complex values in aVector and bVector to be conjugate, multiplied and stored into cVector.
Outputs
- cVector: The vector where the results will be stored.
Example Calculate coefficients.
int n_filter = 2 * N + 1;
unsigned int alignment = volk_get_alignment();
...
foo_push_back_queue(state, input);
for (int i = 0; i < n_filter; i++) {
output += state[i] * weight[i];
}
float real =
lv_creal(output) * (1.0 - std::norm(output)) * MU;
volk_32fc_x2_s32fc_multiply_conjugate_add_32fc(next, weight, state, factor, n_filter);
next = weight;
weight = tmp;
...
volk_free(state);