E.V.E
v2022.03.00

◆ uint_

eve::uint_ = {}
inlineconstexpr

convert a eve::value to a unsigned integral based eve::value.

Defined in Header

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::value T >
as_wide_as<T, eve::as_integer_t<T, unsigned>> uint_(T x) noexcept; //1
template< eve::callable C >
as_wide_as<T, , eve::as_integer_t<T, unsigned>> uint_(C x) noexcept; //2
}
constexpr uint_converter const uint_
convert a eve::value to a unsigned integral based eve::value.
Definition: converter.hpp:644
Definition: all_of.hpp:22

Parameters

  • x : argument.

Return value

  • if x is an eve::simd_value, returns a value, of typewide <i_t, cardinal_t<T>>,
  • if x is an eve::scalar_value, returns a value of type i_t,
  • if x is a supported callable a call to uint_(x)(...) is semantically equivalent to uint_(x(...)).

where i_t is eve::as_integral_t<eve::element_type_t<T, unsigned>>

Example

#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {-1.0f, 2.3f, 45000.7f, -10.6f};
wide_it pi = {1, 2, 100, eve::valmax(eve::as<std::int64_t>())};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> int_(pf) = " << eve::int_(pf) << '\n'
<< "<- pi = " << pi << '\n'
<< "-> int_(pi) = " << eve::int_(pi) << '\n';
return 0;
}
constexpr callable_valmax_ valmax
Computes the the greatest representable value.
Definition: valmax.hpp:55
constexpr int_converter const int_
convert a eve::value to a integral based eve::value.
Definition: converter.hpp:595
constexpr callable_pi_ pi
Callable object computing the constant .
Definition: pi.hpp:49
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65