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.4.5 vsip_cvmag_p - Compute Magnitude of Complex Vector View

void vsip_cvmag_f(const vsip_cvview_f *a, const vsip_vview_f *r);
Description

This function computes the element-wise magnitude (absolute value) of each complex element in the vector view a and stores the result in the real vector view r. The magnitude of a complex number a+ bi is calculated as ⎷-2---2
 a + b.

Parameters
Example

vsip_cvview_f *complex_vector_view; 
vsip_vview_f *magnitude_vector_view; 
 
// Assuming complex_vector_view and magnitude_vector_view have been properly initialized 
vsip_cvmag_f(complex_vector_view, magnitude_vector_view);