E.V.E
v2023.02.15
 
Loading...
Searching...
No Matches

◆ arg

eve::arg = functor<arg_t>
inlineconstexpr

Callable Signatures

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto arg(floating_value auto x) noexcept; // 1
// Lanes masking
constexpr auto abs[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto abs[logical_value auto m](value auto x) noexcept; // 2
// Semantic option
constexpr auto absmax[pedantic](floating_value auto x) noexcept; // 3
}
Specifies that a type is a Conditional Expression.
Definition: conditional.hpp:27
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition: value.hpp:95
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition: value.hpp:107
The concept value<T> is satisfied if and only if T satisfies either eve::scalar_value or eve::simd_va...
Definition: value.hpp:33
constexpr auto absmax
tuple_callable computing the absolute value of the maximal element.
Definition: absmax.hpp:91
constexpr auto abs
elementwise_callable object computing the absolute value of the parameter.
Definition: abs.hpp:85
constexpr auto arg
elementwise_callable object computing the phase angle (in radians).
Definition: arg.hpp:75
EVE Main Namespace.
Definition: abi.hpp:18

Parameters

* `x`: [floating value](@ref eve::floating_value) argument.
* `c`: [Conditional expression](@ref conditional_expr) masking the operation.
* `m`: [Logical value](@ref logical) masking the operation.

Return value

  1. Returns elementwise the phase angle (in radians) of the input (0 or \(\pi\)) depending of the bit of sign of the input
  2. The operation is performed conditionnaly.
  3. If the entry is NaN the result is NaN.

External references

Example

// revision 1
#include <eve/module/math.hpp>
#include <iostream>
int main()
{
eve::wide wf = { 0.0f, -0.0f, 1.0f, -1.0f,
std::cout << "<- wf = " << wf << "\n";
std::cout << "-> arg(wf) = " << eve::arg(wf) << "\n";
std::cout << "-> arg[pedantic](wf) = " << eve::arg[eve::pedantic](wf) << "\n";
std::cout << "-> arg[ignore_last(2)](wf) = " << eve::arg[eve::ignore_last(2)](wf) << "\n";
std::cout << "-> arg[wf != 0.5f](wf) = " << eve::arg[wf != 0.5f](wf) << "\n";
}
constexpr auto nan
Computes the IEEE quiet NaN constant.
Definition: nan.hpp:67
constexpr auto inf
Computes the infinity ieee value.
Definition: inf.hpp:66
Lightweight type-wrapper.
Definition: as.hpp:29
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition: conditional.hpp:304
Wrapper for SIMD registers.
Definition: wide.hpp:71