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.3.11 vsip_dsvsub_p - Subtract a Scalar to a Vector View

void vsip_svsub_i(vsip_scalar_i alpha, const vsip_vview_i* b, const vsip_vview_i* r); 
void vsip_svsub_f(vsip_scalar_f alpha, const vsip_vview_f* b, const vsip_vview_f* r); 
 
void vsip_csvsub_f(vsip_cscalar_f alpha, const vsip_cvview_f* b, const vsip_cvview_f* r);
Description

This function subtracts the scalar alpha to each element of the vector view b and stores the result in the vector view r.

Parameters
Example

vsip_vview_f *src_vector_view; 
vsip_vview_f *dst_vector_view; 
vsip_scalar_f scalar = 2.0; 
 
// Assuming src_vector_view and dst_vector_view have been properly initialized 
vsip_svsub_f(scalar, src_vector_view, dst_vector_view);