Adelsbach/VSIPL
Core Light Double Precision Programming Reference Guide
DD-00014-015
Core Light +DP

8.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_scalar_d  vsip_vdot_d(const vsip_vview_d* a, const vsip_vview_d* b); 
vsip_cscalar_f vsip_cvdot_f(const vsip_cvview_f* a, const vsip_cvview_f* b); 
vsip_cscalar_d vsip_cvdot_d(const vsip_cvview_d* a, const vsip_cvview_d* 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∑︁
  aibi
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);