Adelsbach/VSIPL
Core +DP Programming Reference Guide
DD-00017-015
Core +DP

2.1.3 vsip_cmagsq_p - Compute Magnitude Squared of Complex Scalar

vsip_scalar_f vsip_cmagsq_f(vsip_cscalar_f x); 
vsip_scalar_d vsip_cmagsq_d(vsip_cscalar_d x);
Description

This function computes the squared magnitude of a complex scalar. The squared magnitude is computed as:

                       2        2
magnitude_squared =real(x) +imag(x)

This function is often preferred over vsip_cmag_p if only magnitudes are to be compared.

Parameters
Return Value