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

4.2.2 vsip_vsumval_p - Compute the Sum of Elements in a Vector View

vsip_scalar_f vsip_vsumval_f(const vsip_vview_f* a); 
vsip_scalar_vi vsip_vsumval_f(const vsip_vview_bl* a);
Description

This function computes the sum of all elements in the vector view a and returns it.

n
∑︁ ai
i
Parameters
Return Value
Example

vsip_vview_f *vector_view; 
vsip_scalar_f sum; 
 
// Assuming vector_view has been properly initialized 
sum = vsip_vsumval_f(vector_view);
Notes