Loading...
Searching...
No Matches
volk_64f_x2_dot_prod_64f

Overview

Computes the dot product (inner product) of two double-precision vectors. Returns the sum of element-wise products: result = sum(input[i] * taps[i]).

Dispatcher Prototype

void volk_64f_x2_dot_prod_64f(double* result, const double* input, const double* taps,
unsigned int num_points)

Inputs

- input: First input vector.
- taps: Second input vector (filter coefficients).
- num_points: Vector length.

Outputs

- result: Pointer to store the scalar dot product result.

Example

unsigned int N = 10;
unsigned int align = volk_get_alignment();
double* a = (double*)volk_malloc(N * sizeof(double), align);
double* b = (double*)volk_malloc(N * sizeof(double), align);
double result;
// Compute dot product of [0,1,2,...,9] with [1,1,1,...,1]
for (unsigned int i = 0; i < N; i++) {
a[i] = (double)i;
b[i] = 1.0;
}
volk_64f_x2_dot_prod_64f(&result, a, b, N);
// result == 45.0 (sum of 0 through 9)
volk_free(a);
volk_free(b);