E.V.E
v2023.02.15
Loading...
Searching...
No Matches
◆
arg
auto eve::arg =
functor
<arg_t>
inline
constexpr
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
}
eve::conditional_expr
Specifies that a type is a Conditional Expression.
Definition
conditional.hpp:28
eve::floating_value
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition
value.hpp:116
eve::logical_value
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition
value.hpp:132
eve::value
The concept value<T> is satisfied if and only if T satisfies either eve::scalar_value or eve::simd_va...
Definition
value.hpp:34
eve::abs
constexpr auto abs
elementwise_callable object computing the absolute value of the parameter.
Definition
abs.hpp:85
eve::absmax
constexpr auto absmax
tuple_callable computing the absolute value of the maximal element.
Definition
absmax.hpp:91
eve::arg
constexpr auto arg
elementwise_callable object computing the phase angle (in radians).
Definition
arg.hpp:75
eve
EVE Main Namespace.
Definition
abi.hpp:18
Parameters
x
:
floating value
argument.
c
:
Conditional expression
masking the operation.
m
:
Logical value
masking the operation.
Return value
Returns
elementwise
the phase angle (in radians) of the input (0 or \(\pi\)) depending of the bit of sign of the input
The operation is performed conditionnaly
.
If the entry is
NaN
the result is
NaN
.
External references
C++ standard reference
Example
// revision 1
#include <eve/module/math.hpp>
#include <iostream>
int
main()
{
eve::wide
wf = { 0.0f, -0.0f, 1.0f, -1.0f,
-0.5f, 0.5f,
eve::inf
(
eve::as<float>
()),
eve::nan
(
eve::as<float>
())};
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"
;
}
eve::nan
constexpr auto nan
Computes the IEEE quiet NaN constant.
Definition
nan.hpp:67
eve::inf
constexpr auto inf
Computes the infinity ieee value.
Definition
inf.hpp:66
eve::as
Lightweight type-wrapper.
Definition
as.hpp:29
eve::ignore_last
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition
conditional.hpp:332
eve::wide
Wrapper for SIMD registers.
Definition
wide.hpp:70
eve