E.V.E
v2023.02.15

◆ conj

eve::conj = {}
inlineconstexpr

Computes the the conjugate value.

Defined in Header

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::value T >
T conj(T z) noexcept;
}
constexpr callable_conj_ conj
Computes the the conjugate value.
Definition: conj.hpp:61
Definition: abi.hpp:18

Parameters

Return value

Returns the conjugate of its argument. For real inputs the call reduces to identity.

Example

#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {-1.0f, 2.0f, -3.0f, -32768.0f};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> conj(pf) = " << eve::conj(pf) << '\n';
float xf = -32768.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> conj(xf) = " << eve::conj(xf) << '\n';
return 0;
}
Wrapper for SIMD registers.
Definition: wide.hpp:65

Semantic Modifiers

  • Masked Call

    The call eve;conj[mask](x) provides a masked version of eve::conj which is equivalent to if_else (mask, conj(x), x).

    Example

    #include <eve/module/core.hpp>
    #include <eve/wide.hpp>
    #include <iostream>
    int main()
    {
    wide_it pi = {-1, 2, -3, -18};
    std::cout << "---- simd" << '\n'
    << "<- pi = " << pi << '\n'
    << "-> conj[pi > -2](pi) = " << eve::conj[pi > -2](pi) << '\n';
    return 0;
    }
    constexpr callable_pi_ pi
    Callable object computing the constant .
    Definition: pi.hpp:49