◆ prime_floor
Callable object computing the greater prime integer less or equal to the input. Required header: Members Functions
Definition: value.hpp:63 Parameters
Return value The result element type is the same as the input one unless a converter is applied. A binary search is performed using nth_prime.
auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::prime_floor Parameters
Return value A Callable object so that the expression Supported converters
Supported decoratorsno decorators are supported ExampleSee it live on Compiler Explorer #include <eve/function/prime_floor.hpp>
#include <eve/wide.hpp>
#include <iostream>
#include <iomanip>
int main()
{
using w32_t = eve::wide<std::uint32_t, eve::fixed<8>>;
w32_t pi32 = {2, 6, 6542, 15, 1, 200000, 10000, 1000};
std::cout << "---- simd" << '\n'
<< " <- pi32 = " << pi32 << '\n'
std::uint32_t xi = 18;
std::cout << "---- scalar" << '\n'
<< " xi = " << xi << '\n'
return 0;
}
constexpr callable_prime_floor_ prime_floor Callable object computing the greater prime integer less or equal to the input. Definition: prime_floor.hpp:89 constexpr converter_type< float > const float32 convert a eve::real_value to a float32 based eve::floating_real_value. Definition: converter.hpp:133 |