Adelsbach/VSIPL
Core Programming Reference Guide
DD-00016-015
Core

This manual is preliminary and incomplete.
While our Core implementation implements all functions given in the standard we are still working on completing this documentation.

Please refer to the VSIPL standard for a complete function reference of the Core profile until we have completed work on this documentation.

6.1.1 vsip_dvdot_p - Compute the Dot Product of Two Vector Views

vsip_scalar_f  vsip_vdot_f(const vsip_vview_f* a, const vsip_vview_f* b); 
vsip_cscalar_f vsip_cvdot_f(const vsip_cvview_f* a, const vsip_cvview_f* b);
Description

This function computes the dot product of the vector views a and b and returns it. The dot product is computed as the sum of the element-wise products of the corresponding elements in the two vectors.

n∑︁ a b
i  i i
Parameters
Return Value
Example

vsip_cvview_f *complex_vector_a; 
vsip_cvview_f *complex_vector_b; 
vsip_cscalar_f dot_product; 
 
// Assuming complex_vector_a and complex_vector_b have been properly initialized 
dot_product = vsip_cvdot_f(complex_vector_a, complex_vector_b);