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

9.5 vsip_vsq_p - Square Elements of a Vector View

void vsip_vsq_f(const vsip_vview_f* a, const vsip_vview_f* r); 
void vsip_vsq_d(const vsip_vview_d* a, const vsip_vview_d* r);
Description

This function squares each element of the vector view a and stores the result in the vector view r.

    2
ri=ai
Parameters
Example

vsip_vview_f *src_vector_view; 
vsip_vview_f *dst_vector_view; 
 
// Assuming src_vector_view and dst_vector_view have been properly initialized 
vsip_vsq_f(src_vector_view, dst_vector_view);