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

Read or replace the real and imaginary components of vector elements. More...

Functions

constexpr real_type xvec::simd::basic_vec< _Tp, _Abi >::real () const noexcept
 Return the real components of the complex elements.
constexpr real_type xvec::simd::basic_vec< _Tp, _Abi >::imag () const noexcept
 Return the imaginary components of the complex elements.
constexpr void xvec::simd::basic_vec< _Tp, _Abi >::real (const real_type &new_reals) noexcept
 Replace the real component of each complex element.
constexpr void xvec::simd::basic_vec< _Tp, _Abi >::imag (const real_type &new_imags) noexcept
 Replace the imaginary component of each complex element.

Detailed Description

Read or replace the real and imaginary components of vector elements.

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

Function Documentation

◆ imag() [1/2]

template<typename _Tp, typename _Abi>
real_type xvec::simd::basic_vec< _Tp, _Abi >::imag ( ) const
inlineconstexprnoexcept

Return the imaginary components of the complex elements.

Returns
A real-valued vector with the same number of elements.

◆ imag() [2/2]

template<typename _Tp, typename _Abi>
void xvec::simd::basic_vec< _Tp, _Abi >::imag ( const real_type & new_imags)
inlineconstexprnoexcept

Replace the imaginary component of each complex element.

Parameters
new_imagsThe vector supplying the new imaginary components.

◆ real() [1/2]

template<typename _Tp, typename _Abi>
real_type xvec::simd::basic_vec< _Tp, _Abi >::real ( ) const
inlineconstexprnoexcept

Return the real components of the complex elements.

Returns
A real-valued vector with the same number of elements.

◆ real() [2/2]

template<typename _Tp, typename _Abi>
void xvec::simd::basic_vec< _Tp, _Abi >::real ( const real_type & new_reals)
inlineconstexprnoexcept

Replace the real component of each complex element.

Parameters
new_realsThe vector supplying the new real components.