E.V.E
v2022.03.00

◆ int64

eve::int64 = {}
inlineconstexpr

convert a eve::value to a std::int64_t based eve::value.

Defined in Header

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::value T >
as_wide_as<T, std::int64_t> int64(T x) noexcept; //1
template< eve::callable C >
as_wide_as<T, std::int64_t> int64(C x) noexcept; //2
}
constexpr converter_type< std::int64_t > const int64
convert a eve::value to a std::int64_t based eve::value.
Definition: converter.hpp:543
Definition: all_of.hpp:22

Parameters

  • x : argument.

Return value

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

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, 1013, eve::valmax(eve::as<std::int64_t>())};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> int64(pf) = " << eve::int64(pf) << '\n'
<< "<- pi = " << pi << '\n'
<< "-> int64(pi) = " << eve::int64(pi) << '\n';
return 0;
}
constexpr callable_valmax_ valmax
Computes the the greatest representable value.
Definition: valmax.hpp:55
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