Loading...
Searching...
No Matches
volk_32fc_x2_multiply_32fc

Overview

Multiplies two complex vectors and returns the complex result.

Dispatcher Prototype

void volk_32fc_x2_multiply_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.
- num_points: The number of data points.

Outputs

- outputVector: The output vector complex floats.

Example Mix two signals at f=0.3 and 0.1.

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* sig_2 = (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);
for(unsigned int ii = 0; ii < N; ++ii){
// Generate two tones
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);
float real_2 = std::cos(0.1f * (float)ii);
float imag_2 = std::sin(0.1f * (float)ii);
sig_2[ii] = lv_cmake(real_2, imag_2);
}
volk_32fc_x2_multiply_32fc(out, sig_1, sig_2, N);
*
volk_free(sig_1);
volk_free(sig_2);
volk_free(out);