Intel xvec
Experimental C++ simd class library
Loading...
Searching...
No Matches
C++26: Complex math

Element-wise mathematical functions for complex vectors. More...

Functions

template<vec_complex _Vc>
constexpr _Vc xvec::simd::conj (const _Vc &value)
 Compute the conjugate of each complex element.
template<vec_complex _Vc>
constexpr auto xvec::simd::real (const _Vc &value)
 Extract the real component of each complex element.
template<vec_complex _Vc>
constexpr auto xvec::simd::imag (const _Vc &value)
 Extract the imaginary component of each complex element.
template<vec_complex _Vc>
constexpr auto xvec::simd::norm (const _Vc &value)
 Compute the squared magnitude of each complex element.
template<vec_complex _Vc>
constexpr auto xvec::simd::abs (const _Vc &value)
 Compute the magnitude of each complex element.

Detailed Description

Element-wise mathematical functions for complex vectors.

See also
https://eel.is/c++draft/simd.complex.math

Function Documentation

◆ abs()

template<vec_complex _Vc>
auto xvec::simd::abs ( const _Vc & value)
constexpr

Compute the magnitude of each complex element.

Template Parameters
_VcThe complex vector type.
Parameters
valueThe input vector.
Returns
A real-valued vector containing the magnitude of each input element.

◆ conj()

template<vec_complex _Vc>
_Vc xvec::simd::conj ( const _Vc & value)
constexpr

Compute the conjugate of each complex element.

Template Parameters
_VcThe complex vector type.
Parameters
valueThe input vector.
Returns
A vector containing the conjugate of each input element.

◆ imag()

template<vec_complex _Vc>
auto xvec::simd::imag ( const _Vc & value)
constexpr

Extract the imaginary component of each complex element.

Template Parameters
_VcThe complex vector type.
Parameters
valueThe input vector.
Returns
A real-valued vector containing the corresponding imaginary components.

◆ norm()

template<vec_complex _Vc>
auto xvec::simd::norm ( const _Vc & value)
constexpr

Compute the squared magnitude of each complex element.

Template Parameters
_VcThe complex vector type.
Parameters
valueThe input vector.
Returns
A real-valued vector containing the squared magnitude of each input element.

◆ real()

template<vec_complex _Vc>
auto xvec::simd::real ( const _Vc & value)
constexpr

Extract the real component of each complex element.

Template Parameters
_VcThe complex vector type.
Parameters
valueThe input vector.
Returns
A real-valued vector containing the corresponding real components.