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.

4.2.4 vsip_dvmeanval_p - Compute Mean Value of Vector

vsip_scalar_f vsip_vmeanval_f(vsip_vview_f const *a); 
vsip_cscalar_f vsip_cvmeanval_f(vsip_cvview_f const *a);
Description

This function computes the arithmetic mean (average) value of all elements in a vector. The arithmetic mean is calculated as:

       1n-∑︁1
mean = --  ai
       n i=0

where n is the length of the vector and ai are the elements of the input vector.

Parameters
Return Value