◆ gcd
Callable object computing greater common divisor. Required header: Members Functions
Definition: value.hpp:93 Parameters
Return value The result type is the common compatible type of the two parameters.
Supported decoratorsIf the user calls the function with floating parameters, he can enforce the fact that all parameters are flint using one of the roundings decorators on the object function. Namely:
but the computation is optimized when possible
auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::gcd Parameters
Return value A Callable object so that the expression ExampleSee it live on Compiler Explorer #include <eve/function/gcd.hpp>
#include <eve/literals.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
using w_t = eve::wide<float, eve::fixed<4>>;
w_t pi = {93, -25, 32, 368}, qi = {42, 30, 27, 1024};
std::cout << "---- simd" << '\n'
<< " <- qi = " << qi << '\n'
std::uint32_t xi = 18, yi = 60;
std::cout << "---- scalar" << '\n'
<< " xi = " << xi << '\n'
<< " yi = " << yi << '\n'
return 0;
}
constexpr callable_gcd_ gcd Callable object computing greater common divisor. Definition: gcd.hpp:82 |