diff --git a/benchmarks/module/bessel/cyl_bessel_j1/regular/cyl_bessel_j1.hpp b/benchmarks/module/bessel/cyl_bessel_j1/regular/cyl_bessel_j1.hpp index 2be9cf1446..4e24aea302 100644 --- a/benchmarks/module/bessel/cyl_bessel_j1/regular/cyl_bessel_j1.hpp +++ b/benchmarks/module/bessel/cyl_bessel_j1/regular/cyl_bessel_j1.hpp @@ -16,11 +16,11 @@ int main() auto lmax = EVE_VALUE(10); auto arg0 = eve::bench::random_(lmin,lmax); -// auto stdj1 = [](auto x){return std::cyl_bessel_j(0, x);}; + auto stdj1 = [](auto x){return std::cyl_bessel_j(1, x);}; auto boostj1= [](auto x){return boost::math::detail::bessel_j1(x);}; eve::bench::experiment xp; run (EVE_NAME(cyl_bessel_j1) , xp, eve::cyl_bessel_j1 , arg0); run(EVE_NAME(cyl_bessel_j1) , xp, eve::cyl_bessel_j1 , arg0); -// run(EVE_NAME(stdj1) , xp, stdj1 , arg0); + run(EVE_NAME(stdj1) , xp, stdj1 , arg0); run(EVE_NAME(boostj1), xp, boostj1 , arg0); } diff --git a/benchmarks/module/combinatorial/gcd/regular/gcd.hpp b/benchmarks/module/combinatorial/gcd/regular/gcd.hpp index 04c4466177..5268b7abcc 100644 --- a/benchmarks/module/combinatorial/gcd/regular/gcd.hpp +++ b/benchmarks/module/combinatorial/gcd/regular/gcd.hpp @@ -11,14 +11,8 @@ int main() { - auto lmin = 1; //eve::valmin(eve::as()); - auto lmax = 100; //eve::valmax(eve::as()); -// if constexpr(std::is_floating_point_v) -// { -// lmin = -100000; -// lmax = 100000; -// } - + auto lmin = 1; + auto lmax = 100; auto arg0 = eve::bench::random_(lmin,lmax); auto arg1 = eve::bench::random_(lmin,lmax); diff --git a/benchmarks/module/core/arg/pedantic/arg.hpp b/benchmarks/module/core/arg/pedantic/arg.hpp index 63faa57cb1..05059a66c2 100644 --- a/benchmarks/module/core/arg/pedantic/arg.hpp +++ b/benchmarks/module/core/arg/pedantic/arg.hpp @@ -16,6 +16,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run (EVE_NAME(pedantic(eve::arg)) , xp, eve::pedantic(eve::arg), arg0); - run (EVE_NAME(pedantic(eve::arg)) , xp, eve::pedantic(eve::arg), arg0); + run (EVE_NAME(arg[eve::pedantic2]) , xp, eve::arg[eve::pedantic2], arg0); + run (EVE_NAME(arg[eve::pedantic2]) , xp, eve::arg[eve::pedantic2], arg0); } diff --git a/benchmarks/module/core/bit_cast/regular/bit_cast.hpp b/benchmarks/module/core/bit_cast/regular/bit_cast.hpp index 109f7f856a..302a00846c 100644 --- a/benchmarks/module/core/bit_cast/regular/bit_cast.hpp +++ b/benchmarks/module/core/bit_cast/regular/bit_cast.hpp @@ -10,6 +10,7 @@ int main() { + //TODO // auto lmin = eve::valmin(eve::as()); // auto lmax = eve::valmax(eve::as()); diff --git a/benchmarks/module/core/dec/regular/dec.hpp b/benchmarks/module/core/dec/regular/dec.hpp index 27e163c44b..dfed9264bc 100644 --- a/benchmarks/module/core/dec/regular/dec.hpp +++ b/benchmarks/module/core/dec/regular/dec.hpp @@ -13,7 +13,7 @@ int main() auto lmin = eve::valmin(eve::as()); auto lmax = eve::valmax(eve::as()); - auto const std__dec = [](EVE_VALUE x) { return x > 0 ? x : EVE_VALUE(-x); }; + auto const std__dec = [](EVE_VALUE x) { return x > 0 ? x : EVE_VALUE(x)-EVE_VALUE(1); }; auto arg0 = eve::bench::random_(lmin,lmax); diff --git a/benchmarks/module/core/dec/saturated/dec.hpp b/benchmarks/module/core/dec/saturated/dec.hpp index e773bdd107..beb4889157 100644 --- a/benchmarks/module/core/dec/saturated/dec.hpp +++ b/benchmarks/module/core/dec/saturated/dec.hpp @@ -16,6 +16,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run (EVE_NAME(saturated(eve::dec)) , xp, eve::saturated(eve::dec), arg0); - run (EVE_NAME(saturated(eve::dec)) , xp, eve::saturated(eve::dec), arg0); + run (EVE_NAME(saturated(eve::dec)) , xp, eve::dec[eve::saturated2], arg0); + run (EVE_NAME(saturated(eve::dec)) , xp, eve::dec[eve::saturated2], arg0); } diff --git a/benchmarks/module/core/dec/saturated_if/dec.hpp b/benchmarks/module/core/dec/saturated_if/dec.hpp index d76c52caf1..62c1949223 100644 --- a/benchmarks/module/core/dec/saturated_if/dec.hpp +++ b/benchmarks/module/core/dec/saturated_if/dec.hpp @@ -17,7 +17,7 @@ int main() auto arg0 = eve::bench::random_(0, 1); auto arg1 = eve::bench::random_(lmin,lmax); - auto eve__dec = [](auto x, auto y){ return eve::saturated(eve::dec[x])(y); }; + auto eve__dec = [](auto x, auto y){ return eve::dec[x][eve::saturated2](y); }; eve::bench::experiment xp; run> (EVE_NAME(eve__dec) , xp, eve__dec, arg0, arg1); run> (EVE_NAME(eve__dec) , xp, eve__dec, arg0, arg1); diff --git a/benchmarks/module/core/dist/saturated/dist.hpp b/benchmarks/module/core/dist/saturated/dist.hpp index f2f7b015c2..407453f2c6 100644 --- a/benchmarks/module/core/dist/saturated/dist.hpp +++ b/benchmarks/module/core/dist/saturated/dist.hpp @@ -17,6 +17,6 @@ int main() auto arg1 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(dist) , xp, eve::saturated(eve::dist), arg0, arg1); - run (EVE_NAME(dist) , xp, eve::saturated(eve::dist), arg0, arg1); + run(EVE_NAME(dist) , xp, eve::dist[eve::saturated2], arg0, arg1); + run (EVE_NAME(dist) , xp, eve::dist[eve::saturated2], arg0, arg1); } diff --git a/benchmarks/module/core/div/regular/div.hpp b/benchmarks/module/core/div/regular/div.hpp index d55bd68fc0..24249810c8 100644 --- a/benchmarks/module/core/div/regular/div.hpp +++ b/benchmarks/module/core/div/regular/div.hpp @@ -7,14 +7,14 @@ //================================================================================================== #include #include -#include +#include #include int main() { auto lmin = eve::valmin(eve::as()); auto lmax = [](){ - if constexpr(eve::floating_value) return eve::oneotwoeps(eve::as()); + if constexpr(eve::floating_value) return 1/eve::eps(eve::as()); else return eve::valmax(eve::as()); }(); diff --git a/benchmarks/module/core/fma/numeric/fma.hpp b/benchmarks/module/core/fma/numeric/fma.hpp deleted file mode 100644 index c4f4d0435b..0000000000 --- a/benchmarks/module/core/fma/numeric/fma.hpp +++ /dev/null @@ -1,26 +0,0 @@ -//================================================================================================== -/* - EVE - Expressive Vector Engine - Copyright : EVE Project Contributors - SPDX-License-Identifier: BSL-1.0 -*/ -//================================================================================================== -#include -#include - -int main() -{ - auto lmin = eve::valmin(eve::as()); - auto lmax = eve::valmax(eve::as()); - - auto arg0 = eve::bench::random_(lmin,lmax); - auto arg1 = eve::bench::random_(lmin,lmax); - auto arg2 = eve::bench::random_(lmin,lmax); - - auto std__fma = [](EVE_VALUE x, EVE_VALUE y, auto z){return EVE_VALUE(std::fma(x, y, z)); }; - - eve::bench::experiment xp; - run(EVE_NAME(std__fma) , xp, std__fma, arg0, arg1, arg2); - run(EVE_NAME(numeric(eve::fma)) , xp, eve::numeric(eve::fma), arg0, arg1, arg2); - run (EVE_NAME(numeric(eve::fma)) , xp, eve::numeric(eve::fma), arg0, arg1, arg2); -} diff --git a/benchmarks/module/core/fms/numeric/fms.hpp b/benchmarks/module/core/fms/numeric/fms.hpp deleted file mode 100644 index 171d5832ae..0000000000 --- a/benchmarks/module/core/fms/numeric/fms.hpp +++ /dev/null @@ -1,26 +0,0 @@ -//================================================================================================== -/* - EVE - Expressive Vector Engine - Copyright : EVE Project Contributors - SPDX-License-Identifier: BSL-1.0 -*/ -//================================================================================================== -#include -#include - -int main() -{ - auto lmin = eve::valmin(eve::as()); - auto lmax = eve::valmax(eve::as()); - - auto arg0 = eve::bench::random_(lmin,lmax); - auto arg1 = eve::bench::random_(lmin,lmax); - auto arg2 = eve::bench::random_(lmin,lmax); - - auto std__fms = [](EVE_VALUE x, EVE_VALUE y, auto z){return EVE_VALUE(std::fma(x, y, -z)); }; - - eve::bench::experiment xp; - run(EVE_NAME(std__fms) , xp, std__fms, arg0, arg1, arg2); - run(EVE_NAME(numeric(eve::fms)) , xp, eve::numeric(eve::fms), arg0, arg1, arg2); - run (EVE_NAME(numeric(eve::fms)) , xp, eve::numeric(eve::fms), arg0, arg1, arg2); -} diff --git a/benchmarks/module/core/fms/pedantic/fms.hpp b/benchmarks/module/core/fms/pedantic/fms.hpp index e8584577ec..f0b0236b8a 100644 --- a/benchmarks/module/core/fms/pedantic/fms.hpp +++ b/benchmarks/module/core/fms/pedantic/fms.hpp @@ -21,6 +21,6 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__fms) , xp, std__fms, arg0, arg1, arg2); - run(EVE_NAME(pedantic(eve::fms)) , xp, eve::pedantic(eve::fms), arg0, arg1, arg2); - run (EVE_NAME(pedantic(eve::fms)) , xp, eve::pedantic(eve::fms), arg0, arg1, arg2); + run(EVE_NAME(fms[eve::pedantic2]) , xp, eve::fms[eve::pedantic2], arg0, arg1, arg2); + run (EVE_NAME(fms[eve::pedantic2]) , xp, eve::fms[eve::pedantic2], arg0, arg1, arg2); } diff --git a/benchmarks/module/core/fnma/numeric/fnma.hpp b/benchmarks/module/core/fnma/numeric/fnma.hpp deleted file mode 100644 index b42bf7acbc..0000000000 --- a/benchmarks/module/core/fnma/numeric/fnma.hpp +++ /dev/null @@ -1,26 +0,0 @@ -//================================================================================================== -/* - EVE - Expressive Vector Engine - Copyright : EVE Project Contributors - SPDX-License-Identifier: BSL-1.0 -*/ -//================================================================================================== -#include -#include - -int main() -{ - auto lmin = eve::valmin(eve::as()); - auto lmax = eve::valmax(eve::as()); - - auto arg0 = eve::bench::random_(lmin,lmax); - auto arg1 = eve::bench::random_(lmin,lmax); - auto arg2 = eve::bench::random_(lmin,lmax); - - auto std__fnma = [](EVE_VALUE x, EVE_VALUE y, auto z){return EVE_VALUE(std::fma(-x, y, z)); }; - - eve::bench::experiment xp; - run(EVE_NAME(std__fnma) , xp, std__fnma, arg0, arg1, arg2); - run(EVE_NAME(numeric(eve::fnma)) , xp, eve::numeric(eve::fnma), arg0, arg1, arg2); - run (EVE_NAME(numeric(eve::fnma)) , xp, eve::numeric(eve::fnma), arg0, arg1, arg2); -} diff --git a/benchmarks/module/core/fnma/pedantic/fnma.hpp b/benchmarks/module/core/fnma/pedantic/fnma.hpp index 28f4f9005f..0f123311a2 100644 --- a/benchmarks/module/core/fnma/pedantic/fnma.hpp +++ b/benchmarks/module/core/fnma/pedantic/fnma.hpp @@ -21,6 +21,6 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__fnma) , xp, std__fnma, arg0, arg1, arg2); - run(EVE_NAME(pedantic(eve::fnma)) , xp, eve::pedantic(eve::fnma), arg0, arg1, arg2); - run (EVE_NAME(pedantic(eve::fnma)) , xp, eve::pedantic(eve::fnma), arg0, arg1, arg2); + run(EVE_NAME(fnma[eve::pedantic2]) , xp, eve::fnma[eve::pedantic2], arg0, arg1, arg2); + run (EVE_NAME(fnma[eve::pedantic2]) , xp, eve::fnma[eve::pedantic2], arg0, arg1, arg2); } diff --git a/benchmarks/module/core/fnms/numeric/fnms.hpp b/benchmarks/module/core/fnms/numeric/fnms.hpp deleted file mode 100644 index d957c3ab9f..0000000000 --- a/benchmarks/module/core/fnms/numeric/fnms.hpp +++ /dev/null @@ -1,26 +0,0 @@ -//================================================================================================== -/* - EVE - Expressive Vector Engine - Copyright : EVE Project Contributors - SPDX-License-Identifier: BSL-1.0 -*/ -//================================================================================================== -#include -#include - -int main() -{ - auto lmin = eve::valmin(eve::as()); - auto lmax = eve::valmax(eve::as()); - - auto arg0 = eve::bench::random_(lmin,lmax); - auto arg1 = eve::bench::random_(lmin,lmax); - auto arg2 = eve::bench::random_(lmin,lmax); - - auto std__fnms = [](EVE_VALUE x, EVE_VALUE y, auto z){return EVE_VALUE(-std::fma(x, y, z)); }; - - eve::bench::experiment xp; - run(EVE_NAME(std__fnms) , xp, std__fnms, arg0, arg1, arg2); - run(EVE_NAME(numeric(eve::fnms)) , xp, eve::numeric(eve::fnms), arg0, arg1, arg2); - run (EVE_NAME(numeric(eve::fnms)) , xp, eve::numeric(eve::fnms), arg0, arg1, arg2); -} diff --git a/benchmarks/module/core/fnms/pedantic/fnms.hpp b/benchmarks/module/core/fnms/pedantic/fnms.hpp index ed103d6cf1..5e403614a6 100644 --- a/benchmarks/module/core/fnms/pedantic/fnms.hpp +++ b/benchmarks/module/core/fnms/pedantic/fnms.hpp @@ -21,6 +21,6 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__fnms) , xp, std__fnms, arg0, arg1, arg2); - run(EVE_NAME(pedantic(eve::fnms)) , xp, eve::pedantic(eve::fnms), arg0, arg1, arg2); - run (EVE_NAME(pedantic(eve::fnms)) , xp, eve::pedantic(eve::fnms), arg0, arg1, arg2); + run(EVE_NAME(fnms[eve::pedantic2]) , xp, eve::fnms[eve::pedantic2], arg0, arg1, arg2); + run (EVE_NAME(fnms[eve::pedantic2]) , xp, eve::fnms[eve::pedantic2], arg0, arg1, arg2); } diff --git a/benchmarks/module/core/frexp/pedantic/frexp.hpp b/benchmarks/module/core/frexp/pedantic/frexp.hpp index 634b0bc577..eff0e026e5 100644 --- a/benchmarks/module/core/frexp/pedantic/frexp.hpp +++ b/benchmarks/module/core/frexp/pedantic/frexp.hpp @@ -16,6 +16,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run (EVE_NAME(pedantic(eve::frexp)) , xp, eve::pedantic(eve::frexp), arg0); - run (EVE_NAME(pedantic(eve::frexp)) , xp, eve::pedantic(eve::frexp), arg0); + run (EVE_NAME(frexp[eve::pedantic2]) , xp, eve::frexp[eve::pedantic2], arg0); + run (EVE_NAME(frexp[eve::pedantic2]) , xp, eve::frexp[eve::pedantic2], arg0); } diff --git a/benchmarks/module/core/frexp/raw/frexp.hpp b/benchmarks/module/core/frexp/raw/frexp.hpp index 5e44d56e3f..9ecbf69885 100644 --- a/benchmarks/module/core/frexp/raw/frexp.hpp +++ b/benchmarks/module/core/frexp/raw/frexp.hpp @@ -16,6 +16,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run (EVE_NAME(raw(eve::frexp)) , xp, eve::raw(eve::frexp), arg0); - run (EVE_NAME(raw(eve::frexp)) , xp, eve::raw(eve::frexp), arg0); + run (EVE_NAME(frexp[eve::raw2]) , xp, eve::frexp[eve::raw2], arg0); + run (EVE_NAME(frexp[eve::raw2]) , xp, eve::frexp[eve::raw2], arg0); } diff --git a/benchmarks/module/core/ifrexp/pedantic/ifrexp.hpp b/benchmarks/module/core/ifrexp/pedantic/ifrexp.hpp index accf12056b..649f7a6829 100644 --- a/benchmarks/module/core/ifrexp/pedantic/ifrexp.hpp +++ b/benchmarks/module/core/ifrexp/pedantic/ifrexp.hpp @@ -16,6 +16,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run (EVE_NAME(pedantic(eve::ifrexp)) , xp, eve::pedantic(eve::ifrexp), arg0); - run (EVE_NAME(pedantic(eve::ifrexp)) , xp, eve::pedantic(eve::ifrexp), arg0); + run (EVE_NAME(ifrexp[eve::pedantic2]) , xp, eve::ifrexp[eve::pedantic2], arg0); + run (EVE_NAME(ifrexp[eve::pedantic2]) , xp, eve::ifrexp[eve::pedantic2], arg0); } diff --git a/benchmarks/module/core/ifrexp/raw/ifrexp.hpp b/benchmarks/module/core/ifrexp/raw/ifrexp.hpp index 922001bf00..fe6de4b13b 100644 --- a/benchmarks/module/core/ifrexp/raw/ifrexp.hpp +++ b/benchmarks/module/core/ifrexp/raw/ifrexp.hpp @@ -16,6 +16,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run (EVE_NAME(raw(eve::ifrexp)) , xp, eve::raw(eve::ifrexp), arg0); - run (EVE_NAME(raw(eve::ifrexp)) , xp, eve::raw(eve::ifrexp), arg0); + run (EVE_NAME(ifrexp[eve::raw2]) , xp, eve::ifrexp[eve::raw2], arg0); + run (EVE_NAME(ifrexp[eve::raw2]) , xp, eve::ifrexp[eve::raw2], arg0); } diff --git a/benchmarks/module/core/inc/saturated/inc.hpp b/benchmarks/module/core/inc/saturated/inc.hpp index b472db682d..e2956f33ef 100644 --- a/benchmarks/module/core/inc/saturated/inc.hpp +++ b/benchmarks/module/core/inc/saturated/inc.hpp @@ -16,6 +16,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run (EVE_NAME(saturated(eve::inc)) , xp, eve::saturated(eve::inc), arg0); - run (EVE_NAME(saturated(eve::inc)) , xp, eve::saturated(eve::inc), arg0); + run (EVE_NAME(saturated(eve::inc)) , xp, eve::inc[eve::saturated2], arg0); + run (EVE_NAME(saturated(eve::inc)) , xp, eve::inc[eve::saturated2], arg0); } diff --git a/benchmarks/module/core/inc/saturated_if/inc.hpp b/benchmarks/module/core/inc/saturated_if/inc.hpp index d61c397570..205cf18fae 100644 --- a/benchmarks/module/core/inc/saturated_if/inc.hpp +++ b/benchmarks/module/core/inc/saturated_if/inc.hpp @@ -17,7 +17,7 @@ int main() auto arg0 = eve::bench::random_(0, 1); auto arg1 = eve::bench::random_(lmin,lmax); - auto eve__inc = [](auto x, auto y){ return eve::saturated(eve::inc[x])(y); }; + auto eve__inc = [](auto x, auto y){ return eve::inc[x][eve::saturated2](y); }; eve::bench::experiment xp; run> (EVE_NAME(eve__inc) , xp, eve__inc, arg0, arg1); run> (EVE_NAME(eve__inc) , xp, eve__inc, arg0, arg1); diff --git a/benchmarks/module/core/is_flint/pedantic/is_flint.hpp b/benchmarks/module/core/is_flint/pedantic/is_flint.hpp index 439728ca94..31f6d39938 100644 --- a/benchmarks/module/core/is_flint/pedantic/is_flint.hpp +++ b/benchmarks/module/core/is_flint/pedantic/is_flint.hpp @@ -20,6 +20,6 @@ int main() eve::bench::experiment xp; run (EVE_NAME(std__is_flint) , xp, std__is_flint, arg0); - run (EVE_NAME(pedantic(eve::is_flint)) , xp, eve::pedantic(eve::is_flint), arg0); - run (EVE_NAME(pedantic(eve::is_flint)) , xp, eve::pedantic(eve::is_flint), arg0); + run (EVE_NAME(is_flint[eve::pedantic2]) , xp, eve::is_flint[eve::pedantic2], arg0); + run (EVE_NAME(is_flint[eve::pedantic2]) , xp, eve::is_flint[eve::pedantic2], arg0); } diff --git a/benchmarks/module/core/ldexp/pedantic/ldexp.hpp b/benchmarks/module/core/ldexp/pedantic/ldexp.hpp index efedea56d0..750f6d3660 100644 --- a/benchmarks/module/core/ldexp/pedantic/ldexp.hpp +++ b/benchmarks/module/core/ldexp/pedantic/ldexp.hpp @@ -24,9 +24,9 @@ int main() eve::bench::experiment xp; run>(EVE_NAME(std__ldexp) , xp, std__ldexp, arg0, arg1); - run>(EVE_NAME(eve::pedantic(eve::ldexp)) , xp, eve::pedantic(eve::ldexp), arg0, arg1); - run> (EVE_NAME(eve::pedantic(eve::ldexp)) , xp, eve::pedantic(eve::ldexp), arg0, arg1); - run> (EVE_NAME(eve::pedantic(eve::ldexp)) , xp, eve::pedantic(eve::ldexp), arg0, arg1); + run>(EVE_NAME(eve::ldexp[eve::pedantic2]) , xp, eve::ldexp[eve::pedantic2], arg0, arg1); + run> (EVE_NAME(eve::ldexp[eve::pedantic2]) , xp, eve::ldexp[eve::pedantic2], arg0, arg1); + run> (EVE_NAME(eve::ldexp[eve::pedantic2]) , xp, eve::ldexp[eve::pedantic2], arg0, arg1); } diff --git a/benchmarks/module/core/logical_not/regular/logical_not.hpp b/benchmarks/module/core/logical_not/regular/logical_not.hpp index 2bb1b5ef7c..a7b52be89d 100644 --- a/benchmarks/module/core/logical_not/regular/logical_not.hpp +++ b/benchmarks/module/core/logical_not/regular/logical_not.hpp @@ -10,15 +10,19 @@ int main() { - auto lmin = eve::valmin(eve::as()); - auto lmax = eve::valmax(eve::as()); + // TODO +// auto lmin = eve::valmin(eve::as()); +// auto lmax = eve::valmax(eve::as()); - auto arg0 = eve::bench::random_(lmin,lmax); +// auto arg0 = eve::bench::random_(lmin,lmax); - eve::bench::experiment xp; - auto const std__logical_not = [](auto x) { return EVE_VALUE(!x); }; - run (EVE_NAME(std__logical_not) , xp, std__logical_not, arg0); +// eve::bench::experiment xp; +// if constexpr(eve::integral_value) +// { +// auto const std__logical_not = [](auto x) { return EVE_VALUE(!x); }; +// run (EVE_NAME(std__logical_not) , xp, std__logical_not, arg0); - run (EVE_NAME(logical_not) , xp, eve::logical_not, arg0); - run (EVE_NAME(logical_not) , xp, eve::logical_not, arg0); +// run (EVE_NAME(logical_not) , xp, eve::logical_not, arg0); +// run (EVE_NAME(logical_not) , xp, eve::logical_not, arg0); +// } } diff --git a/benchmarks/module/core/lookup/regular/lookup.hpp b/benchmarks/module/core/lookup/regular/lookup.hpp index 819bfe42dc..3a5cd7f6df 100644 --- a/benchmarks/module/core/lookup/regular/lookup.hpp +++ b/benchmarks/module/core/lookup/regular/lookup.hpp @@ -10,18 +10,19 @@ int main() { - using I_VALUE = eve::as_integer_t; - using I_TYPE = eve::as_integer_t; - auto lmin = eve::valmin(eve::as()); - auto lmax = eve::valmax(eve::as()); - auto smin = I_VALUE(0); - auto smax = I_VALUE(sizeof(EVE_VALUE)-1); + //TODO +// using I_VALUE = eve::as_integer_t; +// using I_TYPE = eve::as_integer_t; +// auto lmin = eve::valmin(eve::as()); +// auto lmax = eve::valmax(eve::as()); +// auto smin = I_VALUE(0); +// auto smax = I_VALUE(sizeof(EVE_VALUE)-1); - auto arg0 = eve::bench::random_(lmin,lmax); - auto arg1 = eve::bench::random_(smin,smax); +// auto arg0 = eve::bench::random_(lmin,lmax); +// auto arg1 = eve::bench::random_(smin,smax); - eve::bench::experiment xp; - run> (EVE_NAME(lookup) , xp, eve::lookup, arg0, arg1); +// eve::bench::experiment xp; +// run> (EVE_NAME(lookup) , xp, eve::lookup, arg0, arg1); } diff --git a/benchmarks/module/core/manhattan/pedantic/manhattan.hpp b/benchmarks/module/core/manhattan/pedantic/manhattan.hpp index 0bc89b57f1..bc9225275f 100644 --- a/benchmarks/module/core/manhattan/pedantic/manhattan.hpp +++ b/benchmarks/module/core/manhattan/pedantic/manhattan.hpp @@ -17,6 +17,6 @@ int main() auto arg1 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(pedantic(eve::manhattan)) , xp, eve::pedantic(eve::manhattan), arg0, arg1); - run (EVE_NAME(pedantic(eve::manhattan)) , xp, eve::pedantic(eve::manhattan), arg0, arg1); + run(EVE_NAME(manhattan[eve::pedantic2]) , xp, eve::manhattan[eve::pedantic2], arg0, arg1); + run (EVE_NAME(manhattan[eve::pedantic2]) , xp, eve::manhattan[eve::pedantic2], arg0, arg1); } diff --git a/benchmarks/module/core/max/numeric/max.hpp b/benchmarks/module/core/max/numeric/max.hpp index 642a4527a9..cca93cb72f 100644 --- a/benchmarks/module/core/max/numeric/max.hpp +++ b/benchmarks/module/core/max/numeric/max.hpp @@ -20,6 +20,6 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__max) , xp, std__max, arg0, arg1); - run(EVE_NAME(numeric(eve::max)) , xp, eve::numeric(eve::max), arg0, arg1); - run (EVE_NAME(numeric(eve::max)) , xp, eve::numeric(eve::max), arg0, arg1); + run(EVE_NAME(max[eve::numeric2]) , xp, eve::max[eve::numeric2], arg0, arg1); + run (EVE_NAME(max[eve::numeric2]) , xp, eve::max[eve::numeric2], arg0, arg1); } diff --git a/benchmarks/module/core/max/pedantic/max.hpp b/benchmarks/module/core/max/pedantic/max.hpp index d521a50c9a..acc368eabd 100644 --- a/benchmarks/module/core/max/pedantic/max.hpp +++ b/benchmarks/module/core/max/pedantic/max.hpp @@ -20,6 +20,6 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__max) , xp, std__max, arg0, arg1); - run(EVE_NAME(pedantic(eve::max)) , xp, eve::pedantic(eve::max), arg0, arg1); - run (EVE_NAME(pedantic(eve::max)) , xp, eve::pedantic(eve::max), arg0, arg1); + run(EVE_NAME(max[eve::pedantic2]) , xp, eve::max[eve::pedantic2], arg0, arg1); + run (EVE_NAME(max[eve::pedantic2]) , xp, eve::max[eve::pedantic2], arg0, arg1); } diff --git a/benchmarks/module/core/maxmag/numeric/maxmag.hpp b/benchmarks/module/core/maxmag/numeric/maxmag.hpp index 5c8db610a4..532af2faf7 100644 --- a/benchmarks/module/core/maxmag/numeric/maxmag.hpp +++ b/benchmarks/module/core/maxmag/numeric/maxmag.hpp @@ -18,6 +18,6 @@ int main() eve::bench::experiment xp; - run(EVE_NAME(numeric(eve::maxmag)) , xp, eve::numeric(eve::maxmag), arg0, arg1); - run (EVE_NAME(numeric(eve::maxmag)) , xp, eve::numeric(eve::maxmag), arg0, arg1); + run(EVE_NAME(maxmag[eve::numeric2]) , xp, eve::maxmag[eve::numeric2], arg0, arg1); + run (EVE_NAME(maxmag[eve::numeric2]) , xp, eve::maxmag[eve::numeric2], arg0, arg1); } diff --git a/benchmarks/module/core/maxmag/pedantic/maxmag.hpp b/benchmarks/module/core/maxmag/pedantic/maxmag.hpp index 056170d379..0cdef7c258 100644 --- a/benchmarks/module/core/maxmag/pedantic/maxmag.hpp +++ b/benchmarks/module/core/maxmag/pedantic/maxmag.hpp @@ -17,6 +17,6 @@ int main() auto arg1 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(pedantic(eve::maxmag)) , xp, eve::pedantic(eve::maxmag), arg0, arg1); - run (EVE_NAME(pedantic(eve::maxmag)) , xp, eve::pedantic(eve::maxmag), arg0, arg1); + run(EVE_NAME(maxmag[eve::pedantic2]) , xp, eve::maxmag[eve::pedantic2], arg0, arg1); + run (EVE_NAME(maxmag[eve::pedantic2]) , xp, eve::maxmag[eve::pedantic2], arg0, arg1); } diff --git a/benchmarks/module/core/min/numeric/min.hpp b/benchmarks/module/core/min/numeric/min.hpp index b89ede1aa3..9a89011d21 100644 --- a/benchmarks/module/core/min/numeric/min.hpp +++ b/benchmarks/module/core/min/numeric/min.hpp @@ -19,6 +19,6 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__min) , xp, std__min, arg0, arg1); - run(EVE_NAME(numeric(eve::min)) , xp, eve::numeric(eve::min), arg0, arg1); - run (EVE_NAME(numeric(eve::min)) , xp, eve::numeric(eve::min), arg0, arg1); + run(EVE_NAME(min[eve::numeric2]) , xp, eve::min[eve::numeric2], arg0, arg1); + run (EVE_NAME(min[eve::numeric2]) , xp, eve::min[eve::numeric2], arg0, arg1); } diff --git a/benchmarks/module/core/min/pedantic/min.hpp b/benchmarks/module/core/min/pedantic/min.hpp index 10ead4881f..87ad0bfd5b 100644 --- a/benchmarks/module/core/min/pedantic/min.hpp +++ b/benchmarks/module/core/min/pedantic/min.hpp @@ -19,6 +19,6 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__min) , xp, std__min, arg0, arg1); - run(EVE_NAME(pedantic(eve::min)) , xp, eve::pedantic(eve::min), arg0, arg1); - run (EVE_NAME(pedantic(eve::min)) , xp, eve::pedantic(eve::min), arg0, arg1); + run(EVE_NAME(min[eve::pedantic2]) , xp, eve::min[eve::pedantic2], arg0, arg1); + run (EVE_NAME(min[eve::pedantic2]) , xp, eve::min[eve::pedantic2], arg0, arg1); } diff --git a/benchmarks/module/core/minmag/numeric/minmag.hpp b/benchmarks/module/core/minmag/numeric/minmag.hpp index 62a20d5333..aa7b7eac2a 100644 --- a/benchmarks/module/core/minmag/numeric/minmag.hpp +++ b/benchmarks/module/core/minmag/numeric/minmag.hpp @@ -18,6 +18,6 @@ int main() eve::bench::experiment xp; - run(EVE_NAME(numeric(eve::minmag)) , xp, eve::numeric(eve::minmag), arg0, arg1); - run (EVE_NAME(numeric(eve::minmag)) , xp, eve::numeric(eve::minmag), arg0, arg1); + run(EVE_NAME(minmag[eve::numeric2]) , xp, eve::minmag[eve::numeric2], arg0, arg1); + run (EVE_NAME(minmag[eve::numeric2]) , xp, eve::minmag[eve::numeric2], arg0, arg1); } diff --git a/benchmarks/module/core/minmag/pedantic/minmag.hpp b/benchmarks/module/core/minmag/pedantic/minmag.hpp index 4a77a81a9e..b6cd80fddb 100644 --- a/benchmarks/module/core/minmag/pedantic/minmag.hpp +++ b/benchmarks/module/core/minmag/pedantic/minmag.hpp @@ -17,6 +17,6 @@ int main() auto arg1 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(pedantic(eve::minmag)) , xp, eve::pedantic(eve::minmag), arg0, arg1); - run (EVE_NAME(pedantic(eve::minmag)) , xp, eve::pedantic(eve::minmag), arg0, arg1); + run(EVE_NAME(minmag[eve::pedantic2]) , xp, eve::minmag[eve::pedantic2], arg0, arg1); + run (EVE_NAME(minmag[eve::pedantic2]) , xp, eve::minmag[eve::pedantic2], arg0, arg1); } diff --git a/benchmarks/module/core/minus/regular_if/minus.hpp b/benchmarks/module/core/minus/regular_if/minus.hpp index c6fbe0e860..156f8586a3 100644 --- a/benchmarks/module/core/minus/regular_if/minus.hpp +++ b/benchmarks/module/core/minus/regular_if/minus.hpp @@ -13,10 +13,10 @@ int main() auto lmin = eve::valmin(eve::as()); auto lmax = eve::valmax(eve::as()); - auto const std__minus = [](EVE_VALUE x, EVE_VALUE y) { return x ? EVE_VALUE(-y):y; }; - auto eve__minus = [](auto x, auto y){ return eve::minus[x](y); }; + auto const std__minus = [](EVE_VALUE x, EVE_VALUE y) { return x > 0? EVE_VALUE(-y):y; }; + auto eve__minus = [](auto x, auto y){ return eve::minus[x > 0](y); }; - auto arg0 = eve::bench::random_(0, 1); + auto arg0 = eve::bench::random_(-1, 1); auto arg1 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; diff --git a/benchmarks/module/core/rec/raw/rec.hpp b/benchmarks/module/core/rec/raw/rec.hpp index 9996f95f7c..bee9d3c455 100644 --- a/benchmarks/module/core/rec/raw/rec.hpp +++ b/benchmarks/module/core/rec/raw/rec.hpp @@ -7,13 +7,13 @@ //================================================================================================== #include #include -#include +#include #include int main() { auto lmax = [](){ - if constexpr(eve::floating_value) return eve::oneotwoeps(eve::as()); + if constexpr(eve::floating_value) return 2/eve::eps(eve::as()); else return eve::valmax(eve::as()); }(); auto lmin = EVE_VALUE(1); diff --git a/benchmarks/module/core/rec/regular/rec.hpp b/benchmarks/module/core/rec/regular/rec.hpp index 66b230f93d..c6f23aaa6b 100644 --- a/benchmarks/module/core/rec/regular/rec.hpp +++ b/benchmarks/module/core/rec/regular/rec.hpp @@ -7,13 +7,13 @@ //================================================================================================== #include #include -#include +#include #include int main() { auto lmax = [](){ - if constexpr(eve::floating_value) return eve::oneotwoeps(eve::as()); + if constexpr(eve::floating_value) return 2/eve::eps(eve::as()); else return eve::valmax(eve::as()); }(); auto lmin = EVE_VALUE(1); diff --git a/benchmarks/module/core/rempio2/regular/rempio2.hpp b/benchmarks/module/core/rempio2/regular/rempio2.hpp deleted file mode 100644 index fb024e50cf..0000000000 --- a/benchmarks/module/core/rempio2/regular/rempio2.hpp +++ /dev/null @@ -1,26 +0,0 @@ -//================================================================================================== -/* - EVE - Expressive Vector Engine - Copyright : EVE Project Contributors - SPDX-License-Identifier: BSL-1.0 -*/ -//================================================================================================== -#include -#include - -int main() -{ - auto lmin = EVE_VALUE(-1000000); - auto lmax = EVE_VALUE(1000000); - - auto const std__rempio2 = [](EVE_VALUE x) { return eve::rem_pio2(x); }; - - auto arg0 = eve::bench::random_(lmin,lmax); - - eve::bench::experiment xp; - run (EVE_NAME(std__rempio2) , xp, std__rempio2, arg0); - run (EVE_NAME(big_(rempio2)) , xp, eve::big_(eve::rempio2), arg0); - run (EVE_NAME(big_(rempio2)) , xp, eve::big_(eve::rempio2), arg0); - run (EVE_NAME(medium_(rempio2)) , xp, eve::medium_(eve::rempio2), arg0); - run (EVE_NAME(medium_(rempio2)) , xp, eve::medium_(eve::rempio2), arg0); -} diff --git a/benchmarks/module/core/rsqrt/pedantic/rsqrt.hpp b/benchmarks/module/core/rsqrt/pedantic/rsqrt.hpp index df6952019e..3dbeb99ab4 100644 --- a/benchmarks/module/core/rsqrt/pedantic/rsqrt.hpp +++ b/benchmarks/module/core/rsqrt/pedantic/rsqrt.hpp @@ -7,13 +7,13 @@ //================================================================================================== #include #include -#include +#include #include int main() { auto lmax = [](){ - if constexpr(eve::floating_value) return eve::oneotwoeps(eve::as()); + if constexpr(eve::floating_value) return 2/eve::eps(eve::as()); else return eve::valmax(eve::as()); }(); auto lmin = EVE_VALUE(0); diff --git a/benchmarks/module/core/rsqrt/regular/rsqrt.hpp b/benchmarks/module/core/rsqrt/regular/rsqrt.hpp index 934bcb1dc6..2afc1d7c2b 100644 --- a/benchmarks/module/core/rsqrt/regular/rsqrt.hpp +++ b/benchmarks/module/core/rsqrt/regular/rsqrt.hpp @@ -7,13 +7,13 @@ //================================================================================================== #include #include -#include +#include #include int main() { auto lmax = [](){ - if constexpr(eve::floating_value) return eve::oneotwoeps(eve::as()); + if constexpr(eve::floating_value) return 2/eve::eps(eve::as()); else return eve::valmax(eve::as()); }(); auto lmin = EVE_VALUE(0); diff --git a/benchmarks/module/core/sqrt/raw/sqrt.hpp b/benchmarks/module/core/sqrt/raw/sqrt.hpp index c0ddd7970b..263d32cfbf 100644 --- a/benchmarks/module/core/sqrt/raw/sqrt.hpp +++ b/benchmarks/module/core/sqrt/raw/sqrt.hpp @@ -7,13 +7,13 @@ //================================================================================================== #include #include -#include +#include #include int main() { auto lmax = [](){ - if constexpr(eve::floating_value) return eve::oneotwoeps(eve::as()); + if constexpr(eve::floating_value) return 2/eve::eps(eve::as()); else return eve::valmax(eve::as()); }(); auto lmin = EVE_VALUE(0); diff --git a/benchmarks/module/core/sqrt/regular/sqrt.hpp b/benchmarks/module/core/sqrt/regular/sqrt.hpp index 2b24965a71..92df732d38 100644 --- a/benchmarks/module/core/sqrt/regular/sqrt.hpp +++ b/benchmarks/module/core/sqrt/regular/sqrt.hpp @@ -7,13 +7,13 @@ //================================================================================================== #include #include -#include +#include #include int main() { auto lmax = [](){ - if constexpr(eve::floating_value) return eve::oneotwoeps(eve::as()); + if constexpr(eve::floating_value) return 2/eve::eps(eve::as()); else return eve::valmax(eve::as()); }(); auto lmin = EVE_VALUE(0); diff --git a/benchmarks/module/math/acos/raw/acos.hpp b/benchmarks/module/math/acos/raw/acos.hpp index f2a174a654..ea885ba406 100644 --- a/benchmarks/module/math/acos/raw/acos.hpp +++ b/benchmarks/module/math/acos/raw/acos.hpp @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__acos) , xp, std__acos , arg0); - run(EVE_NAME(raw(eve::acos)) , xp, eve::acos[eve::raw]) , arg0); - run (EVE_NAME(raw(eve::acos)) , xp, eve::acos[eve::raw]) , arg0); + run(EVE_NAME(acos[eve::raw2]) , xp, eve::acos[eve::raw2] , arg0); + run (EVE_NAME(acos[eve::raw2]) , xp, eve::acos[eve::raw2] , arg0); } diff --git a/benchmarks/module/math/acosd/raw/acosd.hpp b/benchmarks/module/math/acosd/raw/acosd.hpp index 0f04074d03..365c819537 100644 --- a/benchmarks/module/math/acosd/raw/acosd.hpp +++ b/benchmarks/module/math/acosd/raw/acosd.hpp @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__acosd) , xp, std__acosd , arg0); - run(EVE_NAME(eve::acosd[eve::raw]) , xp, eve::acosd[eve::raw]) , arg0); - run (EVE_NAME(eve::acosd[eve::raw]) , xp, eve::acosd[eve::raw]) , arg0); + run(EVE_NAME(eve::acosd[eve::raw2]) , xp, eve::acosd[eve::raw2] , arg0); + run (EVE_NAME(eve::acosd[eve::raw2]) , xp, eve::acosd[eve::raw2] , arg0); } diff --git a/benchmarks/module/math/acospi/raw/acospi.hpp b/benchmarks/module/math/acospi/raw/acospi.hpp index 95359039b3..8a460f5678 100644 --- a/benchmarks/module/math/acospi/raw/acospi.hpp +++ b/benchmarks/module/math/acospi/raw/acospi.hpp @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__acospi) , xp, std__acospi , arg0); - run(EVE_NAME(eve::acospi[raw]) , xp, eve::acospi[eve::raw]) , arg0); - run (EVE_NAME(eve::acospi[raw]) , xp, eve::acospi[eve::raw]) , arg0); + run(EVE_NAME(eve::acospi[raw2]) , xp, eve::acospi[eve::raw2] , arg0); + run (EVE_NAME(eve::acospi[raw2]) , xp, eve::acospi[eve::raw2] , arg0); } diff --git a/benchmarks/module/math/acsch/regular/acsch.hpp b/benchmarks/module/math/acsch/regular/acsch.hpp index 1ba285a491..198c9b4609 100644 --- a/benchmarks/module/math/acsch/regular/acsch.hpp +++ b/benchmarks/module/math/acsch/regular/acsch.hpp @@ -12,10 +12,8 @@ int main() { -// auto lmin = EVE_VALUE(eve::valmin(eve::as())); -// auto lmax = EVE_VALUE(eve::valmax(eve::as())); - auto lmin = EVE_VALUE(-eve::oneotwoeps(eve::as())); //EVE_VALUE(eve::valmin(eve::as())); - auto lmax = EVE_VALUE(eve::oneotwoeps(eve::as())); // EVE_VALUE(eve::valmax(eve::as())); + auto lmin = EVE_VALUE(-eve::oneotwoeps(eve::as())); + auto lmax = EVE_VALUE(eve::oneotwoeps(eve::as())); auto arg0 = eve::bench::random_(lmin,lmax); auto std__acsch = [](auto x){return std::asinh(1/x);}; diff --git a/benchmarks/module/math/atan2/pedantic/atan2.hpp b/benchmarks/module/math/atan2/pedantic/atan2.hpp index ca64338b72..2ec7d51552 100644 --- a/benchmarks/module/math/atan2/pedantic/atan2.hpp +++ b/benchmarks/module/math/atan2/pedantic/atan2.hpp @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__atan2) , xp, std__atan2 , arg0, arg1); - run(EVE_NAME(pedantic(eve::atan2)) , xp, eve::pedantic(eve::atan2) , arg0, arg1); - run (EVE_NAME(pedantic(eve::atan2)) , xp, eve::pedantic(eve::atan2) , arg0, arg1); + run(EVE_NAME(atan2[eve::pedantic2]) , xp, eve::atan2[eve::pedantic2] , arg0, arg1); + run (EVE_NAME(atan2[eve::pedantic2]) , xp, eve::atan2[eve::pedantic2] , arg0, arg1); } diff --git a/benchmarks/module/math/atan2d/pedantic/atan2d.hpp b/benchmarks/module/math/atan2d/pedantic/atan2d.hpp index 11a106aab6..9effecb9e4 100644 --- a/benchmarks/module/math/atan2d/pedantic/atan2d.hpp +++ b/benchmarks/module/math/atan2d/pedantic/atan2d.hpp @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__atan2d) , xp, std__atan2d , arg0, arg1); - run(EVE_NAME(pedantic(eve::atan2d)) , xp, eve::pedantic(eve::atan2d) , arg0, arg1); - run (EVE_NAME(pedantic(eve::atan2d)) , xp, eve::pedantic(eve::atan2d) , arg0, arg1); + run(EVE_NAME(atan2d[eve::pedantic2]) , xp, eve::atan2d[eve::pedantic2] , arg0, arg1); + run (EVE_NAME(atan2d[eve::pedantic2]) , xp, eve::atan2d[eve::pedantic2] , arg0, arg1); } diff --git a/benchmarks/module/math/atan2pi/pedantic/atan2pi.hpp b/benchmarks/module/math/atan2pi/pedantic/atan2pi.hpp index abc825a5ca..a9be8ce000 100644 --- a/benchmarks/module/math/atan2pi/pedantic/atan2pi.hpp +++ b/benchmarks/module/math/atan2pi/pedantic/atan2pi.hpp @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__atan2pi) , xp, std__atan2pi , arg0, arg1); - run(EVE_NAME(pedantic(eve::atan2pi)) , xp, eve::pedantic(eve::atan2pi) , arg0, arg1); - run (EVE_NAME(pedantic(eve::atan2pi)) , xp, eve::pedantic(eve::atan2pi) , arg0, arg1); + run(EVE_NAME(atan2pi[eve::pedantic2]) , xp, eve::atan2pi[eve::pedantic2] , arg0, arg1); + run (EVE_NAME(atan2pi[eve::pedantic2]) , xp, eve::atan2pi[eve::pedantic2] , arg0, arg1); } diff --git a/benchmarks/module/core/rempio2/plain/rmepio2.hpp b/benchmarks/module/math/cos/big/cos.hpp similarity index 53% rename from benchmarks/module/core/rempio2/plain/rmepio2.hpp rename to benchmarks/module/math/cos/big/cos.hpp index b8bf8d0e71..0bca09410d 100644 --- a/benchmarks/module/core/rempio2/plain/rmepio2.hpp +++ b/benchmarks/module/math/cos/big/cos.hpp @@ -6,16 +6,19 @@ */ //================================================================================================== #include +#include #include int main() { - auto lmin = eve::valmin(eve::as()); - auto lmax = eve::valmax(eve::as()); + auto lmin = EVE_VALUE(eve::valmin(eve::as())); + auto lmax = EVE_VALUE(eve::valmax(eve::as())); auto arg0 = eve::bench::random_(lmin,lmax); + auto std__cos = [](auto x){return std::cos(x);}; eve::bench::experiment xp; - run (EVE_NAME(saturated_(eve::abs)) , xp, eve::saturated_(eve::abs), arg0); - run (EVE_NAME(saturated_(eve::abs)) , xp, eve::saturated_(eve::abs), arg0); + run(EVE_NAME(std__cos) , xp, std__cos , arg0); + run(EVE_NAME(cos[big2]) , xp, eve::cos[eve::big2] , arg0); + run (EVE_NAME(cos[big2]) , xp, eve::cos[eve::big2] , arg0); } diff --git a/benchmarks/module/math/cos/full_circle/cos.hpp b/benchmarks/module/math/cos/full_circle/cos.hpp index a81bd4ad6d..94b8b9456f 100644 --- a/benchmarks/module/math/cos/full_circle/cos.hpp +++ b/benchmarks/module/math/cos/full_circle/cos.hpp @@ -19,8 +19,8 @@ int main() eve::bench::experiment xp; run(EVE_NAME(scalar std::cos) , xp, std__cos , arg0); - run(EVE_NAME(full_circle(cos)) , xp, eve::full_circle(eve::cos), arg0); - run(EVE_NAME(full_circle(cos)) , xp, eve::full_circle(eve::cos), arg0); + run(EVE_NAME(full_circle(cos)) , xp, eve::cos[eve::full_circle2], arg0); + run(EVE_NAME(full_circle(cos)) , xp, eve::cos[eve::full_circle2], arg0); run(EVE_NAME(eve::cos) , xp, eve::cos , arg0); run(EVE_NAME(eve::cos) , xp, eve::cos , arg0); } diff --git a/benchmarks/module/math/cos/half_circle/cos.hpp b/benchmarks/module/math/cos/half_circle/cos.hpp index cc93c35845..0e617238a4 100644 --- a/benchmarks/module/math/cos/half_circle/cos.hpp +++ b/benchmarks/module/math/cos/half_circle/cos.hpp @@ -12,7 +12,7 @@ int main() { - auto lmax = eve::detail::Rempio2_limit(eve::half_circle_type(), eve::as()); + auto lmax = eve::Rempio2_limit[eve::half_circle2](eve::as()); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); @@ -20,8 +20,8 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__cos) , xp, std__cos , arg0); - run(EVE_NAME(half_circle(eve::cos)) , xp, eve::half_circle(eve::cos) , arg0); - run (EVE_NAME(half_circle(eve::cos)) , xp, eve::half_circle(eve::cos) , arg0); + run(EVE_NAME(cos[eve::half_circle2]) , xp, eve::cos[eve::half_circle2] , arg0); + run (EVE_NAME(cos[eve::half_circle2]) , xp, eve::cos[eve::half_circle2] , arg0); run(EVE_NAME(eve::cos) , xp, eve::cos , arg0); run(EVE_NAME(eve::cos) , xp, eve::cos , arg0); diff --git a/benchmarks/module/math/cos/medium/cos.hpp b/benchmarks/module/math/cos/medium/cos.hpp new file mode 100644 index 0000000000..3c95922206 --- /dev/null +++ b/benchmarks/module/math/cos/medium/cos.hpp @@ -0,0 +1,26 @@ +//================================================================================================== +/* + EVE - Expressive Vector Engine + Copyright : EVE Project Contributors + SPDX-License-Identifier: BSL-1.0 +*/ +//================================================================================================== +#include +#include +#include + +int main() +{ + auto lmax = eve::Rempio2_limit[eve::medium2](eve::as()); + auto lmin = -lmax; + + auto arg0 = eve::bench::random_(lmin, lmax); + auto std__cos = [](auto x){return std::cos(x);}; + + eve::bench::experiment xp; + run(EVE_NAME(scalar std::cos) , xp, std__cos , arg0); + run(EVE_NAME(cos[eve::medium2]) , xp, eve::cos[eve::medium2], arg0); + run(EVE_NAME(cos[eve::medium2]) , xp, eve::cos[eve::medium2], arg0); + run(EVE_NAME(cos) , xp, eve::cos , arg0); + run(EVE_NAME(cos) , xp, eve::cos , arg0); +} diff --git a/benchmarks/module/math/cos/quarter_circle/cos.hpp b/benchmarks/module/math/cos/quarter_circle/cos.hpp index 94c39a5f64..bde890fa9c 100644 --- a/benchmarks/module/math/cos/quarter_circle/cos.hpp +++ b/benchmarks/module/math/cos/quarter_circle/cos.hpp @@ -19,8 +19,8 @@ int main() eve::bench::experiment xp; run(EVE_NAME(scalar std::cos) , xp, std__cos , arg0); - run(EVE_NAME(quarter_circle(cos)) , xp, eve::quarter_circle(eve::cos), arg0); - run(EVE_NAME(quarter_circle(cos)) , xp, eve::quarter_circle(eve::cos), arg0); + run(EVE_NAME(quarter_circle(cos)) , xp, eve::cos[eve::quarter_circle2], arg0); + run(EVE_NAME(quarter_circle(cos)) , xp, eve::cos[eve::quarter_circle2], arg0); run(EVE_NAME(cos) , xp, eve::cos , arg0); run(EVE_NAME(cos) , xp, eve::cos , arg0); } diff --git a/benchmarks/module/math/cos/regular/cos.hpp b/benchmarks/module/math/cos/regular/cos.hpp index 9d4dea8a5e..453bbf16f4 100644 --- a/benchmarks/module/math/cos/regular/cos.hpp +++ b/benchmarks/module/math/cos/regular/cos.hpp @@ -19,7 +19,8 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__cos) , xp, std__cos , arg0); + run(EVE_NAME(cos[big2]) , xp, eve::cos[eve::big2] , arg0); + run(EVE_NAME(cos[big2]) , xp, eve::cos[eve::big2] , arg0); run(EVE_NAME(cos) , xp, eve::cos , arg0); run (EVE_NAME(cos) , xp, eve::cos , arg0); - } diff --git a/benchmarks/module/math/cosd/half_circle/cosd.hpp b/benchmarks/module/math/cosd/half_circle/cosd.hpp index 207268ab5a..a248473fcd 100644 --- a/benchmarks/module/math/cosd/half_circle/cosd.hpp +++ b/benchmarks/module/math/cosd/half_circle/cosd.hpp @@ -7,18 +7,17 @@ //================================================================================================== #include #include -#include #include int main() { - auto lmax = eve::detail::Rempio2_limit(eve::half_circle_type(), eve::as()); + auto lmax = EVE_VALUE(90); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(half_circle(eve::cosd)) , xp, eve::half_circle(eve::cosd) , arg0); - run (EVE_NAME(half_circle(eve::cosd)) , xp, eve::half_circle(eve::cosd) , arg0); + run(EVE_NAME(cosd[eve::half_circle2]) , xp, eve::cosd[eve::half_circle2] , arg0); + run (EVE_NAME(cosd[eve::half_circle2]) , xp, eve::cosd[eve::half_circle2] , arg0); } diff --git a/benchmarks/module/math/cosd/quarter_circle/cosd.hpp b/benchmarks/module/math/cosd/quarter_circle/cosd.hpp index ceebf93bea..de091a5f81 100644 --- a/benchmarks/module/math/cosd/quarter_circle/cosd.hpp +++ b/benchmarks/module/math/cosd/quarter_circle/cosd.hpp @@ -17,6 +17,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::cosd)) , xp, eve::quarter_circle(eve::cosd) , arg0); - run (EVE_NAME(quarter_circle(eve::cosd)) , xp, eve::quarter_circle(eve::cosd) , arg0); + run(EVE_NAME(cosd[eve::quarter_circle2]) , xp, eve::cosd[eve::quarter_circle2] , arg0); + run (EVE_NAME(cosd[eve::quarter_circle2]) , xp, eve::cosd[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/cospi/quarter_circle/cospi.hpp b/benchmarks/module/math/cospi/quarter_circle/cospi.hpp index b0d59f42d3..d801fb2462 100644 --- a/benchmarks/module/math/cospi/quarter_circle/cospi.hpp +++ b/benchmarks/module/math/cospi/quarter_circle/cospi.hpp @@ -16,6 +16,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::cospi)) , xp, eve::quarter_circle(eve::cospi) , arg0); - run (EVE_NAME(quarter_circle(eve::cospi)) , xp, eve::quarter_circle(eve::cospi) , arg0); + run(EVE_NAME(cospi[eve::quarter_circle2]) , xp, eve::cospi[eve::quarter_circle2] , arg0); + run (EVE_NAME(cospi[eve::quarter_circle2]) , xp, eve::cospi[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/cot/full_circle/cot.hpp b/benchmarks/module/math/cot/full_circle/cot.hpp index 3c2edd4f90..cf6fc7956f 100644 --- a/benchmarks/module/math/cot/full_circle/cot.hpp +++ b/benchmarks/module/math/cot/full_circle/cot.hpp @@ -12,7 +12,7 @@ int main() { - auto lmax = eve::detail::Rempio2_limit(eve::full_circle_type(), eve::as()); + auto lmax = eve::Rempio2_limit[eve::full_circle2](eve::as()); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__cot) , xp, std__cot , arg0); - run(EVE_NAME(full_circle(eve::cot)) , xp, eve::full_circle(eve::cot) , arg0); - run (EVE_NAME(full_circle(eve::cot)) , xp, eve::full_circle(eve::cot) , arg0); + run(EVE_NAME(cot[eve::full_circle2]) , xp, eve::cot[eve::full_circle2] , arg0); + run (EVE_NAME(cot[eve::full_circle2]) , xp, eve::cot[eve::full_circle2] , arg0); } diff --git a/benchmarks/module/math/cot/half_circle/cot.hpp b/benchmarks/module/math/cot/half_circle/cot.hpp index e5a7b181fd..cff5675681 100644 --- a/benchmarks/module/math/cot/half_circle/cot.hpp +++ b/benchmarks/module/math/cot/half_circle/cot.hpp @@ -12,7 +12,7 @@ int main() { - auto lmax = eve::detail::Rempio2_limit(eve::half_circle_type(), eve::as()); + auto lmax = eve::Rempio2_limit[eve::half_circle2](eve::as()); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__cot) , xp, std__cot , arg0); - run(EVE_NAME(half_circle(eve::cot)) , xp, eve::half_circle(eve::cot) , arg0); - run (EVE_NAME(half_circle(eve::cot)) , xp, eve::half_circle(eve::cot) , arg0); + run(EVE_NAME(cot[eve::half_circle2]) , xp, eve::cot[eve::half_circle2] , arg0); + run (EVE_NAME(cot[eve::half_circle2]) , xp, eve::cot[eve::half_circle2] , arg0); } diff --git a/benchmarks/module/math/cot/quarter_circle/cot.hpp b/benchmarks/module/math/cot/quarter_circle/cot.hpp index 25ac579d7c..4a225f20c2 100644 --- a/benchmarks/module/math/cot/quarter_circle/cot.hpp +++ b/benchmarks/module/math/cot/quarter_circle/cot.hpp @@ -19,6 +19,6 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__cot) , xp, std__cot , arg0); - run(EVE_NAME(quarter_circle(eve::cot)) , xp, eve::quarter_circle(eve::cot) , arg0); - run (EVE_NAME(quarter_circle(eve::cot)) , xp, eve::quarter_circle(eve::cot) , arg0); + run(EVE_NAME(cot[eve::quarter_circle2]) , xp, eve::cot[eve::quarter_circle2] , arg0); + run (EVE_NAME(cot[eve::quarter_circle2]) , xp, eve::cot[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/cotd/half_circle/cotd.hpp b/benchmarks/module/math/cotd/half_circle/cotd.hpp index cf78f45d71..131513b67a 100644 --- a/benchmarks/module/math/cotd/half_circle/cotd.hpp +++ b/benchmarks/module/math/cotd/half_circle/cotd.hpp @@ -7,18 +7,17 @@ //================================================================================================== #include #include -#include #include int main() { - auto lmax = eve::detail::Rempio2_limit(eve::half_circle_type(), eve::as()); + auto lmax = EVE_VALUE(90); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(half_circle(eve::cotd)) , xp, eve::half_circle(eve::cotd) , arg0); - run (EVE_NAME(half_circle(eve::cotd)) , xp, eve::half_circle(eve::cotd) , arg0); + run(EVE_NAME(cotd[eve::half_circle2]) , xp, eve::cotd[eve::half_circle2] , arg0); + run (EVE_NAME(cotd[eve::half_circle2]) , xp, eve::cotd[eve::half_circle2] , arg0); } diff --git a/benchmarks/module/math/cotd/quarter_circle/cotd.hpp b/benchmarks/module/math/cotd/quarter_circle/cotd.hpp index ffd7fae5c7..cba910d123 100644 --- a/benchmarks/module/math/cotd/quarter_circle/cotd.hpp +++ b/benchmarks/module/math/cotd/quarter_circle/cotd.hpp @@ -17,6 +17,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::cotd)) , xp, eve::quarter_circle(eve::cotd) , arg0); - run (EVE_NAME(quarter_circle(eve::cotd)) , xp, eve::quarter_circle(eve::cotd) , arg0); + run(EVE_NAME(cotd[eve::quarter_circle2]) , xp, eve::cotd[eve::quarter_circle2] , arg0); + run (EVE_NAME(cotd[eve::quarter_circle2]) , xp, eve::cotd[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/cotpi/quarter_circle/cotpi.hpp b/benchmarks/module/math/cotpi/quarter_circle/cotpi.hpp index 91187c64f6..29ffe5148c 100644 --- a/benchmarks/module/math/cotpi/quarter_circle/cotpi.hpp +++ b/benchmarks/module/math/cotpi/quarter_circle/cotpi.hpp @@ -16,6 +16,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::cotpi)) , xp, eve::quarter_circle(eve::cotpi) , arg0); - run (EVE_NAME(quarter_circle(eve::cotpi)) , xp, eve::quarter_circle(eve::cotpi) , arg0); + run(EVE_NAME(cotpi[eve::quarter_circle2]) , xp, eve::cotpi[eve::quarter_circle2] , arg0); + run (EVE_NAME(cotpi[eve::quarter_circle2]) , xp, eve::cotpi[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/cotpi/regular/cotpi.hpp b/benchmarks/module/math/cotpi/regular/cotpi.hpp index 98ee9cea03..34e01b2139 100644 --- a/benchmarks/module/math/cotpi/regular/cotpi.hpp +++ b/benchmarks/module/math/cotpi/regular/cotpi.hpp @@ -15,7 +15,7 @@ int main() auto lmax = EVE_VALUE(eve::valmax(eve::as())); auto arg0 = eve::bench::random_(lmin,lmax); - auto std__cotpi = [](auto x){return eve::radindeg(std::cos(x));}; + auto std__cotpi = [](auto x){return 1/(std::tan(eve::pi(eve::as(x))*(x)));}; eve::bench::experiment xp; run(EVE_NAME(std__cotpi) , xp, std__cotpi , arg0); diff --git a/benchmarks/module/math/csc/full_circle/csc.hpp b/benchmarks/module/math/csc/full_circle/csc.hpp index 99a090f9b9..c804391c18 100644 --- a/benchmarks/module/math/csc/full_circle/csc.hpp +++ b/benchmarks/module/math/csc/full_circle/csc.hpp @@ -12,7 +12,7 @@ int main() { - auto lmax = eve::detail::Rempio2_limit(eve::full_circle_type(), eve::as()); + auto lmax = eve::Rempio2_limit[eve::full_circle2](eve::as()); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__csc) , xp, std__csc , arg0); - run(EVE_NAME(full_circle(eve::csc)) , xp, eve::full_circle(eve::csc) , arg0); - run (EVE_NAME(full_circle(eve::csc)) , xp, eve::full_circle(eve::csc) , arg0); + run(EVE_NAME(csc[eve::full_circle2]) , xp, eve::csc[eve::full_circle2] , arg0); + run (EVE_NAME(csc[eve::full_circle2]) , xp, eve::csc[eve::full_circle2] , arg0); } diff --git a/benchmarks/module/math/csc/half_circle/csc.hpp b/benchmarks/module/math/csc/half_circle/csc.hpp index cb6891906c..747cebecb1 100644 --- a/benchmarks/module/math/csc/half_circle/csc.hpp +++ b/benchmarks/module/math/csc/half_circle/csc.hpp @@ -12,7 +12,7 @@ int main() { - auto lmax = eve::detail::Rempio2_limit(eve::half_circle_type(), eve::as()); + auto lmax = eve::Rempio2_limit[eve::half_circle2](eve::as()); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__csc) , xp, std__csc , arg0); - run(EVE_NAME(half_circle(eve::csc)) , xp, eve::half_circle(eve::csc) , arg0); - run (EVE_NAME(half_circle(eve::csc)) , xp, eve::half_circle(eve::csc) , arg0); + run(EVE_NAME(csc[eve::half_circle2]) , xp, eve::csc[eve::half_circle2] , arg0); + run (EVE_NAME(csc[eve::half_circle2]) , xp, eve::csc[eve::half_circle2] , arg0); } diff --git a/benchmarks/module/math/csc/quarter_circle/csc.hpp b/benchmarks/module/math/csc/quarter_circle/csc.hpp index d57cbed507..3545d0f09b 100644 --- a/benchmarks/module/math/csc/quarter_circle/csc.hpp +++ b/benchmarks/module/math/csc/quarter_circle/csc.hpp @@ -19,6 +19,6 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__csc) , xp, std__csc , arg0); - run(EVE_NAME(quarter_circle(eve::csc)) , xp, eve::quarter_circle(eve::csc) , arg0); - run (EVE_NAME(quarter_circle(eve::csc)) , xp, eve::quarter_circle(eve::csc) , arg0); + run(EVE_NAME(csc[eve::quarter_circle2]) , xp, eve::csc[eve::quarter_circle2] , arg0); + run (EVE_NAME(csc[eve::quarter_circle2]) , xp, eve::csc[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/cscd/half_circle/cscd.hpp b/benchmarks/module/math/cscd/half_circle/cscd.hpp index 59f0a7b0e6..3bd23e1518 100644 --- a/benchmarks/module/math/cscd/half_circle/cscd.hpp +++ b/benchmarks/module/math/cscd/half_circle/cscd.hpp @@ -7,18 +7,17 @@ //================================================================================================== #include #include -#include #include int main() { - auto lmax = eve::detail::Rempio2_limit(eve::half_circle_type(), eve::as()); + auto lmax = EVE_VALUE(90); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(half_circle(eve::cscd)) , xp, eve::half_circle(eve::cscd) , arg0); - run (EVE_NAME(half_circle(eve::cscd)) , xp, eve::half_circle(eve::cscd) , arg0); + run(EVE_NAME(cscd[eve::half_circle2]) , xp, eve::cscd[eve::half_circle2] , arg0); + run (EVE_NAME(cscd[eve::half_circle2]) , xp, eve::cscd[eve::half_circle2] , arg0); } diff --git a/benchmarks/module/math/cscd/quarter_circle/cscd.hpp b/benchmarks/module/math/cscd/quarter_circle/cscd.hpp index 469436a91b..a6da901514 100644 --- a/benchmarks/module/math/cscd/quarter_circle/cscd.hpp +++ b/benchmarks/module/math/cscd/quarter_circle/cscd.hpp @@ -17,6 +17,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::cscd)) , xp, eve::quarter_circle(eve::cscd) , arg0); - run (EVE_NAME(quarter_circle(eve::cscd)) , xp, eve::quarter_circle(eve::cscd) , arg0); + run(EVE_NAME(cscd[eve::quarter_circle2]) , xp, eve::cscd[eve::quarter_circle2] , arg0); + run (EVE_NAME(cscd[eve::quarter_circle2]) , xp, eve::cscd[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/cscpi/quarter_circle/cscpi.hpp b/benchmarks/module/math/cscpi/quarter_circle/cscpi.hpp index 76db47d341..6bdb2a9363 100644 --- a/benchmarks/module/math/cscpi/quarter_circle/cscpi.hpp +++ b/benchmarks/module/math/cscpi/quarter_circle/cscpi.hpp @@ -16,6 +16,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::cscpi)) , xp, eve::quarter_circle(eve::cscpi) , arg0); - run (EVE_NAME(quarter_circle(eve::cscpi)) , xp, eve::quarter_circle(eve::cscpi) , arg0); + run(EVE_NAME(cscpi[eve::quarter_circle2]) , xp, eve::cscpi[eve::quarter_circle2] , arg0); + run (EVE_NAME(cscpi[eve::quarter_circle2]) , xp, eve::cscpi[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/horner/regular/horner.hpp b/benchmarks/module/math/horner/regular/horner.hpp index a8ff7d91b7..b25a7d864c 100644 --- a/benchmarks/module/math/horner/regular/horner.hpp +++ b/benchmarks/module/math/horner/regular/horner.hpp @@ -14,7 +14,7 @@ int main() { using v_t = eve::element_type_t; auto eve__horner = [](T z) -> T{ - constexpr std::array < v_t, 5> a = { + constexpr kumi::tuple < v_t, v_t, v_t, v_t, v_t> a = { -4.497014141919556E+001, 5.073465654089319E+001, -2.485774108720340E+001, diff --git a/benchmarks/module/math/log1p/regular/log1p.hpp b/benchmarks/module/math/log1p/regular/log1p.hpp index 0769998412..88e3dd8690 100644 --- a/benchmarks/module/math/log1p/regular/log1p.hpp +++ b/benchmarks/module/math/log1p/regular/log1p.hpp @@ -12,7 +12,6 @@ int main() { auto lmin = EVE_VALUE(-1); -// auto lmax = EVE_VALUE(eve::valmax(eve::as())); auto lmax = EVE_VALUE(eve::maxflint(eve::as())); auto arg0 = eve::bench::random_(lmin,lmax); diff --git a/benchmarks/module/math/pow/raw/pow.hpp b/benchmarks/module/math/pow/raw/pow.hpp index 89a18cb46c..8da9cd6366 100644 --- a/benchmarks/module/math/pow/raw/pow.hpp +++ b/benchmarks/module/math/pow/raw/pow.hpp @@ -11,13 +11,11 @@ int main() { -// auto lmin = EVE_VALUE(-1.0); -// auto lmax = EVE_VALUE(100.0); - auto const eve_rpow = [](auto x, auto y) { return eve::raw(eve::pow)(x, y); }; + auto const eve_rpow = [](auto x, auto y) { return eve::pow[eve::raw2](x, y); }; auto const std_rpow = [](auto x, auto y) { return std::exp(std::log(x)*y); }; auto lmin = EVE_VALUE(0); - auto lmax = EVE_VALUE(10); + auto lmax = EVE_VALUE(100); auto arg0 = eve::bench::random_(lmin,lmax); auto arg1 = eve::bench::random_(lmin,lmax); diff --git a/benchmarks/module/math/pow/regular/pow.hpp b/benchmarks/module/math/pow/regular/pow.hpp index d710e2a5a3..85af386b30 100644 --- a/benchmarks/module/math/pow/regular/pow.hpp +++ b/benchmarks/module/math/pow/regular/pow.hpp @@ -10,8 +10,8 @@ int main() { - auto lmin = EVE_VALUE(-1.0); - auto lmax = EVE_VALUE(100.0); + auto lmin = EVE_VALUE(0); + auto lmax = EVE_VALUE(100); auto arg0 = eve::bench::random_(lmin,lmax); auto arg1 = eve::bench::random_(lmin,lmax); diff --git a/benchmarks/module/math/pow_abs/raw/pow_abs.hpp b/benchmarks/module/math/pow_abs/raw/pow_abs.hpp index 332c652a0c..4fa2e2e009 100644 --- a/benchmarks/module/math/pow_abs/raw/pow_abs.hpp +++ b/benchmarks/module/math/pow_abs/raw/pow_abs.hpp @@ -11,7 +11,7 @@ int main() { - auto const eve_rpow_abs = [](auto x, auto y) { return eve::raw(eve::pow_abs)(x, y); }; + auto const eve_rpow_abs = [](auto x, auto y) { return eve::pow_abs[eve::raw2](x, y); }; auto const std_rpow_abs = [](auto x, auto y) { return std::exp(std::log(std::abs(x))*y); }; auto lmin = EVE_VALUE(-10); auto lmax = EVE_VALUE(10); diff --git a/benchmarks/module/math/rempio2/big/rempio2.hpp b/benchmarks/module/math/rempio2/big/rempio2.hpp new file mode 100644 index 0000000000..0bca09410d --- /dev/null +++ b/benchmarks/module/math/rempio2/big/rempio2.hpp @@ -0,0 +1,24 @@ +//================================================================================================== +/* + EVE - Expressive Vector Engine + Copyright : EVE Project Contributors + SPDX-License-Identifier: BSL-1.0 +*/ +//================================================================================================== +#include +#include +#include + +int main() +{ + auto lmin = EVE_VALUE(eve::valmin(eve::as())); + auto lmax = EVE_VALUE(eve::valmax(eve::as())); + + auto arg0 = eve::bench::random_(lmin,lmax); + auto std__cos = [](auto x){return std::cos(x);}; + + eve::bench::experiment xp; + run(EVE_NAME(std__cos) , xp, std__cos , arg0); + run(EVE_NAME(cos[big2]) , xp, eve::cos[eve::big2] , arg0); + run (EVE_NAME(cos[big2]) , xp, eve::cos[eve::big2] , arg0); +} diff --git a/benchmarks/module/math/rempio2/full_circle/rempio2.hpp b/benchmarks/module/math/rempio2/full_circle/rempio2.hpp new file mode 100644 index 0000000000..94b8b9456f --- /dev/null +++ b/benchmarks/module/math/rempio2/full_circle/rempio2.hpp @@ -0,0 +1,26 @@ +//================================================================================================== +/* + EVE - Expressive Vector Engine + Copyright : EVE Project Contributors + SPDX-License-Identifier: BSL-1.0 +*/ +//================================================================================================== +#include +#include +#include + +int main() +{ + auto lmax = eve::pi(eve::as()); + auto lmin = -lmax; + + auto arg0 = eve::bench::random_(lmin, lmax); + auto std__cos = [](auto x){return std::cos(x);}; + + eve::bench::experiment xp; + run(EVE_NAME(scalar std::cos) , xp, std__cos , arg0); + run(EVE_NAME(full_circle(cos)) , xp, eve::cos[eve::full_circle2], arg0); + run(EVE_NAME(full_circle(cos)) , xp, eve::cos[eve::full_circle2], arg0); + run(EVE_NAME(eve::cos) , xp, eve::cos , arg0); + run(EVE_NAME(eve::cos) , xp, eve::cos , arg0); +} diff --git a/benchmarks/module/math/rempio2/half_circle/rempio2.hpp b/benchmarks/module/math/rempio2/half_circle/rempio2.hpp new file mode 100644 index 0000000000..0e617238a4 --- /dev/null +++ b/benchmarks/module/math/rempio2/half_circle/rempio2.hpp @@ -0,0 +1,28 @@ +//================================================================================================== +/* + EVE - Expressive Vector Engine + Copyright : EVE Project Contributors + SPDX-License-Identifier: BSL-1.0 +*/ +//================================================================================================== +#include +#include +#include +#include + +int main() +{ + auto lmax = eve::Rempio2_limit[eve::half_circle2](eve::as()); + auto lmin = -lmax; + + auto arg0 = eve::bench::random_(lmin,lmax); + auto std__cos = [](auto x){return std::cos(x);}; + + eve::bench::experiment xp; + run(EVE_NAME(std__cos) , xp, std__cos , arg0); + run(EVE_NAME(cos[eve::half_circle2]) , xp, eve::cos[eve::half_circle2] , arg0); + run (EVE_NAME(cos[eve::half_circle2]) , xp, eve::cos[eve::half_circle2] , arg0); + run(EVE_NAME(eve::cos) , xp, eve::cos , arg0); + run(EVE_NAME(eve::cos) , xp, eve::cos , arg0); + +} diff --git a/benchmarks/module/math/rempio2/medium/rempio2.hpp b/benchmarks/module/math/rempio2/medium/rempio2.hpp new file mode 100644 index 0000000000..b96ae2f5c5 --- /dev/null +++ b/benchmarks/module/math/rempio2/medium/rempio2.hpp @@ -0,0 +1,25 @@ +//================================================================================================== +/* + EVE - Expressive Vector Engine + Copyright : EVE Project Contributors + SPDX-License-Identifier: BSL-1.0 +*/ +//================================================================================================== +#include +#include + +int main() +{ + auto lmax = eve::Rempio2_limit[eve::medium2](eve::as()); + auto lmin = -lmax; + + auto arg0 = eve::bench::random_(lmin, lmax); + auto std__rempio2 = [](auto x){return eve::rem_pio2(x);}; + + eve::bench::experiment xp; + run(EVE_NAME(scalar std::rempio2) , xp, std__rempio2 , arg0); + run(EVE_NAME(rempio2[eve::medium2]) , xp, eve::rempio2[eve::medium2], arg0); + run(EVE_NAME(rempio2[eve::medium2]) , xp, eve::rempio2[eve::medium2], arg0); + run(EVE_NAME(rempio2) , xp, eve::rempio2 , arg0); + run(EVE_NAME(rempio2) , xp, eve::rempio2 , arg0); +} diff --git a/benchmarks/module/math/rempio2/quarter_circle/rempio2.hpp b/benchmarks/module/math/rempio2/quarter_circle/rempio2.hpp new file mode 100644 index 0000000000..bde890fa9c --- /dev/null +++ b/benchmarks/module/math/rempio2/quarter_circle/rempio2.hpp @@ -0,0 +1,26 @@ +//================================================================================================== +/* + EVE - Expressive Vector Engine + Copyright : EVE Project Contributors + SPDX-License-Identifier: BSL-1.0 +*/ +//================================================================================================== +#include +#include +#include + +int main() +{ + auto lmax = eve::pio_4(eve::as()); + auto lmin = -lmax; + + auto arg0 = eve::bench::random_(lmin, lmax); + auto std__cos = [](auto x){return std::cos(x);}; + + eve::bench::experiment xp; + run(EVE_NAME(scalar std::cos) , xp, std__cos , arg0); + run(EVE_NAME(quarter_circle(cos)) , xp, eve::cos[eve::quarter_circle2], arg0); + run(EVE_NAME(quarter_circle(cos)) , xp, eve::cos[eve::quarter_circle2], arg0); + run(EVE_NAME(cos) , xp, eve::cos , arg0); + run(EVE_NAME(cos) , xp, eve::cos , arg0); +} diff --git a/benchmarks/module/math/rempio2/regular/rempio2.hpp b/benchmarks/module/math/rempio2/regular/rempio2.hpp new file mode 100644 index 0000000000..1af8d9a462 --- /dev/null +++ b/benchmarks/module/math/rempio2/regular/rempio2.hpp @@ -0,0 +1,26 @@ +//================================================================================================== +/* + EVE - Expressive Vector Engine + Copyright : EVE Project Contributors + SPDX-License-Identifier: BSL-1.0 +*/ +//================================================================================================== +#include +#include +#include + +int main() +{ +// auto lmin = EVE_VALUE(eve::valmin(eve::as())); +// auto lmax = EVE_VALUE(eve::valmax(eve::as())); + auto lmax = 100*eve::Rempio2_limit[eve::medium2](eve::as()); + auto lmin = -lmax; + + auto arg0 = eve::bench::random_(lmin,lmax); + auto std__rempio2 = [](auto x){return eve::rem_pio2(x);}; + + eve::bench::experiment xp; + run(EVE_NAME(scalar std::rempio2), xp, std__rempio2 , arg0); + run(EVE_NAME(rempio2) , xp, eve::rempio2 , arg0); + run (EVE_NAME(rempio2) , xp, eve::rempio2 , arg0); +} diff --git a/benchmarks/module/math/sec/full_circle/sec.hpp b/benchmarks/module/math/sec/full_circle/sec.hpp index 7ad89bacf8..4e9198e17b 100644 --- a/benchmarks/module/math/sec/full_circle/sec.hpp +++ b/benchmarks/module/math/sec/full_circle/sec.hpp @@ -12,7 +12,7 @@ int main() { - auto lmax = eve::detail::Rempio2_limit(eve::full_circle_type(), eve::as()); + auto lmax = eve::Rempio2_limit[eve::full_circle2](eve::as()); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__sec) , xp, std__sec , arg0); - run(EVE_NAME(full_circle(eve::sec)) , xp, eve::full_circle(eve::sec) , arg0); - run (EVE_NAME(full_circle(eve::sec)) , xp, eve::full_circle(eve::sec) , arg0); + run(EVE_NAME(sec[eve::full_circle2]) , xp, eve::sec[eve::full_circle2] , arg0); + run (EVE_NAME(sec[eve::full_circle2]) , xp, eve::sec[eve::full_circle2] , arg0); } diff --git a/benchmarks/module/math/sec/half_circle/sec.hpp b/benchmarks/module/math/sec/half_circle/sec.hpp index 6602016ab2..f94b0b6ed2 100644 --- a/benchmarks/module/math/sec/half_circle/sec.hpp +++ b/benchmarks/module/math/sec/half_circle/sec.hpp @@ -12,7 +12,7 @@ int main() { - auto lmax = eve::detail::Rempio2_limit(eve::half_circle_type(), eve::as()); + auto lmax = eve::Rempio2_limit[eve::half_circle2](eve::as()); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__sec) , xp, std__sec , arg0); - run(EVE_NAME(half_circle(eve::sec)) , xp, eve::half_circle(eve::sec) , arg0); - run (EVE_NAME(half_circle(eve::sec)) , xp, eve::half_circle(eve::sec) , arg0); + run(EVE_NAME(sec[eve::half_circle2]) , xp, eve::sec[eve::half_circle2] , arg0); + run (EVE_NAME(sec[eve::half_circle2]) , xp, eve::sec[eve::half_circle2] , arg0); } diff --git a/benchmarks/module/math/sec/quarter_circle/sec.hpp b/benchmarks/module/math/sec/quarter_circle/sec.hpp index fde15ebc6d..c4189cea36 100644 --- a/benchmarks/module/math/sec/quarter_circle/sec.hpp +++ b/benchmarks/module/math/sec/quarter_circle/sec.hpp @@ -19,6 +19,6 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__sec) , xp, std__sec , arg0); - run(EVE_NAME(quarter_circle(eve::sec)) , xp, eve::quarter_circle(eve::sec) , arg0); - run (EVE_NAME(quarter_circle(eve::sec)) , xp, eve::quarter_circle(eve::sec) , arg0); + run(EVE_NAME(sec[eve::quarter_circle2]) , xp, eve::sec[eve::quarter_circle2] , arg0); + run (EVE_NAME(sec[eve::quarter_circle2]) , xp, eve::sec[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/secd/half_circle/secd.hpp b/benchmarks/module/math/secd/half_circle/secd.hpp index 15c403928d..50651779e4 100644 --- a/benchmarks/module/math/secd/half_circle/secd.hpp +++ b/benchmarks/module/math/secd/half_circle/secd.hpp @@ -7,18 +7,17 @@ //================================================================================================== #include #include -#include #include int main() { - auto lmax = eve::detail::Rempio2_limit(eve::half_circle_type(), eve::as()); + auto lmax = EVE_VALUE(90); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(half_circle(eve::secd)) , xp, eve::half_circle(eve::secd) , arg0); - run (EVE_NAME(half_circle(eve::secd)) , xp, eve::half_circle(eve::secd) , arg0); + run(EVE_NAME(secd[eve::half_circle2]) , xp, eve::secd[eve::half_circle2] , arg0); + run (EVE_NAME(secd[eve::half_circle2]) , xp, eve::secd[eve::half_circle2] , arg0); } diff --git a/benchmarks/module/math/secd/quarter_circle/secd.hpp b/benchmarks/module/math/secd/quarter_circle/secd.hpp index 9420851a80..e5e7d67814 100644 --- a/benchmarks/module/math/secd/quarter_circle/secd.hpp +++ b/benchmarks/module/math/secd/quarter_circle/secd.hpp @@ -17,6 +17,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::secd)) , xp, eve::quarter_circle(eve::secd) , arg0); - run (EVE_NAME(quarter_circle(eve::secd)) , xp, eve::quarter_circle(eve::secd) , arg0); + run(EVE_NAME(secd[eve::quarter_circle2]) , xp, eve::secd[eve::quarter_circle2] , arg0); + run (EVE_NAME(secd[eve::quarter_circle2]) , xp, eve::secd[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/secpi/quarter_circle/secpi.hpp b/benchmarks/module/math/secpi/quarter_circle/secpi.hpp index 2d8b996218..08744bf7da 100644 --- a/benchmarks/module/math/secpi/quarter_circle/secpi.hpp +++ b/benchmarks/module/math/secpi/quarter_circle/secpi.hpp @@ -16,6 +16,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::secpi)) , xp, eve::quarter_circle(eve::secpi) , arg0); - run (EVE_NAME(quarter_circle(eve::secpi)) , xp, eve::quarter_circle(eve::secpi) , arg0); + run(EVE_NAME(secpi[eve::quarter_circle2]) , xp, eve::secpi[eve::quarter_circle2] , arg0); + run (EVE_NAME(secpi[eve::quarter_circle2]) , xp, eve::secpi[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/secpi/regular/secpi.hpp b/benchmarks/module/math/secpi/regular/secpi.hpp index d1138c38c0..cec5fed9f8 100644 --- a/benchmarks/module/math/secpi/regular/secpi.hpp +++ b/benchmarks/module/math/secpi/regular/secpi.hpp @@ -15,7 +15,7 @@ int main() auto lmax = EVE_VALUE(eve::valmax(eve::as())); auto arg0 = eve::bench::random_(lmin,lmax); - auto std__secpi = [](auto x){return eve::radindeg(std::cos(x));}; + auto std__secpi = [](auto x){return 1/std::cos(eve::pi(eve::as(x))*x);}; eve::bench::experiment xp; run(EVE_NAME(std__secpi) , xp, std__secpi , arg0); diff --git a/benchmarks/module/math/sin/full_circle/sin.hpp b/benchmarks/module/math/sin/full_circle/sin.hpp index 775ad07fa7..40482c473d 100644 --- a/benchmarks/module/math/sin/full_circle/sin.hpp +++ b/benchmarks/module/math/sin/full_circle/sin.hpp @@ -12,7 +12,7 @@ int main() { - auto lmax = eve::detail::Rempio2_limit(eve::full_circle_type(), eve::as()); + auto lmax = eve::Rempio2_limit[eve::full_circle2](eve::as()); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__sin) , xp, std__sin , arg0); - run(EVE_NAME(full_circle(eve::sin)) , xp, eve::full_circle(eve::sin) , arg0); - run (EVE_NAME(full_circle(eve::sin)) , xp, eve::full_circle(eve::sin) , arg0); + run(EVE_NAME(sin[eve::full_circle2]) , xp, eve::sin[eve::full_circle2] , arg0); + run (EVE_NAME(sin[eve::full_circle2]) , xp, eve::sin[eve::full_circle2] , arg0); } diff --git a/benchmarks/module/math/sin/half_circle/sin.hpp b/benchmarks/module/math/sin/half_circle/sin.hpp index b48c0a5656..bb7701042c 100644 --- a/benchmarks/module/math/sin/half_circle/sin.hpp +++ b/benchmarks/module/math/sin/half_circle/sin.hpp @@ -12,7 +12,7 @@ int main() { - auto lmax = eve::detail::Rempio2_limit(eve::half_circle_type(), eve::as()); + auto lmax = eve::Rempio2_limit[eve::half_circle2](eve::as()); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__sin) , xp, std__sin , arg0); - run(EVE_NAME(half_circle(eve::sin)) , xp, eve::half_circle(eve::sin) , arg0); - run (EVE_NAME(half_circle(eve::sin)) , xp, eve::half_circle(eve::sin) , arg0); + run(EVE_NAME(sin[eve::half_circle2]) , xp, eve::sin[eve::half_circle2] , arg0); + run (EVE_NAME(sin[eve::half_circle2]) , xp, eve::sin[eve::half_circle2] , arg0); } diff --git a/benchmarks/module/math/sin/quarter_circle/sin.hpp b/benchmarks/module/math/sin/quarter_circle/sin.hpp index 740e166554..5660dae5fc 100644 --- a/benchmarks/module/math/sin/quarter_circle/sin.hpp +++ b/benchmarks/module/math/sin/quarter_circle/sin.hpp @@ -19,6 +19,6 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__sin) , xp, std__sin , arg0); - run(EVE_NAME(quarter_circle(eve::sin)) , xp, eve::quarter_circle(eve::sin) , arg0); - run (EVE_NAME(quarter_circle(eve::sin)) , xp, eve::quarter_circle(eve::sin) , arg0); + run(EVE_NAME(sin[eve::quarter_circle2]) , xp, eve::sin[eve::quarter_circle2] , arg0); + run (EVE_NAME(sin[eve::quarter_circle2]) , xp, eve::sin[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/sincos/half_circle/sincos.hpp b/benchmarks/module/math/sincos/half_circle/sincos.hpp index dabd21de82..2544175355 100644 --- a/benchmarks/module/math/sincos/half_circle/sincos.hpp +++ b/benchmarks/module/math/sincos/half_circle/sincos.hpp @@ -12,13 +12,13 @@ int main() { - auto lmax = eve::detail::Rempio2_limit(eve::half_circle_type(), eve::as()); + auto lmax = eve::Rempio2_limit[eve::half_circle2](eve::as()); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(half_circle(eve::sincos)) , xp, eve::half_circle(eve::sincos) , arg0); - run (EVE_NAME(half_circle(eve::sincos)) , xp, eve::half_circle(eve::sincos) , arg0); + run(EVE_NAME(sincos[eve::half_circle2]) , xp, eve::sincos[eve::half_circle2] , arg0); + run (EVE_NAME(sincos[eve::half_circle2]) , xp, eve::sincos[eve::half_circle2] , arg0); } diff --git a/benchmarks/module/math/sincos/quarter_circle/sincos.hpp b/benchmarks/module/math/sincos/quarter_circle/sincos.hpp index 7659cfa7c3..d4e4e592df 100644 --- a/benchmarks/module/math/sincos/quarter_circle/sincos.hpp +++ b/benchmarks/module/math/sincos/quarter_circle/sincos.hpp @@ -17,6 +17,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::sincos)) , xp, eve::quarter_circle(eve::sincos) , arg0); - run (EVE_NAME(quarter_circle(eve::sincos)) , xp, eve::quarter_circle(eve::sincos) , arg0); + run(EVE_NAME(sincos[eve::quarter_circle2]) , xp, eve::sincos[eve::quarter_circle2] , arg0); + run (EVE_NAME(sincos[eve::quarter_circle2]) , xp, eve::sincos[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/sind/half_circle/sind.hpp b/benchmarks/module/math/sind/half_circle/sind.hpp index 04326e5265..6741f6c279 100644 --- a/benchmarks/module/math/sind/half_circle/sind.hpp +++ b/benchmarks/module/math/sind/half_circle/sind.hpp @@ -7,18 +7,17 @@ //================================================================================================== #include #include -#include #include int main() { - auto lmax = eve::detail::Rempio2_limit(eve::half_circle_type(), eve::as()); + auto lmax = EVE_VALUE(90); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(half_circle(eve::sind)) , xp, eve::half_circle(eve::sind) , arg0); - run (EVE_NAME(half_circle(eve::sind)) , xp, eve::half_circle(eve::sind) , arg0); + run(EVE_NAME(sind[eve::half_circle2]) , xp, eve::sind[eve::half_circle2] , arg0); + run (EVE_NAME(sind[eve::half_circle2]) , xp, eve::sind[eve::half_circle2] , arg0); } diff --git a/benchmarks/module/math/sind/quarter_circle/sind.hpp b/benchmarks/module/math/sind/quarter_circle/sind.hpp index 7296aee1d1..358db7e96d 100644 --- a/benchmarks/module/math/sind/quarter_circle/sind.hpp +++ b/benchmarks/module/math/sind/quarter_circle/sind.hpp @@ -17,6 +17,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::sind)) , xp, eve::quarter_circle(eve::sind) , arg0); - run (EVE_NAME(quarter_circle(eve::sind)) , xp, eve::quarter_circle(eve::sind) , arg0); + run(EVE_NAME(sind[eve::quarter_circle2]) , xp, eve::sind[eve::quarter_circle2] , arg0); + run (EVE_NAME(sind[eve::quarter_circle2]) , xp, eve::sind[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/sindcosd/half_circle/sindcosd.hpp b/benchmarks/module/math/sindcosd/half_circle/sindcosd.hpp index c20c2f1aaa..038f27b641 100644 --- a/benchmarks/module/math/sindcosd/half_circle/sindcosd.hpp +++ b/benchmarks/module/math/sindcosd/half_circle/sindcosd.hpp @@ -7,18 +7,17 @@ //================================================================================================== #include #include -#include #include int main() { - auto lmax = eve::detail::Rempio2_limit(eve::half_circle_type(), eve::as()); + auto lmax = EVE_VALUE(90); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(half_circle(eve::sindcosd)) , xp, eve::half_circle(eve::sindcosd) , arg0); - run (EVE_NAME(half_circle(eve::sindcosd)) , xp, eve::half_circle(eve::sindcosd) , arg0); + run(EVE_NAME(sindcosd[eve::half_circle2]) , xp, eve::sindcosd[eve::half_circle2] , arg0); + run (EVE_NAME(sindcosd[eve::half_circle2]) , xp, eve::sindcosd[eve::half_circle2] , arg0); } diff --git a/benchmarks/module/math/sindcosd/quarter_circle/sindcosd.hpp b/benchmarks/module/math/sindcosd/quarter_circle/sindcosd.hpp index f58f430186..4c18169fdb 100644 --- a/benchmarks/module/math/sindcosd/quarter_circle/sindcosd.hpp +++ b/benchmarks/module/math/sindcosd/quarter_circle/sindcosd.hpp @@ -17,6 +17,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::sindcosd)) , xp, eve::quarter_circle(eve::sindcosd) , arg0); - run (EVE_NAME(quarter_circle(eve::sindcosd)) , xp, eve::quarter_circle(eve::sindcosd) , arg0); + run(EVE_NAME(sindcosd[eve::quarter_circle2]) , xp, eve::sindcosd[eve::quarter_circle2] , arg0); + run (EVE_NAME(sindcosd[eve::quarter_circle2]) , xp, eve::sindcosd[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/sinpi/quarter_circle/sinpi.hpp b/benchmarks/module/math/sinpi/quarter_circle/sinpi.hpp index d24dafeca6..21659ef5c6 100644 --- a/benchmarks/module/math/sinpi/quarter_circle/sinpi.hpp +++ b/benchmarks/module/math/sinpi/quarter_circle/sinpi.hpp @@ -16,6 +16,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::sinpi)) , xp, eve::quarter_circle(eve::sinpi) , arg0); - run (EVE_NAME(quarter_circle(eve::sinpi)) , xp, eve::quarter_circle(eve::sinpi) , arg0); + run(EVE_NAME(sinpi[eve::quarter_circle2]) , xp, eve::sinpi[eve::quarter_circle2] , arg0); + run (EVE_NAME(sinpi[eve::quarter_circle2]) , xp, eve::sinpi[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/sinpicospi/quarter_circle/sinpicospi.hpp b/benchmarks/module/math/sinpicospi/quarter_circle/sinpicospi.hpp index e0e9ce5608..6696be31b1 100644 --- a/benchmarks/module/math/sinpicospi/quarter_circle/sinpicospi.hpp +++ b/benchmarks/module/math/sinpicospi/quarter_circle/sinpicospi.hpp @@ -16,6 +16,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::sinpicospi)) , xp, eve::quarter_circle(eve::sinpicospi) , arg0); - run (EVE_NAME(quarter_circle(eve::sinpicospi)) , xp, eve::quarter_circle(eve::sinpicospi) , arg0); + run(EVE_NAME(sinpicospi[eve::quarter_circle2]) , xp, eve::sinpicospi[eve::quarter_circle2] , arg0); + run (EVE_NAME(sinpicospi[eve::quarter_circle2]) , xp, eve::sinpicospi[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/tan/full_circle/tan.hpp b/benchmarks/module/math/tan/full_circle/tan.hpp index dd4d51b6b2..91caa91fd8 100644 --- a/benchmarks/module/math/tan/full_circle/tan.hpp +++ b/benchmarks/module/math/tan/full_circle/tan.hpp @@ -12,7 +12,7 @@ int main() { - auto lmax = eve::detail::Rempio2_limit(eve::full_circle_type(), eve::as()); + auto lmax = eve::Rempio2_limit[eve::full_circle2](eve::as()); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__tan) , xp, std__tan , arg0); - run(EVE_NAME(full_circle(eve::tan)) , xp, eve::full_circle(eve::tan) , arg0); - run (EVE_NAME(full_circle(eve::tan)) , xp, eve::full_circle(eve::tan) , arg0); + run(EVE_NAME(tan[eve::full_circle2]) , xp, eve::tan[eve::full_circle2] , arg0); + run (EVE_NAME(tan[eve::full_circle2]) , xp, eve::tan[eve::full_circle2] , arg0); } diff --git a/benchmarks/module/math/tan/half_circle/tan.hpp b/benchmarks/module/math/tan/half_circle/tan.hpp index e502bc455b..29921dcb92 100644 --- a/benchmarks/module/math/tan/half_circle/tan.hpp +++ b/benchmarks/module/math/tan/half_circle/tan.hpp @@ -12,7 +12,7 @@ int main() { - auto lmax = eve::detail::Rempio2_limit(eve::half_circle_type(), eve::as()); + auto lmax = eve::Rempio2_limit[eve::half_circle2](eve::as()); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); @@ -20,7 +20,7 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__tan) , xp, std__tan , arg0); - run(EVE_NAME(half_circle(eve::tan)) , xp, eve::half_circle(eve::tan) , arg0); - run (EVE_NAME(half_circle(eve::tan)) , xp, eve::half_circle(eve::tan) , arg0); + run(EVE_NAME(tan[eve::half_circle2]) , xp, eve::tan[eve::half_circle2] , arg0); + run (EVE_NAME(tan[eve::half_circle2]) , xp, eve::tan[eve::half_circle2] , arg0); } diff --git a/benchmarks/module/math/tan/quarter_circle/tan.hpp b/benchmarks/module/math/tan/quarter_circle/tan.hpp index 8a76ece200..1eb3f3b8b9 100644 --- a/benchmarks/module/math/tan/quarter_circle/tan.hpp +++ b/benchmarks/module/math/tan/quarter_circle/tan.hpp @@ -19,6 +19,6 @@ int main() eve::bench::experiment xp; run(EVE_NAME(std__tan) , xp, std__tan , arg0); - run(EVE_NAME(quarter_circle(eve::tan)) , xp, eve::quarter_circle(eve::tan) , arg0); - run (EVE_NAME(quarter_circle(eve::tan)) , xp, eve::quarter_circle(eve::tan) , arg0); + run(EVE_NAME(tan[eve::quarter_circle2]) , xp, eve::tan[eve::quarter_circle2] , arg0); + run (EVE_NAME(tan[eve::quarter_circle2]) , xp, eve::tan[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/tand/half_circle/tand.hpp b/benchmarks/module/math/tand/half_circle/tand.hpp index 411f4d819b..fb7d4eb73b 100644 --- a/benchmarks/module/math/tand/half_circle/tand.hpp +++ b/benchmarks/module/math/tand/half_circle/tand.hpp @@ -7,18 +7,17 @@ //================================================================================================== #include #include -#include #include int main() { - auto lmax = eve::detail::Rempio2_limit(eve::half_circle_type(), eve::as()); + auto lmax = EVE_VALUE(90); auto lmin = -lmax; auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(half_circle(eve::tand)) , xp, eve::half_circle(eve::tand) , arg0); - run (EVE_NAME(half_circle(eve::tand)) , xp, eve::half_circle(eve::tand) , arg0); + run(EVE_NAME(tand[eve::half_circle2]) , xp, eve::tand[eve::half_circle2] , arg0); + run (EVE_NAME(tand[eve::half_circle2]) , xp, eve::tand[eve::half_circle2] , arg0); } diff --git a/benchmarks/module/math/tand/quarter_circle/tand.hpp b/benchmarks/module/math/tand/quarter_circle/tand.hpp index ea2aa5424a..561be94658 100644 --- a/benchmarks/module/math/tand/quarter_circle/tand.hpp +++ b/benchmarks/module/math/tand/quarter_circle/tand.hpp @@ -17,6 +17,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::tand)) , xp, eve::quarter_circle(eve::tand) , arg0); - run (EVE_NAME(quarter_circle(eve::tand)) , xp, eve::quarter_circle(eve::tand) , arg0); + run(EVE_NAME(tand[eve::quarter_circle2]) , xp, eve::tand[eve::quarter_circle2] , arg0); + run (EVE_NAME(tand[eve::quarter_circle2]) , xp, eve::tand[eve::quarter_circle2] , arg0); } diff --git a/benchmarks/module/math/tanpi/quarter_circle/tanpi.hpp b/benchmarks/module/math/tanpi/quarter_circle/tanpi.hpp index 5444cc380e..c040ebe320 100644 --- a/benchmarks/module/math/tanpi/quarter_circle/tanpi.hpp +++ b/benchmarks/module/math/tanpi/quarter_circle/tanpi.hpp @@ -16,6 +16,6 @@ int main() auto arg0 = eve::bench::random_(lmin,lmax); eve::bench::experiment xp; - run(EVE_NAME(quarter_circle(eve::tanpi)) , xp, eve::quarter_circle(eve::tanpi) , arg0); - run (EVE_NAME(quarter_circle(eve::tanpi)) , xp, eve::quarter_circle(eve::tanpi) , arg0); + run(EVE_NAME(tanpi[eve::quarter_circle2]) , xp, eve::tanpi[eve::quarter_circle2] , arg0); + run (EVE_NAME(tanpi[eve::quarter_circle2]) , xp, eve::tanpi[eve::quarter_circle2] , arg0); } diff --git a/cmake/config/pch.cmake b/cmake/config/pch.cmake index dc5e61aa40..32c4ca5540 100644 --- a/cmake/config/pch.cmake +++ b/cmake/config/pch.cmake @@ -10,7 +10,7 @@ file(WRITE "${PROJECT_BINARY_DIR}/doc_pch.cpp" "int main() {}\n" ) file(TOUCH "${PROJECT_BINARY_DIR}/test_pch.cpp" ) -add_executable(bench_pch $ ) +add_executable(bench_pch $ ) add_executable(test_pch $ ) add_executable(doc_pch $ ) diff --git a/include/eve/module/math/constant/oneotwoeps.hpp b/include/eve/module/math/constant/oneotwoeps.hpp new file mode 100644 index 0000000000..5f66439b8f --- /dev/null +++ b/include/eve/module/math/constant/oneotwoeps.hpp @@ -0,0 +1,76 @@ +//================================================================================================== +/* + EVE - Expressive Vector Engine + Copyright : EVE Project Contributors + SPDX-License-Identifier: BSL-1.0 +*/ +//================================================================================================== +#pragma once + +#include +#include +#include + +namespace eve +{ + template + struct oneotwoeps_t : constant_callable + { + template + static EVE_FORCEINLINE constexpr T value(eve::as const&, auto const&) + { + using e_t = element_type_t; + + if constexpr(std::same_as ) return T(0x1p22); + else if constexpr(std::same_as ) return T(0x1p51); + } + + template + requires(floating_scalar_value>) + EVE_FORCEINLINE constexpr T operator()(as const& v) const { return EVE_DISPATCH_CALL(v); } + + EVE_CALLABLE_OBJECT(oneotwoeps_t, oneotwoeps_); + }; + +//================================================================================================ +//! @addtogroup core_constants +//! @{ +//! @var oneotwoeps +//! @brief Computes a constant to the machine oneotwoepsilon. +//! +//! **Defined in Header** +//! +//! @code +//! #include +//! @endcode +//! +//! @groupheader{Callable Signatures} +//! +//! @code +//! namespace eve +//! { +//! template constexpr T oneotwoeps(as x) noexcept; +//! } +//! @endcode +//! +//! **Parameters** +//! +//! * `x` : [Type wrapper](@ref eve::as) instance embedding the type of the constant. +//! +//! **Return value** +//! +//! The call `eve::oneotwoeps(as())` returns [elementwise](@ref glossary_elementwise), the smallest +//! positive value `x` of the type such that `1+x != x`. +//! +//! * If T is an [integral value](@ref eve::integral_value) the elements returned are equal to one. +//! * If T is a [floating value](@ref eve::floating_value) the elements returned are equal to: +//! * 4194304 if the [elements type](@ref eve::element_type) is `float`. +//! * 2.2518e+15f if the [elements type](@ref eve::element_type) is `double`. +//! +//! @groupheader{Example} +//! +//! @godbolt{doc/core/constant/oneotwoeps.cpp} +//! @} +//================================================================================================ + inline constexpr auto oneotwoeps = functor; +} diff --git a/include/eve/module/math/regular/math.hpp b/include/eve/module/math/regular/math.hpp index 6b98cc0c32..9b1907806e 100644 --- a/include/eve/module/math/regular/math.hpp +++ b/include/eve/module/math/regular/math.hpp @@ -80,6 +80,7 @@ #include #include #include +#include #include #include #include diff --git a/include/eve/module/math/regular/rem_pio2.hpp b/include/eve/module/math/regular/rem_pio2.hpp new file mode 100644 index 0000000000..c15b83594c --- /dev/null +++ b/include/eve/module/math/regular/rem_pio2.hpp @@ -0,0 +1,18 @@ +//================================================================================================== +/* + EVE - Expressive Vector Engine + Copyright : EVE Contributors & Maintainers + SPDX-License-Identifier: MIT +*/ +//================================================================================================== +#pragma once + +#include + +namespace eve +{ + EVE_MAKE_CALLABLE(rem_pio2_, rem_pio2); +} + +#include +