From f9070ef28e4603e8d347cd88a5f3f18708ad1e68 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Mar 2024 08:38:16 -0500 Subject: [PATCH 01/23] Make the library modular usable. --- build.jam | 45 ++ build/Jamfile.v2 | 4 +- config/Jamfile.v2 | 10 +- example/Jamfile.v2 | 12 +- reporting/accuracy/Jamfile.v2 | 36 +- reporting/performance/Jamfile.v2 | 40 +- test/Jamfile.v2 | 874 +++++++++++++------------- test/float128/log1p_expm1_test.cpp | 2 +- test/float128/powm1_sqrtp1m1_test.cpp | 2 +- test/float128/table_type.hpp | 2 +- test/float128/test_bessel_i.cpp | 2 +- test/float128/test_bessel_j.cpp | 2 +- test/float128/test_bessel_k.cpp | 2 +- test/float128/test_bessel_y.cpp | 2 +- test/float128/test_beta.cpp | 2 +- test/float128/test_binomial_coeff.cpp | 2 +- test/float128/test_carlson.cpp | 2 +- test/float128/test_cbrt.cpp | 2 +- test/float128/test_digamma.cpp | 2 +- test/float128/test_ellint_1.cpp | 2 +- test/float128/test_ellint_2.cpp | 2 +- test/float128/test_ellint_3.cpp | 2 +- test/float128/test_erf.cpp | 2 +- test/float128/test_expint.cpp | 2 +- test/float128/test_gamma.cpp | 2 +- test/float128/test_hermite.cpp | 2 +- test/float128/test_ibeta.cpp | 2 +- test/float128/test_ibeta_inv_1.cpp | 2 +- test/float128/test_ibeta_inv_ab_4.cpp | 2 +- test/float128/test_igamma.cpp | 2 +- test/float128/test_igamma_inv.cpp | 2 +- test/float128/test_igamma_inva.cpp | 2 +- test/float128/test_laguerre.cpp | 2 +- test/float128/test_legendre.cpp | 2 +- test/float128/test_polygamma.cpp | 2 +- test/float128/test_tgamma_ratio.cpp | 2 +- test/float128/test_trigamma.cpp | 2 +- test/float128/test_zeta.cpp | 2 +- test/test_bernoulli_constants.cpp | 2 +- test/test_nonfinite_io.cpp | 4 +- test/test_owens_t.cpp | 6 +- tools/Jamfile.v2 | 95 +-- tools/ibeta_derivative_data.cpp | 4 +- tools/nc_t_data.cpp | 6 +- 44 files changed, 626 insertions(+), 574 deletions(-) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 0000000000..028acf42ae --- /dev/null +++ b/build.jam @@ -0,0 +1,45 @@ +# Copyright René Ferdinand Rivera Morell 2023 +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import project ; + +project /boost/math + : common-requirements + include + /boost/assert//boost_assert + /boost/concept_check//boost_concept_check + /boost/config//boost_config + /boost/core//boost_core + /boost/integer//boost_integer + /boost/lexical_cast//boost_lexical_cast + /boost/predef//boost_predef + /boost/random//boost_random + /boost/static_assert//boost_static_assert + /boost/throw_exception//boost_throw_exception + ; + +explicit + [ alias boost_math ] + [ alias boost_math_c99 : build//boost_math_c99 ] + [ alias boost_math_c99f : build//boost_math_c99f ] + [ alias boost_math_c99l : build//boost_math_c99l ] + [ alias boost_math_tr1 : build//boost_math_tr1 ] + [ alias boost_math_tr1f : build//boost_math_tr1f ] + [ alias boost_math_tr1l : build//boost_math_tr1l ] + [ alias all : + boost_math + boost_math_c99 boost_math_c99f boost_math_c99l + boost_math_tr1 boost_math_tr1f boost_math_tr1l + example test ] + [ alias testing : : : : + test + include_private ] + ; + +call-if : boost-library math + : install boost_math + boost_math_c99 boost_math_c99f boost_math_c99l + boost_math_tr1 boost_math_tr1f boost_math_tr1l + ; diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 6549e06b79..d0354faf1e 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -5,7 +5,7 @@ import testing ; import pch ; -import ../../config/checks/config : requires ; +import config : requires ; project : requirements @@ -121,5 +121,3 @@ lib boost_math_c99l : ../src/tr1/$(C99_SOURCES)l.cpp pch ../src/tr1 [ check-target-builds ../config//has_long_double_support "long double support" : : no ] ; - -boost-install boost_math_c99 boost_math_c99f boost_math_c99l boost_math_tr1 boost_math_tr1f boost_math_tr1l ; diff --git a/config/Jamfile.v2 b/config/Jamfile.v2 index 77aca7c2e3..650e888809 100644 --- a/config/Jamfile.v2 +++ b/config/Jamfile.v2 @@ -9,11 +9,11 @@ import path ; local ntl-path = [ modules.peek : NTL_PATH ] ; local gmp_path = [ modules.peek : GMP_PATH ] ; -lib quadmath ; -lib fftw3 ; -lib fftw3f ; -lib fftw3l ; -lib fftw3q ; +searched-lib quadmath ; +searched-lib fftw3 ; +searched-lib fftw3f ; +searched-lib fftw3l ; +searched-lib fftw3q ; obj has_long_double_support : has_long_double_support.cpp ; obj has_mpfr_class : has_mpfr_class.cpp : diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 34e4a5a8c8..533557ffd6 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -7,10 +7,11 @@ # bring in the rules for testing import testing ; -import ../../config/checks/config : requires ; +import config : requires ; project : requirements + /boost/multiprecision//boost_multiprecision gcc:-Wno-missing-braces darwin:-Wno-missing-braces acc:+W2068,2461,2236,4070 @@ -36,7 +37,6 @@ project clang:-Wno-unknown-pragmas clang:-Wno-language-extension-token - ../../.. ../include_private off:../test//no_eh [ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ] @@ -53,7 +53,7 @@ test-suite examples : [ run binomial_example_nag.cpp ] [ run binomial_quiz_example.cpp : : : off:no ] [ run binomial_sample_sizes.cpp ] - [ run brent_minimise_example.cpp : : : [ requires cxx11_hdr_tuple ] ] + [ run brent_minimise_example.cpp /boost/test//boost_test : : : [ requires cxx11_hdr_tuple ] ] [ run c_error_policy_example.cpp ] [ run chi_square_std_dev_test.cpp : : : off:no ] @@ -93,11 +93,11 @@ test-suite examples : [ run nonfinite_num_facet.cpp ] [ run nonfinite_facet_simple.cpp ] - #[ run nonfinite_num_facet_serialization.cpp ../../serialization/build//boost_serialization : : : off:no gcc-mingw:static ] + #[ run nonfinite_num_facet_serialization.cpp /boost/serialization//boost_serialization : : : off:no gcc-mingw:static ] #[ # run lexical_cast_native.cpp ] # Expected to fail on some (but not all) platforms. [ run lexical_cast_nonfinite_facets.cpp ] [ run nonfinite_loopback_ok.cpp ] - #[ run nonfinite_serialization_archives.cpp ../../serialization/build//boost_serialization : : : off:no gcc-mingw:static ] + #[ run nonfinite_serialization_archives.cpp /boost/serialization//boost_serialization : : : off:no gcc-mingw:static ] [ run nonfinite_facet_sstream.cpp ] [ run constants_eg1.cpp ] @@ -113,7 +113,7 @@ test-suite examples : [ run policy_eg_6.cpp ] [ run policy_eg_7.cpp ] [ run policy_eg_8.cpp ] - [ run policy_eg_9.cpp ] + [ run policy_eg_9.cpp /boost/format//boost_format ] [ run policy_ref_snip1.cpp : : : off:no ] [ run policy_ref_snip10.cpp ] [ run policy_ref_snip11.cpp ] diff --git a/reporting/accuracy/Jamfile.v2 b/reporting/accuracy/Jamfile.v2 index a07e60083b..482b07f1d7 100644 --- a/reporting/accuracy/Jamfile.v2 +++ b/reporting/accuracy/Jamfile.v2 @@ -12,7 +12,7 @@ import testing ; import modules ; import path ; import pch ; -import ../../../config/checks/config : requires ; +import config : requires ; using quickbook ; using auto-index ; @@ -80,42 +80,42 @@ rule all-tests { local result ; for local source in [ glob test*.cpp ] { - result += [ run $(source) /boost/system /boost/filesystem /boost/test//boost_unit_test_framework + result += [ run $(source) /boost/system//boost_system /boost/filesystem//boost_filesystem /boost/test//boost_unit_test_framework /boost/interprocess//boost_interprocess /boost/multiprecision//boost_multiprecision /boost/type_index//boost_type_index quadmath mpfr : : : [ check-target-builds has_gsl : ALWAYS_TEST_DOUBLE : ] linux:-lpthread linux:-lrt gcc:$(OTHERFLAGS) ] ; - result += [ run $(source) /boost/system /boost/filesystem /boost/test//boost_unit_test_framework + result += [ run $(source) /boost/system//boost_system /boost/filesystem//boost_filesystem /boost/test//boost_unit_test_framework /boost/interprocess//boost_interprocess /boost/multiprecision//boost_multiprecision /boost/type_index//boost_type_index quadmath mpfr : : : [ check-target-builds has_cxx17_cmath : TEST_CXX17_CMATH : no ] linux:-lpthread linux:-lrt gcc:$(OTHERFLAGS) : $(source:B)_cxx17_cmath ] ; - result += [ run $(source) /boost/system /boost/filesystem /boost/test//boost_unit_test_framework + result += [ run $(source) /boost/system//boost_system /boost/filesystem//boost_filesystem /boost/test//boost_unit_test_framework /boost/interprocess//boost_interprocess /boost/multiprecision//boost_multiprecision /boost/type_index//boost_type_index quadmath mpfr : : : [ check-target-builds has_c99_cmath : TEST_C99 : no ] linux:-lpthread linux:-lrt gcc:$(OTHERFLAGS) : $(source:B)_c99 ] ; - result += [ run $(source) /boost/system /boost/filesystem /boost/test//boost_unit_test_framework gsl gslcblas + result += [ run $(source) /boost/system//boost_system /boost/filesystem//boost_filesystem /boost/test//boost_unit_test_framework /boost/interprocess//boost_interprocess /boost/multiprecision//boost_multiprecision /boost/type_index//boost_type_index gsl gslcblas : : : [ check-target-builds has_gsl : TEST_GSL : no ] linux:-lpthread linux:-lrt gcc:$(OTHERFLAGS) : $(source:B)_gsl ] ; - result += [ run $(source) /boost/system /boost/filesystem /boost/test//boost_unit_test_framework Rmath + result += [ run $(source) /boost/system//boost_system /boost/filesystem//boost_filesystem /boost/test//boost_unit_test_framework /boost/interprocess//boost_interprocess /boost/multiprecision//boost_multiprecision /boost/type_index//boost_type_index Rmath : : : [ check-target-builds has_rmath : TEST_RMATH : no ] linux:-lpthread linux:-lrt gcc:$(OTHERFLAGS) : $(source:B)_rmath ] ; - result += [ run $(source) /boost/system /boost/filesystem /boost/test//boost_unit_test_framework cephes_double + result += [ run $(source) /boost/system//boost_system /boost/filesystem//boost_filesystem /boost/test//boost_unit_test_framework /boost/interprocess//boost_interprocess /boost/multiprecision//boost_multiprecision /boost/type_index//boost_type_index cephes_double : : : [ check-target-builds $(here)/third_party/cephes_double/acosh.c : TEST_CEPHES cephes_double : no ] linux:-lpthread linux:-lrt @@ -159,25 +159,25 @@ boostbook standalone generate.section.toc.level=10 ; -lib gmp ; -lib mpfr ; -lib quadmath ; +searched-lib gmp : : shared ; +searched-lib mpfr : : shared ; +searched-lib quadmath : : shared ; # # Some manual tests that are expensive to run: # -run erf_error_plot.cpp mpfr gmp : : : release 17 [ check-target-builds ../../config//has_mpfr : : no ] : erf_error_plot_double ; +run erf_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp : : : release 17 [ check-target-builds ../../config//has_mpfr : : no ] : erf_error_plot_double ; explicit erf_error_plot_double ; -run erf_error_plot.cpp mpfr gmp : : : release 17 TEST_TYPE="\"long double\"" [ check-target-builds ../../config//has_mpfr : : no ] : erf_error_plot_long_double ; +run erf_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp : : : release 17 TEST_TYPE="\"long double\"" [ check-target-builds ../../config//has_mpfr : : no ] : erf_error_plot_long_double ; explicit erf_error_plot_long_double ; -run erf_error_plot.cpp mpfr gmp : : : release 17 TEST_TYPE=cpp_bin_float_50 [ check-target-builds ../../config//has_mpfr : : no ] : erf_error_plot_cpp_bin_float_50 ; +run erf_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp : : : release 17 TEST_TYPE=cpp_bin_float_50 [ check-target-builds ../../config//has_mpfr : : no ] : erf_error_plot_cpp_bin_float_50 ; explicit erf_error_plot_cpp_bin_float_50 ; -run erf_error_plot.cpp mpfr gmp quadmath : : : release 17 gnu TEST_TYPE=float128 [ check-target-builds ../../config//has_mpfr : : no ] : erf_error_plot_float128 ; +run erf_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp quadmath : : : release 17 gnu TEST_TYPE=float128 [ check-target-builds ../../config//has_mpfr : : no ] : erf_error_plot_float128 ; explicit erf_error_plot_cpp_bin_float_50 ; -run erfc_error_plot.cpp mpfr gmp : : : release 17 [ check-target-builds ../../config//has_mpfr : : no ] : erfc_error_plot_double ; +run erfc_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp : : : release 17 [ check-target-builds ../../config//has_mpfr : : no ] : erfc_error_plot_double ; explicit erfc_error_plot_double ; -run erfc_error_plot.cpp mpfr gmp : : : release 17 TEST_TYPE="\"long double\"" [ check-target-builds ../../config//has_mpfr : : no ] : erfc_error_plot_long_double ; +run erfc_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp : : : release 17 TEST_TYPE="\"long double\"" [ check-target-builds ../../config//has_mpfr : : no ] : erfc_error_plot_long_double ; explicit erfc_error_plot_long_double ; -run erfc_error_plot.cpp mpfr gmp : : : release 17 TEST_TYPE=cpp_bin_float_50 [ check-target-builds ../../config//has_mpfr : : no ] : erfc_error_plot_cpp_bin_float_50 ; +run erfc_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp : : : release 17 TEST_TYPE=cpp_bin_float_50 [ check-target-builds ../../config//has_mpfr : : no ] : erfc_error_plot_cpp_bin_float_50 ; explicit erfc_error_plot_cpp_bin_float_50 ; -run erfc_error_plot.cpp mpfr gmp quadmath : : : release 17 gnu TEST_TYPE=float128 [ check-target-builds ../../config//has_mpfr : : no ] : erfc_error_plot_float128 ; +run erfc_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp quadmath : : : release 17 gnu TEST_TYPE=float128 [ check-target-builds ../../config//has_mpfr : : no ] : erfc_error_plot_float128 ; explicit erfc_error_plot_cpp_bin_float_50 ; diff --git a/reporting/performance/Jamfile.v2 b/reporting/performance/Jamfile.v2 index 6ea5bc8a24..6d4a8ca58a 100644 --- a/reporting/performance/Jamfile.v2 +++ b/reporting/performance/Jamfile.v2 @@ -12,11 +12,11 @@ import testing ; import modules ; import path ; import pch ; -import ../../../config/checks/config : requires ; +import config : requires ; using quickbook ; using auto-index ; -import ../../../predef/check/predef +import predef : check require : predef-check predef-require ; @@ -39,9 +39,9 @@ if $(is_unix) # # Configuration first: # -lib gsl ; -lib gslcblas ; -lib Rmath ; +searched-lib gsl ; +searched-lib gslcblas ; +searched-lib Rmath ; obj has_libstdcxx_tr1 : ../accuracy/has_libstdcxx_tr1.cpp ; explicit has_libstdcxx_tr1 ; obj has_c99_cmath : has_c99_cmath.cpp ; @@ -95,14 +95,14 @@ lib dcdflib : $(here)/third_party/dcdflib/$(DCDFLIB_SOURCE) explicit dcdflib ; -obj table_helper : table_helper.cpp ; +obj table_helper : table_helper.cpp /boost/filesystem//boost_filesystem /boost/interprocess//boost_interprocess ; rule all-tests { local result ; for local source in [ glob test*.cpp ] { - result += [ run $(source) /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper - : : : release ../../test + result += [ run $(source) /boost/regex//boost_regex /boost/system//boost_system /boost/chrono//boost_chrono /boost/filesystem//boost_filesystem /boost/multiprecision//boost_multiprecision /boost/filesystem//boost_filesystem table_helper + : : : release ../../test [ check-target-builds ../accuracy//has_c99_cmath : TEST_C99 ] [ check-target-builds has_libstdcxx_tr1 : TEST_LIBSTDCXX ] [ check-target-builds ../accuracy//has_gsl : TEST_GSL gsl gslcblas ] @@ -120,35 +120,35 @@ rule all-tests { # Special cases to test different compiler options, # cbrt first as an example of a trivial function: # -run test_cbrt.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper +run test_cbrt.cpp /boost/regex//boost_regex /boost/system//boost_system /boost/chrono//boost_chrono /boost/filesystem//boost_filesystem table_helper : : : debug COMPILER_COMPARISON_TABLES [ predef-require "BOOST_COMP_MSVC" ] 32 : test_cbrt_msvc_debug ; -run test_cbrt.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper +run test_cbrt.cpp /boost/regex//boost_regex /boost/system//boost_system /boost/chrono//boost_chrono /boost/filesystem//boost_filesystem table_helper : : : release COMPILER_COMPARISON_TABLES [ predef-require "BOOST_COMP_MSVC" ] -Ox 32 : test_cbrt_msvc_release_32 ; -run test_cbrt.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper +run test_cbrt.cpp /boost/regex//boost_regex /boost/system//boost_system /boost/chrono//boost_chrono /boost/filesystem//boost_filesystem table_helper : : : release COMPILER_COMPARISON_TABLES [ predef-require "BOOST_COMP_MSVC" ] -Ox 64 : test_cbrt_msvc_release_64 ; -run test_cbrt.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper +run test_cbrt.cpp /boost/regex//boost_regex /boost/system//boost_system /boost/chrono//boost_chrono /boost/filesystem//boost_filesystem table_helper : : : release COMPILER_COMPARISON_TABLES [ check-target-builds is_intel_win : : no ] intel:-Ox 64 : test_cbrt_intel_release ; # # Now jn as a little more complex: # -run test_jn.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper +run test_jn.cpp /boost/regex//boost_regex /boost/system//boost_system /boost/chrono//boost_chrono /boost/filesystem//boost_filesystem table_helper : : : debug COMPILER_COMPARISON_TABLES ../../test [ predef-require "BOOST_COMP_MSVC" ] 32 : test_jn_msvc_debug ; -run test_jn.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper +run test_jn.cpp /boost/regex//boost_regex /boost/system//boost_system /boost/chrono//boost_chrono /boost/filesystem//boost_filesystem table_helper : : : release COMPILER_COMPARISON_TABLES ../../test [ predef-require "BOOST_COMP_MSVC" ] -Ox 32 : test_jn_msvc_release_32 ; -run test_jn.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper +run test_jn.cpp /boost/regex//boost_regex /boost/system//boost_system /boost/chrono//boost_chrono /boost/filesystem//boost_filesystem table_helper : : : release COMPILER_COMPARISON_TABLES ../../test [ predef-require "BOOST_COMP_MSVC" ] -Ox 64 : test_jn_msvc_release_64 ; -run test_jn.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper +run test_jn.cpp /boost/regex//boost_regex /boost/system//boost_system /boost/chrono//boost_chrono /boost/filesystem//boost_filesystem table_helper : : : release COMPILER_COMPARISON_TABLES ../../test [ check-target-builds is_intel_win : : no ] 64 : test_jn_intel_release ; # # Then something really expensive, like the inverse-incomplete-beta: # -run test_ibeta_inv.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper +run test_ibeta_inv.cpp /boost/regex//boost_regex /boost/system//boost_system /boost/chrono//boost_chrono /boost/filesystem//boost_filesystem table_helper : : : debug COMPILER_COMPARISON_TABLES ../../test [ predef-require "BOOST_COMP_MSVC" ] 32 : test_ibeta_inv_msvc_debug ; -run test_ibeta_inv.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper +run test_ibeta_inv.cpp /boost/regex//boost_regex /boost/system//boost_system /boost/chrono//boost_chrono /boost/filesystem//boost_filesystem table_helper : : : release COMPILER_COMPARISON_TABLES ../../test [ predef-require "BOOST_COMP_MSVC" ] -Ox 32 : test_ibeta_inv_msvc_release_32 ; -run test_ibeta_inv.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper +run test_ibeta_inv.cpp /boost/regex//boost_regex /boost/system//boost_system /boost/chrono//boost_chrono /boost/filesystem//boost_filesystem table_helper : : : release COMPILER_COMPARISON_TABLES ../../test [ predef-require "BOOST_COMP_MSVC" ] -Ox 64 : test_ibeta_inv_msvc_release_64 ; -run test_ibeta_inv.cpp /boost/regex//boost_regex /boost/system /boost/chrono /boost/filesystem table_helper +run test_ibeta_inv.cpp /boost/regex//boost_regex /boost/system//boost_system /boost/chrono//boost_chrono /boost/filesystem//boost_filesystem table_helper : : : release COMPILER_COMPARISON_TABLES ../../test [ check-target-builds is_intel_win : : no ] intel:-Ox 64 : test_ibeta_inv_intel_release ; test-suite report_gen : [ all-tests ] test_cbrt_msvc_debug test_cbrt_msvc_release_32 test_cbrt_msvc_release_64 test_cbrt_intel_release diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index cce2a8fcf8..03ca2f6ff0 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -12,7 +12,7 @@ import testing ; import modules ; import path ; import pch ; -import ../../config/checks/config : requires ; +import config : requires ; local ntl-path = [ modules.peek : NTL_PATH ] ; local gmp_path = [ modules.peek : GMP_PATH ] ; @@ -34,6 +34,10 @@ obj no_eh : noeh_support.cpp ; project : requirements + /boost/multiprecision//boost_multiprecision + /boost/test//boost_test + /boost/type_index//boost_type_index + /boost/ublas//boost_ublas $(OBJ_REMOVAL_OPTIONS) acc:+W2068,2461,2236,4070,4069 intel-win:-nologo @@ -58,7 +62,6 @@ project borland:static # msvc:/wd4506 has no effect? # suppress xstring(237) : warning C4506: no definition for inline function - ../../.. off:no_eh shared:BOOST_REGEX_DYN_LINK=1 # For simplicities sake, make everything a static lib: @@ -83,176 +86,183 @@ if $(ntl-path) } else { - lib ntl ; + searched-lib ntl ; } explicit ntl ; -cpp-pch pch : pch.hpp : ../../test/build//boost_unit_test_framework ; -cpp-pch pch_light : pch_light.hpp : ../../test/build//boost_unit_test_framework ; +cpp-pch pch : pch.hpp : /boost/test//boost_unit_test_framework ; +cpp-pch pch_light : pch_light.hpp : /boost/test//boost_unit_test_framework ; lib compile_test_main : compile_test/main.cpp ; +searched-lib quadmath : : shared ; +alias float128_type : : : : + [ check-target-builds ../config//has_intel_quad "Intel _Quad datatype support" : -Qoption,cpp,--extended_float_type BOOST_MATH_USE_FLOAT128 ] + [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : gcc:quadmath gcc:BOOST_MATH_TEST_FLOAT128 ] + [ check-target-builds ../config//has_128bit_floatmax_t "128-bit floatmax_t" : gcc:quadmath gcc:BOOST_MATH_TEST_FLOAT128 : no ] + ; + test-suite special_fun : - [ run test_1F0.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=1 : test_1F0_1 ] # hypergeometric_pFq_checked_series.hpp uses auto, the rest are from quadrature tests. - [ run test_1F0.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=2 : test_1F0_2 ] # hypergeometric_pFq_checked_series.hpp uses auto, the rest are from quadrature tests. - [ run test_1F0.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 : test_1F0_3 ] # hypergeometric_pFq_checked_series.hpp uses auto, the rest are from quadrature tests. - [ run test_2F0.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] TEST=1 : test_2F0_1 ] - [ run test_2F0.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] TEST=2 : test_2F0_2 ] - [ run test_2F0.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] TEST=3 : test_2F0_3 ] - [ run test_2F0.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] TEST=4 : test_2F0_4 ] + [ run test_1F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=1 : test_1F0_1 ] # hypergeometric_pFq_checked_series.hpp uses auto, the rest are from quadrature tests. + [ run test_1F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=2 : test_1F0_2 ] # hypergeometric_pFq_checked_series.hpp uses auto, the rest are from quadrature tests. + [ run test_1F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 : test_1F0_3 ] # hypergeometric_pFq_checked_series.hpp uses auto, the rest are from quadrature tests. + [ run test_2F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] float128_type TEST=1 : test_2F0_1 ] + [ run test_2F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] float128_type TEST=2 : test_2F0_2 ] + [ run test_2F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] float128_type TEST=3 : test_2F0_3 ] + [ run test_2F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] float128_type TEST=4 : test_2F0_4 ] - [ run test_0F1.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=1 : test_0F1_1 ] - [ run test_0F1.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=2 : test_0F1_2 ] + [ run test_0F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=1 : test_0F1_1 ] + [ run test_0F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=2 : test_0F1_2 ] - [ run test_1F1.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=1 clang:-Wno-literal-range : test_1F1_integrals ] - [ run test_1F1.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=2 clang:-Wno-literal-range : test_1F1_float ] - [ run test_1F1.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 clang:-Wno-literal-range : test_1F1_double ] - [ run test_1F1.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=4 release clang:-Wno-literal-range : test_1F1_long_double ] + [ run test_1F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=1 clang:-Wno-literal-range : test_1F1_integrals ] + [ run test_1F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=2 clang:-Wno-literal-range : test_1F1_float ] + [ run test_1F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 clang:-Wno-literal-range : test_1F1_double ] + [ run test_1F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=4 release clang:-Wno-literal-range : test_1F1_long_double ] - [ run test_1F1_regularized.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=2 clang:-Wno-literal-range : test_1F1_regularized_float ] - [ run test_1F1_regularized.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 clang:-Wno-literal-range : test_1F1_regularized_double ] - [ run test_1F1_regularized.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=4 release clang:-Wno-literal-range : test_1F1_regularized_long_double ] - [ run test_1F1_regularized.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=5 clang:-Wno-literal-range : test_1F1_regularized_real_concept ] + [ run test_1F1_regularized.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=2 clang:-Wno-literal-range : test_1F1_regularized_float ] + [ run test_1F1_regularized.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 clang:-Wno-literal-range : test_1F1_regularized_double ] + [ run test_1F1_regularized.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=4 release clang:-Wno-literal-range : test_1F1_regularized_long_double ] + [ run test_1F1_regularized.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=5 clang:-Wno-literal-range : test_1F1_regularized_real_concept ] # These are slow... - [ run test_1F1_log.cpp ../../test/build//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=2 clang:-Wno-literal-range : test_1F1_log_float ] - [ run test_1F1_log.cpp ../../test/build//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 clang:-Wno-literal-range : test_1F1_log_double ] - [ run test_1F1_log.cpp ../../test/build//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=4 release clang:-Wno-literal-range : test_1F1_log_long_double ] - [ run test_1F1_log.cpp ../../test/build//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=5 clang:-Wno-literal-range : test_1F1_log_real_concept ] + [ run test_1F1_log.cpp /boost/test//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=2 clang:-Wno-literal-range : test_1F1_log_float ] + [ run test_1F1_log.cpp /boost/test//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 clang:-Wno-literal-range : test_1F1_log_double ] + [ run test_1F1_log.cpp /boost/test//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=4 release clang:-Wno-literal-range : test_1F1_log_long_double ] + [ run test_1F1_log.cpp /boost/test//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=5 clang:-Wno-literal-range : test_1F1_log_real_concept ] # pFq: - [ run test_pFq.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=2 release clang:-Wno-literal-range : test_pFq_float ] - [ run test_pFq.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 release clang:-Wno-literal-range : test_pFq_double ] - [ run test_pFq.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=4 release clang:-Wno-literal-range : test_pFq_long_double ] - [ run test_pFq.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=5 release clang:-Wno-literal-range : test_pFq_real_concept ] + [ run test_pFq.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=2 release clang:-Wno-literal-range : test_pFq_float ] + [ run test_pFq.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 release clang:-Wno-literal-range : test_pFq_double ] + [ run test_pFq.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=4 release clang:-Wno-literal-range : test_pFq_long_double ] + [ run test_pFq.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=5 release clang:-Wno-literal-range : test_pFq_real_concept ] - [ run hypot_test.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run pow_test.cpp ../../test/build//boost_unit_test_framework ] - [ run logaddexp_test.cpp ../../test/build//boost_unit_test_framework ] - [ run logsumexp_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_variadic_templates ] ] - [ run ccmath_sqrt_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_isinf_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_isnan_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_abs_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_isfinite_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_isnormal_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_fpclassify_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_frexp_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_ldexp_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_div_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_logb_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_ilogb_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_scalbn_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_scalbln_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_floor_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_ceil_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_trunc_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_modf_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_round_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_fmod_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_remainder_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_copysign_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_hypot_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_fdim_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_fmax_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_fmin_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_isgreater_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_isgreaterequal_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_isless_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_islessequal_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_isunordered_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_next_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_fma_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run ccmath_signbit_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run log1p_expm1_test.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run powm1_sqrtp1m1_test.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run git_issue_705.cpp ../../test/build//boost_unit_test_framework ] - [ run git_issue_810.cpp ../../test/build//boost_unit_test_framework ] - [ run git_issue_826.cpp ../../test/build//boost_unit_test_framework ] + [ run hypot_test.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run pow_test.cpp /boost/test//boost_unit_test_framework ] + [ run logaddexp_test.cpp /boost/test//boost_unit_test_framework ] + [ run logsumexp_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_variadic_templates ] ] + [ run ccmath_sqrt_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_isinf_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_isnan_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_abs_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_isfinite_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_isnormal_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_fpclassify_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_frexp_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_ldexp_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_div_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_logb_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_ilogb_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_scalbn_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_scalbln_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_floor_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_ceil_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_trunc_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_modf_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_round_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_fmod_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_remainder_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_copysign_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_hypot_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_fdim_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_fmax_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_fmin_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_isgreater_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_isgreaterequal_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_isless_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_islessequal_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_isunordered_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_next_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_fma_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_signbit_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run log1p_expm1_test.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run powm1_sqrtp1m1_test.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run git_issue_705.cpp /boost/test//boost_unit_test_framework ] + [ run git_issue_810.cpp /boost/test//boost_unit_test_framework ] + [ run git_issue_826.cpp /boost/test//boost_unit_test_framework ] [ run git_issue_961.cpp ] [ run git_issue_1006.cpp ] [ run git_issue_184.cpp ] - [ run special_functions_test.cpp ../../test/build//boost_unit_test_framework ] - [ run test_airy.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_bessel_j.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_bessel_y.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_bessel_i.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_bessel_k.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_bessel_j_prime.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_bessel_y_prime.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_bessel_i_prime.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_bessel_k_prime.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run bessel_iterator_test.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_beta.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_bessel_airy_zeros.cpp ../../test/build//boost_unit_test_framework ] - [ run test_bernoulli_constants.cpp ../../test/build//boost_unit_test_framework ] - [ run test_binomial_coeff.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_carlson.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run special_functions_test.cpp /boost/test//boost_unit_test_framework ] + [ run test_airy.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_bessel_j.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_bessel_y.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_bessel_i.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_bessel_k.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_bessel_j_prime.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_bessel_y_prime.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_bessel_i_prime.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_bessel_k_prime.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run bessel_iterator_test.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_beta.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_bessel_airy_zeros.cpp /boost/test//boost_unit_test_framework ] + [ run test_bernoulli_constants.cpp /boost/test//boost_unit_test_framework ] + [ run test_binomial_coeff.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_carlson.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST1 : test_carlson_1 ] - [ run test_carlson.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_carlson.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST2 : test_carlson_2 ] - [ run test_carlson.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_carlson.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST3 : test_carlson_3 ] - [ run test_carlson.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_carlson.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST4 : test_carlson_4 ] - [ run test_cbrt.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_difference.cpp ../../test/build//boost_unit_test_framework ] - [ run test_digamma.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_ellint_1.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_ellint_2.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_ellint_3.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_ellint_d.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_jacobi_theta.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] ] - [ run test_jacobi_zeta.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_heuman_lambda.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_erf.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] + [ run test_cbrt.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_difference.cpp /boost/test//boost_unit_test_framework ] + [ run test_digamma.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_ellint_1.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_ellint_2.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_ellint_3.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_ellint_d.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_jacobi_theta.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] ] + [ run test_jacobi_zeta.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_heuman_lambda.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_erf.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] [ run erf_limits_test.cpp ] - [ run test_expint.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_factorials.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_gamma.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] + [ run test_expint.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_factorials.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_gamma.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] [ run test_gamma_edge.cpp ] - [ run test_gamma_mp.cpp ../../test/build//boost_unit_test_framework : : : release TEST=1 [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_gamma_mp_1 ] - [ run test_gamma_mp.cpp ../../test/build//boost_unit_test_framework : : : release TEST=2 [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_gamma_mp_2 ] - [ run test_gamma_mp.cpp ../../test/build//boost_unit_test_framework : : : release TEST=3 [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_gamma_mp_3 ] - [ run test_hankel.cpp ../../test/build//boost_unit_test_framework ] - [ run test_hermite.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_ibeta.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_gamma_mp.cpp /boost/test//boost_unit_test_framework : : : release TEST=1 [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_gamma_mp_1 ] + [ run test_gamma_mp.cpp /boost/test//boost_unit_test_framework : : : release TEST=2 [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_gamma_mp_2 ] + [ run test_gamma_mp.cpp /boost/test//boost_unit_test_framework : : : release TEST=3 [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_gamma_mp_3 ] + [ run test_hankel.cpp /boost/test//boost_unit_test_framework ] + [ run test_hermite.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_ibeta.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_FLOAT intel:off : test_ibeta_float ] - [ run test_ibeta.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_DOUBLE intel:off : test_ibeta_double ] - [ run test_ibeta.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_LDOUBLE intel:off : test_ibeta_long_double ] - [ run test_ibeta.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -260,7 +270,7 @@ test-suite special_fun : TEST_DATA=1 intel:off : test_ibeta_real_concept1 ] - [ run test_ibeta.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -268,7 +278,7 @@ test-suite special_fun : TEST_DATA=2 intel:off : test_ibeta_real_concept2 ] - [ run test_ibeta.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -276,7 +286,7 @@ test-suite special_fun : TEST_DATA=3 intel:off : test_ibeta_real_concept3 ] - [ run test_ibeta.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -285,7 +295,7 @@ test-suite special_fun : intel:off : test_ibeta_real_concept4 ] - [ run test_ibeta_derivative.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_derivative.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -293,7 +303,7 @@ test-suite special_fun : intel:off gcc:-Wno-overflow : test_ibeta_derivative_float ] - [ run test_ibeta_derivative.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_derivative.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -301,7 +311,7 @@ test-suite special_fun : intel:off gcc:-Wno-overflow : test_ibeta_derivative_double ] - [ run test_ibeta_derivative.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_derivative.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -309,7 +319,7 @@ test-suite special_fun : intel:off gcc:-Wno-overflow : test_ibeta_derivative_long_double ] - [ run test_ibeta_derivative.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_derivative.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -318,7 +328,7 @@ test-suite special_fun : intel:off gcc:-Wno-overflow : test_ibeta_derivative_real_concept1 ] - [ run test_ibeta_derivative.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_derivative.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -327,7 +337,7 @@ test-suite special_fun : intel:off gcc:-Wno-overflow : test_ibeta_derivative_real_concept2 ] - [ run test_ibeta_derivative.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_derivative.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -336,7 +346,7 @@ test-suite special_fun : intel:off gcc:-Wno-overflow : test_ibeta_derivative_real_concept3 ] - [ run test_ibeta_derivative.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_derivative.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -346,28 +356,28 @@ test-suite special_fun : gcc:-Wno-overflow : test_ibeta_derivative_real_concept4 ] - [ run test_ibeta_inv.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_inv.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_FLOAT intel:off : test_ibeta_inv_float ] - [ run test_ibeta_inv.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_inv.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_DOUBLE intel:off : test_ibeta_inv_double ] - [ run test_ibeta_inv.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_inv.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_LDOUBLE intel:off : test_ibeta_inv_long_double ] - [ run test_ibeta_inv.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_inv.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -375,7 +385,7 @@ test-suite special_fun : TEST_DATA=1 intel:off : test_ibeta_inv_real_concept1 ] - [ run test_ibeta_inv.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_inv.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -383,7 +393,7 @@ test-suite special_fun : TEST_DATA=2 intel:off : test_ibeta_inv_real_concept2 ] - [ run test_ibeta_inv.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_inv.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -391,7 +401,7 @@ test-suite special_fun : TEST_DATA=3 intel:off : test_ibeta_inv_real_concept3 ] - [ run test_ibeta_inv.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_inv.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -399,28 +409,28 @@ test-suite special_fun : TEST_DATA=4 intel:off : test_ibeta_inv_real_concept4 ] - [ run test_ibeta_inv_ab.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_inv_ab.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_FLOAT intel:off : test_ibeta_inv_ab_float ] - [ run test_ibeta_inv_ab.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_inv_ab.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_DOUBLE intel:off : test_ibeta_inv_ab_double ] - [ run test_ibeta_inv_ab.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_inv_ab.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_LDOUBLE intel:off : test_ibeta_inv_ab_long_double ] - [ run test_ibeta_inv_ab.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_inv_ab.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -428,7 +438,7 @@ test-suite special_fun : TEST_DATA=1 intel:off : test_ibeta_inv_ab_real_concept1 ] - [ run test_ibeta_inv_ab.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_inv_ab.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -436,7 +446,7 @@ test-suite special_fun : TEST_DATA=2 intel:off : test_ibeta_inv_ab_real_concept2 ] - [ run test_ibeta_inv_ab.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_ibeta_inv_ab.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -444,57 +454,57 @@ test-suite special_fun : TEST_DATA=3 intel:off : test_ibeta_inv_ab_real_concept3 ] - [ run test_igamma.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_igamma_inv.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_igamma.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_igamma_inv.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_FLOAT intel:off : test_igamma_inv_float ] - [ run test_igamma_inv.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_igamma_inv.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_DOUBLE intel:off : test_igamma_inv_double ] - [ run test_igamma_inv.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_igamma_inv.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_LDOUBLE intel:off : test_igamma_inv_long_double ] - [ run test_igamma_inv.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_igamma_inv.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_REAL_CONCEPT intel:off : test_igamma_inv_real_concept ] - [ run test_igamma_inva.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_igamma_inva.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_FLOAT intel:off : test_igamma_inva_float ] - [ run test_igamma_inva.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_igamma_inva.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_DOUBLE intel:off : test_igamma_inva_double ] - [ run test_igamma_inva.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_igamma_inva.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_LDOUBLE intel:off : test_igamma_inva_long_double ] - [ run test_igamma_inva.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework + [ run test_igamma_inva.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -504,23 +514,23 @@ test-suite special_fun : [ run test_instantiate1.cpp test_instantiate2.cpp ] [ run test_instantiate1.cpp test_instantiate2.cpp : : : off : test_instantiate_no_eh ] [ run test_instantiate3.cpp ] - [ run test_jacobi.cpp pch_light ../../test/build//boost_unit_test_framework ] - [ run test_laguerre.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] + [ run test_jacobi.cpp pch_light /boost/test//boost_unit_test_framework ] + [ run test_laguerre.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] - [ run test_lambert_w.cpp ../../test/build//boost_unit_test_framework ] - [ run test_lambert_w.cpp ../../test/build//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=1 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_1 ] - [ run test_lambert_w.cpp ../../test/build//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=2 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_2 ] - [ run test_lambert_w.cpp ../../test/build//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=3 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_3 ] - [ run test_lambert_w.cpp ../../test/build//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=4 BOOST_MATH_TEST_FLOAT128 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_4 ] - [ run test_lambert_w_integrals_float128.cpp ../../test/build//boost_unit_test_framework : : : release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : "-Bstatic -lquadmath -Bdynamic" : no ] [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ run test_lambert_w_integrals_quad.cpp ../../test/build//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ run test_lambert_w_integrals_long_double.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] ] - [ run test_lambert_w_integrals_double.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] ] - [ run test_lambert_w_integrals_float.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] ] - [ run test_lambert_w_derivative.cpp ../../test/build//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] + [ run test_lambert_w.cpp /boost/test//boost_unit_test_framework ] + [ run test_lambert_w.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=1 float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_1 ] + [ run test_lambert_w.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=2 float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_2 ] + [ run test_lambert_w.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=3 float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_3 ] + [ run test_lambert_w.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=4 BOOST_MATH_TEST_FLOAT128 float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_4 ] + [ run test_lambert_w_integrals_float128.cpp /boost/test//boost_unit_test_framework : : : release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : "-Bstatic -lquadmath -Bdynamic" : no ] [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run test_lambert_w_integrals_quad.cpp /boost/test//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run test_lambert_w_integrals_long_double.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] ] + [ run test_lambert_w_integrals_double.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] ] + [ run test_lambert_w_integrals_float.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] ] + [ run test_lambert_w_derivative.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION float128_type ] - [ run test_legendre.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework : : : [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : "-Bstatic -lquadmath -Bdynamic" ] ] - [ run chebyshev_test.cpp : : : [ requires cxx11_inline_namespaces cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_range_based_for cxx11_constexpr ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : "-Bstatic -lquadmath -Bdynamic" ] ] + [ run test_legendre.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : : : float128_type ] + [ run chebyshev_test.cpp : : : [ requires cxx11_inline_namespaces cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_range_based_for cxx11_constexpr ] float128_type ] [ run chebyshev_transform_test.cpp ../config//fftw3f : : : TEST1 [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_range_based_for ] [ check-target-builds ../config//has_fftw3 "libfftw3" : : no ] : chebyshev_transform_test_1 ] [ run chebyshev_transform_test.cpp ../config//fftw3 : : : TEST2 [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_range_based_for ] [ check-target-builds ../config//has_fftw3 "libfftw3" : : no ] : chebyshev_transform_test_2 ] [ run chebyshev_transform_test.cpp ../config//fftw3l : : : TEST3 [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_range_based_for ] [ check-target-builds ../config//has_fftw3 "libfftw3" : : no ] : chebyshev_transform_test_3 ] @@ -532,52 +542,52 @@ test-suite special_fun : [ run cardinal_trigonometric_test.cpp ../config//fftw3q ../config//quadmath : : : TEST4 [ requires cxx11_auto_declarations cxx11_range_based_for ] [ check-target-builds ../config//has_fftw3 "libfftw3" : : no ] [ check-target-builds ../config//has_float128 "__float128" : : no ] : cardinal_trigonometric_test_4 ] - [ run test_ldouble_simple.cpp ../../test/build//boost_unit_test_framework ] + [ run test_ldouble_simple.cpp /boost/test//boost_unit_test_framework ] # Needs to run in release mode, as it's rather slow: - [ run test_next.cpp pch ../../test/build//boost_unit_test_framework : : : release ] - [ run test_next_decimal.cpp pch ../../test/build//boost_unit_test_framework : : : release ] - [ run test_owens_t.cpp ../../test/build//boost_unit_test_framework ] - [ run test_polygamma.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_trigamma.cpp test_instances//test_instances ../../test/build//boost_unit_test_framework ] - [ run test_round.cpp pch ../../test/build//boost_unit_test_framework ] - [ run git_issue_430.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_spherical_harmonic.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_sign.cpp ../../test/build//boost_unit_test_framework ] - [ run test_tgamma_for_issue396_part1.cpp ../../test/build//boost_unit_test_framework : : : [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : "-Bstatic -lquadmath -Bdynamic" ] gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] - [ run test_tgamma_for_issue396_part2.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] - [ run test_tgamma_ratio.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_trig.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ] - [ run test_zeta.cpp ../../test/build//boost_unit_test_framework test_instances//test_instances pch_light ] - [ run test_sinc.cpp ../../test/build//boost_unit_test_framework pch_light ] - [ run test_fibonacci.cpp ../../test/build//boost_unit_test_framework ] + [ run test_next.cpp pch /boost/test//boost_unit_test_framework : : : release ] + [ run test_next_decimal.cpp pch /boost/test//boost_unit_test_framework : : : release ] + [ run test_owens_t.cpp /boost/test//boost_unit_test_framework ] + [ run test_polygamma.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_trigamma.cpp test_instances//test_instances /boost/test//boost_unit_test_framework ] + [ run test_round.cpp pch /boost/test//boost_unit_test_framework ] + [ run git_issue_430.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_spherical_harmonic.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_sign.cpp /boost/test//boost_unit_test_framework ] + [ run test_tgamma_for_issue396_part1.cpp /boost/test//boost_unit_test_framework : : : float128_type gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] + [ run test_tgamma_for_issue396_part2.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] + [ run test_tgamma_ratio.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_trig.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_zeta.cpp /boost/test//boost_unit_test_framework test_instances//test_instances pch_light ] + [ run test_sinc.cpp /boost/test//boost_unit_test_framework pch_light ] + [ run test_fibonacci.cpp /boost/test//boost_unit_test_framework ] ; test-suite distribution_tests : - [ run test_arcsine.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_bernoulli.cpp ../../test/build//boost_unit_test_framework ] - [ run test_beta_dist.cpp ../../test/build//boost_unit_test_framework ] - [ run test_binomial.cpp ../../test/build//boost_unit_test_framework + [ run test_arcsine.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_bernoulli.cpp /boost/test//boost_unit_test_framework ] + [ run test_beta_dist.cpp /boost/test//boost_unit_test_framework ] + [ run test_binomial.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_FLOAT intel:off : test_binomial_float ] - [ run test_binomial.cpp ../../test/build//boost_unit_test_framework + [ run test_binomial.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_DOUBLE intel:off : test_binomial_double ] - [ run test_binomial.cpp ../../test/build//boost_unit_test_framework + [ run test_binomial.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_LDOUBLE intel:off : test_binomial_long_double ] - [ run test_binomial.cpp ../../test/build//boost_unit_test_framework + [ run test_binomial.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -585,7 +595,7 @@ test-suite distribution_tests : TEST_ROUNDING=0 intel:off : test_binomial_real_concept0 ] - [ run test_binomial.cpp ../../test/build//boost_unit_test_framework + [ run test_binomial.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -593,7 +603,7 @@ test-suite distribution_tests : TEST_ROUNDING=1 intel:off : test_binomial_real_concept1 ] - [ run test_binomial.cpp ../../test/build//boost_unit_test_framework + [ run test_binomial.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -601,7 +611,7 @@ test-suite distribution_tests : TEST_ROUNDING=2 intel:off : test_binomial_real_concept2 ] - [ run test_binomial.cpp ../../test/build//boost_unit_test_framework + [ run test_binomial.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -609,7 +619,7 @@ test-suite distribution_tests : TEST_ROUNDING=3 intel:off : test_binomial_real_concept3 ] - [ run test_binomial.cpp ../../test/build//boost_unit_test_framework + [ run test_binomial.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -617,7 +627,7 @@ test-suite distribution_tests : TEST_ROUNDING=4 intel:off : test_binomial_real_concept4 ] - [ run test_binomial.cpp ../../test/build//boost_unit_test_framework + [ run test_binomial.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -625,7 +635,7 @@ test-suite distribution_tests : TEST_ROUNDING=5 intel:off : test_binomial_real_concept5 ] - [ run test_binomial.cpp ../../test/build//boost_unit_test_framework + [ run test_binomial.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -633,145 +643,145 @@ test-suite distribution_tests : TEST_ROUNDING=6 intel:off : test_binomial_real_concept6 ] - [ run test_cauchy.cpp ../../test/build//boost_unit_test_framework ] - [ run test_chi_squared.cpp ../../test/build//boost_unit_test_framework ] - [ run test_dist_overloads.cpp ../../test/build//boost_unit_test_framework ] - [ run test_exponential_dist.cpp ../../test/build//boost_unit_test_framework ] - [ run test_extreme_value.cpp ../../test/build//boost_unit_test_framework ] - [ run test_find_location.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_find_scale.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_fisher_f.cpp ../../test/build//boost_unit_test_framework ] - [ run test_gamma_dist.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_geometric.cpp ../../test/build//boost_unit_test_framework ] - [ run test_hyperexponential_dist.cpp ../../test/build//boost_unit_test_framework ] - [ run test_hypergeometric_dist.cpp ../../test/build//boost_unit_test_framework + [ run test_cauchy.cpp /boost/test//boost_unit_test_framework ] + [ run test_chi_squared.cpp /boost/test//boost_unit_test_framework ] + [ run test_dist_overloads.cpp /boost/test//boost_unit_test_framework ] + [ run test_exponential_dist.cpp /boost/test//boost_unit_test_framework ] + [ run test_extreme_value.cpp /boost/test//boost_unit_test_framework ] + [ run test_find_location.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_find_scale.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_fisher_f.cpp /boost/test//boost_unit_test_framework ] + [ run test_gamma_dist.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_geometric.cpp /boost/test//boost_unit_test_framework ] + [ run test_hyperexponential_dist.cpp /boost/test//boost_unit_test_framework ] + [ run test_hypergeometric_dist.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_QUANT=0 intel:off : test_hypergeometric_dist0 ] - [ run test_hypergeometric_dist.cpp ../../test/build//boost_unit_test_framework + [ run test_hypergeometric_dist.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_QUANT=1 intel:off : test_hypergeometric_dist1 ] - [ run test_hypergeometric_dist.cpp ../../test/build//boost_unit_test_framework + [ run test_hypergeometric_dist.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_QUANT=2 intel:off : test_hypergeometric_dist2 ] - [ run test_hypergeometric_dist.cpp ../../test/build//boost_unit_test_framework + [ run test_hypergeometric_dist.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_QUANT=3 intel:off : test_hypergeometric_dist3 ] - [ run test_hypergeometric_dist.cpp ../../test/build//boost_unit_test_framework + [ run test_hypergeometric_dist.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_QUANT=4 intel:off : test_hypergeometric_dist4 ] - [ run test_hypergeometric_dist.cpp ../../test/build//boost_unit_test_framework + [ run test_hypergeometric_dist.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_QUANT=5 intel:off : test_hypergeometric_dist5 ] - [ run test_inverse_chi_squared_distribution.cpp ../../test/build//boost_unit_test_framework ] - [ run test_inverse_gamma_distribution.cpp ../../test/build//boost_unit_test_framework ] - [ run test_inverse_gaussian.cpp ../../test/build//boost_unit_test_framework ] - [ run test_kolmogorov_smirnov.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] ] - [ run test_laplace.cpp ../../test/build//boost_unit_test_framework ] - [ run test_inv_hyp.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_logistic_dist.cpp ../../test/build//boost_unit_test_framework ] - [ run test_lognormal.cpp ../../test/build//boost_unit_test_framework ] - [ run test_negative_binomial.cpp ../../test/build//boost_unit_test_framework + [ run test_inverse_chi_squared_distribution.cpp /boost/test//boost_unit_test_framework ] + [ run test_inverse_gamma_distribution.cpp /boost/test//boost_unit_test_framework ] + [ run test_inverse_gaussian.cpp /boost/test//boost_unit_test_framework ] + [ run test_kolmogorov_smirnov.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] ] + [ run test_laplace.cpp /boost/test//boost_unit_test_framework ] + [ run test_inv_hyp.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_logistic_dist.cpp /boost/test//boost_unit_test_framework ] + [ run test_lognormal.cpp /boost/test//boost_unit_test_framework ] + [ run test_negative_binomial.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_FLOAT intel:off : test_negative_binomial_float ] - [ run test_negative_binomial.cpp ../../test/build//boost_unit_test_framework + [ run test_negative_binomial.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_DOUBLE intel:off : test_negative_binomial_double ] - [ run test_negative_binomial.cpp ../../test/build//boost_unit_test_framework + [ run test_negative_binomial.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_LDOUBLE intel:off : test_negative_binomial_long_double ] - [ run test_negative_binomial.cpp ../../test/build//boost_unit_test_framework + [ run test_negative_binomial.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_REAL_CONCEPT intel:off : test_negative_binomial_real_concept ] - [ run test_nc_chi_squared.cpp pch ../../test/build//boost_unit_test_framework + [ run test_nc_chi_squared.cpp pch /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_FLOAT intel:off : test_nc_chi_squared_float ] - [ run test_nc_chi_squared.cpp pch ../../test/build//boost_unit_test_framework + [ run test_nc_chi_squared.cpp pch /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_DOUBLE intel:off : test_nc_chi_squared_double ] - [ run test_nc_chi_squared.cpp pch ../../test/build//boost_unit_test_framework + [ run test_nc_chi_squared.cpp pch /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_LDOUBLE intel:off : test_nc_chi_squared_long_double ] - [ run test_nc_chi_squared.cpp pch ../../test/build//boost_unit_test_framework + [ run test_nc_chi_squared.cpp pch /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_REAL_CONCEPT intel:off : test_nc_chi_squared_real_concept ] - [ run test_nc_beta.cpp ../../test/build//boost_unit_test_framework + [ run test_nc_beta.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_FLOAT intel:off : test_nc_beta_float ] - [ run test_nc_beta.cpp ../../test/build//boost_unit_test_framework + [ run test_nc_beta.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_DOUBLE intel:off : test_nc_beta_double ] - [ run test_nc_beta.cpp ../../test/build//boost_unit_test_framework + [ run test_nc_beta.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_LDOUBLE intel:off : test_nc_beta_long_double ] - [ run test_nc_beta.cpp ../../test/build//boost_unit_test_framework + [ run test_nc_beta.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -779,7 +789,7 @@ test-suite distribution_tests : TEST_DATA=1 intel:off : test_nc_beta_real_concept1 ] - [ run test_nc_beta.cpp ../../test/build//boost_unit_test_framework + [ run test_nc_beta.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements @@ -787,91 +797,91 @@ test-suite distribution_tests : TEST_DATA=2 intel:off : test_nc_beta_real_concept2 ] - [ run test_nc_f.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_nc_t.cpp pch ../../test/build//boost_unit_test_framework + [ run test_nc_f.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_nc_t.cpp pch /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_FLOAT intel:off : test_nc_t_float ] - [ run test_nc_t.cpp pch ../../test/build//boost_unit_test_framework + [ run test_nc_t.cpp pch /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_DOUBLE intel:off : test_nc_t_double ] - [ run test_nc_t.cpp pch ../../test/build//boost_unit_test_framework + [ run test_nc_t.cpp pch /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_LDOUBLE intel:off : test_nc_t_long_double ] - [ run test_nc_t.cpp pch ../../test/build//boost_unit_test_framework + [ run test_nc_t.cpp pch /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_REAL_CONCEPT intel:off : test_nc_t_real_concept ] - [ run test_normal.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_pareto.cpp ../../test/build//boost_unit_test_framework ] - [ run test_poisson.cpp ../../test/build//boost_unit_test_framework + [ run test_normal.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_pareto.cpp /boost/test//boost_unit_test_framework ] + [ run test_poisson.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_FLOAT intel:off : test_poisson_float ] - [ run test_poisson.cpp ../../test/build//boost_unit_test_framework + [ run test_poisson.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_DOUBLE intel:off : test_poisson_double ] - [ run test_poisson.cpp ../../test/build//boost_unit_test_framework + [ run test_poisson.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_LDOUBLE intel:off : test_poisson_long_double ] - [ run test_poisson.cpp ../../test/build//boost_unit_test_framework + [ run test_poisson.cpp /boost/test//boost_unit_test_framework : # command line : # input files : # requirements TEST_REAL_CONCEPT intel:off : test_poisson_real_concept ] - [ run test_rayleigh.cpp ../../test/build//boost_unit_test_framework ] - [ run test_students_t.cpp ../../test/build//boost_unit_test_framework ] - [ run test_skew_normal.cpp ../../test/build//boost_unit_test_framework ] - [ run test_triangular.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_uniform.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_weibull.cpp ../../test/build//boost_unit_test_framework ] + [ run test_rayleigh.cpp /boost/test//boost_unit_test_framework ] + [ run test_students_t.cpp /boost/test//boost_unit_test_framework ] + [ run test_skew_normal.cpp /boost/test//boost_unit_test_framework ] + [ run test_triangular.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_uniform.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_weibull.cpp /boost/test//boost_unit_test_framework ] - [ run test_legacy_nonfinite.cpp ../../test/build//boost_unit_test_framework ] - [ run test_basic_nonfinite.cpp ../../test/build//boost_unit_test_framework ] - [ run test_lexical_cast.cpp ../../test/build//boost_unit_test_framework ] - [ run test_nonfinite_trap.cpp ../../test/build//boost_unit_test_framework : : : off:no ] - [ run test_signed_zero.cpp ../../test/build//boost_unit_test_framework ] - [ run complex_test.cpp ../../test/build//boost_unit_test_framework ] + [ run test_legacy_nonfinite.cpp /boost/test//boost_unit_test_framework ] + [ run test_basic_nonfinite.cpp /boost/test//boost_unit_test_framework ] + [ run test_lexical_cast.cpp /boost/test//boost_unit_test_framework ] + [ run test_nonfinite_trap.cpp /boost/test//boost_unit_test_framework : : : off:no ] + [ run test_signed_zero.cpp /boost/test//boost_unit_test_framework ] + [ run complex_test.cpp /boost/test//boost_unit_test_framework ] [ compile test_dist_deduction_guides.cpp : [ requires cpp_deduction_guides cpp_variadic_templates ] ] - [ run git_issue_800.cpp ../../test/build//boost_unit_test_framework ] - [ run git_issue_845.cpp ../../test/build//boost_unit_test_framework ] - [ run scipy_issue_14901.cpp ../../test/build//boost_unit_test_framework ] - [ run scipy_issue_14901_ncf.cpp ../../test/build//boost_unit_test_framework ] - [ run scipy_issue_15101.cpp ../../test/build//boost_unit_test_framework ] - [ run scipy_issue_17146.cpp ../../test/build//boost_unit_test_framework ] - [ run scipy_issue_17388.cpp ../../test/build//boost_unit_test_framework ] - [ run scipy_issue_17916.cpp ../../test/build//boost_unit_test_framework ] - [ run scipy_issue_17916_nct.cpp ../../test/build//boost_unit_test_framework ] - [ run scipy_issue_18302.cpp ../../test/build//boost_unit_test_framework ] - [ run scipy_issue_18511.cpp ../../test/build//boost_unit_test_framework ] + [ run git_issue_800.cpp /boost/test//boost_unit_test_framework ] + [ run git_issue_845.cpp /boost/test//boost_unit_test_framework ] + [ run scipy_issue_14901.cpp /boost/test//boost_unit_test_framework ] + [ run scipy_issue_14901_ncf.cpp /boost/test//boost_unit_test_framework ] + [ run scipy_issue_15101.cpp /boost/test//boost_unit_test_framework ] + [ run scipy_issue_17146.cpp /boost/test//boost_unit_test_framework ] + [ run scipy_issue_17388.cpp /boost/test//boost_unit_test_framework ] + [ run scipy_issue_17916.cpp /boost/test//boost_unit_test_framework ] + [ run scipy_issue_17916_nct.cpp /boost/test//boost_unit_test_framework ] + [ run scipy_issue_18302.cpp /boost/test//boost_unit_test_framework ] + [ run scipy_issue_18511.cpp /boost/test//boost_unit_test_framework ] [ compile scipy_issue_19762.cpp ] ; @@ -879,16 +889,16 @@ test-suite new_floats : [ compile compile_test/float32.cpp ] [ compile compile_test/float64.cpp ] [ compile compile_test/float128.cpp ] - [ run test_float_io.cpp : : : [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] ] - [ run test_float_io.cpp : : : BOOST_MATH_TEST_IO_AS_INTEL_QUAD=1 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] : test_float_io_quad ] + [ run test_float_io.cpp : : : float128_type ] + [ run test_float_io.cpp : : : BOOST_MATH_TEST_IO_AS_INTEL_QUAD=1 float128_type : test_float_io_quad ] ; test-suite mp : - [ run test_nc_t_quad.cpp pch ../../test/build//boost_unit_test_framework : : : release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run test_polynomial.cpp ../../test/build//boost_unit_test_framework : : : TEST1 : test_polynomial_1 ] - [ run test_polynomial.cpp ../../test/build//boost_unit_test_framework : : : TEST2 : test_polynomial_2 ] - [ run test_polynomial.cpp ../../test/build//boost_unit_test_framework : : : TEST3 : test_polynomial_3 ] + [ run test_nc_t_quad.cpp pch /boost/test//boost_unit_test_framework : : : release float128_type ] + [ run test_polynomial.cpp /boost/test//boost_unit_test_framework : : : TEST1 : test_polynomial_1 ] + [ run test_polynomial.cpp /boost/test//boost_unit_test_framework : : : TEST2 : test_polynomial_2 ] + [ run test_polynomial.cpp /boost/test//boost_unit_test_framework : : : TEST3 : test_polynomial_3 ] [ run test_estrin.cpp ] [ run polynomial_concept_check.cpp ] @@ -904,13 +914,13 @@ test-suite misc : ../build//boost_math_tr1f ../build//boost_math_c99 ../build//boost_math_c99f - ../../test/build//boost_unit_test_framework + /boost/test//boost_unit_test_framework ] [ run test_tr1.cpp ../build//boost_math_tr1l ../build//boost_math_c99l - ../../test/build//boost_unit_test_framework + /boost/test//boost_unit_test_framework : : : TEST_LD=1 [ check-target-builds ../config//has_long_double_support "long double support" : : no ] @@ -923,7 +933,7 @@ test-suite misc : ../build//boost_math_tr1f ../build//boost_math_c99 ../build//boost_math_c99f - ../../test/build//boost_unit_test_framework + /boost/test//boost_unit_test_framework : : : #requirements : test_tr1_c @@ -932,23 +942,23 @@ test-suite misc : [ run test_tr1.c ../build//boost_math_tr1l ../build//boost_math_c99l - ../../test/build//boost_unit_test_framework + /boost/test//boost_unit_test_framework : : : TEST_LD=1 [ check-target-builds ../config//has_long_double_support "long double support" : : no ] : test_tr1_c_long_double ] - [ run test_constants.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run simple_continued_fraction_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run centered_continued_fraction_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run luroth_expansion_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run engel_expansion_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run test_classify.cpp pch ../../test/build//boost_unit_test_framework : : : msvc:/bigobj ] - [ run test_error_handling.cpp ../../test/build//boost_unit_test_framework ] - [ run legendre_stieltjes_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_range_based_for ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run test_minima.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_rationals.cpp ../../test/build//boost_unit_test_framework + [ run test_constants.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run simple_continued_fraction_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run centered_continued_fraction_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run luroth_expansion_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run engel_expansion_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run test_classify.cpp pch /boost/test//boost_unit_test_framework : : : msvc:/bigobj ] + [ run test_error_handling.cpp /boost/test//boost_unit_test_framework ] + [ run legendre_stieltjes_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_range_based_for ] float128_type ] + [ run test_minima.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_rationals.cpp /boost/test//boost_unit_test_framework test_rational_instances/test_rational_double1.cpp test_rational_instances/test_rational_double2.cpp test_rational_instances/test_rational_double3.cpp @@ -969,96 +979,96 @@ test-suite misc : test_rational_instances/test_rational_real_concept4.cpp test_rational_instances/test_rational_real_concept5.cpp ] - [ run test_policy.cpp ../../test/build//boost_unit_test_framework ] - [ run test_policy_2.cpp ../../test/build//boost_unit_test_framework ] - [ run test_policy_3.cpp ../../test/build//boost_unit_test_framework ] - [ run test_policy_4.cpp ../../test/build//boost_unit_test_framework ] - [ run test_policy_5.cpp ../../test/build//boost_unit_test_framework ] - [ run test_policy_6.cpp ../../test/build//boost_unit_test_framework ] - [ run test_policy_7.cpp ../../test/build//boost_unit_test_framework ] - [ run test_policy_8.cpp ../../test/build//boost_unit_test_framework ] + [ run test_policy.cpp /boost/test//boost_unit_test_framework ] + [ run test_policy_2.cpp /boost/test//boost_unit_test_framework ] + [ run test_policy_3.cpp /boost/test//boost_unit_test_framework ] + [ run test_policy_4.cpp /boost/test//boost_unit_test_framework ] + [ run test_policy_5.cpp /boost/test//boost_unit_test_framework ] + [ run test_policy_6.cpp /boost/test//boost_unit_test_framework ] + [ run test_policy_7.cpp /boost/test//boost_unit_test_framework ] + [ run test_policy_8.cpp /boost/test//boost_unit_test_framework ] [ compile test_policy_9.cpp ] - [ run test_policy_10.cpp ../../test/build//boost_unit_test_framework ] - [ run test_policy_sf.cpp ../../test/build//boost_unit_test_framework ] - [ run test_long_double_support.cpp ../../test/build//boost_unit_test_framework + [ run test_policy_10.cpp /boost/test//boost_unit_test_framework ] + [ run test_policy_sf.cpp /boost/test//boost_unit_test_framework ] + [ run test_long_double_support.cpp /boost/test//boost_unit_test_framework : : : [ check-target-builds ../config//has_long_double_support "long double support" : : no ] ] [ run test_recurrence.cpp : : : TEST=1 [ requires cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_auto_declarations cxx11_decltype ] msvc:/bigobj : test_recurrence_1 ] - [ run test_recurrence.cpp : : : TEST=2 release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] [ requires cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_auto_declarations cxx11_decltype ] : test_recurrence_2 ] - [ run test_recurrence.cpp : : : TEST=3 release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] [ requires cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_auto_declarations cxx11_decltype ] : test_recurrence_3 ] + [ run test_recurrence.cpp : : : TEST=2 release float128_type [ requires cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_auto_declarations cxx11_decltype ] : test_recurrence_2 ] + [ run test_recurrence.cpp : : : TEST=3 release float128_type [ requires cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_auto_declarations cxx11_decltype ] : test_recurrence_3 ] [ run test_print_info_on_type.cpp ] - [ run univariate_statistics_test.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx17_if_constexpr cxx17_std_apply ] ] - [ run univariate_statistics_backwards_compatible_test.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ] - [ run ooura_fourier_integral_test.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : "-Bstatic -lquadmath -Bdynamic" ] [ requires cxx17_if_constexpr cxx17_std_apply ] ] + [ run univariate_statistics_test.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx17_if_constexpr cxx17_std_apply ] ] + [ run univariate_statistics_backwards_compatible_test.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ] + [ run ooura_fourier_integral_test.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] float128_type [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run empirical_cumulative_distribution_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] - [ run norms_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] + [ run norms_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run signal_statistics_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run anderson_darling_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run ljung_box_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run cubic_roots_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run quartic_roots_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] - [ run test_t_test.cpp : : : [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ] - [ run test_z_test.cpp : : : [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ] + [ run test_t_test.cpp : : : float128_type [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ] + [ run test_z_test.cpp : : : float128_type [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ] [ run bivariate_statistics_test.cpp : : : [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] [ run linear_regression_test.cpp : : : [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ] [ run test_runs_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] - [ run test_chatterjee_correlation.cpp ../../test/build//boost_unit_test_framework ] - [ run test_rank.cpp ../../test/build//boost_unit_test_framework ] - [ run lanczos_smoothing_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] - [ run condition_number_test.cpp ../../test/build//boost_unit_test_framework : : : TEST=1 msvc:/bigobj [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : "-Bstatic -lquadmath -Bdynamic" ] : condition_number_test_1 ] - [ run condition_number_test.cpp ../../test/build//boost_unit_test_framework : : : TEST=2 msvc:/bigobj [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : "-Bstatic -lquadmath -Bdynamic" ] : condition_number_test_2 ] - [ run condition_number_test.cpp ../../test/build//boost_unit_test_framework : : : TEST=3 msvc:/bigobj [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : "-Bstatic -lquadmath -Bdynamic" ] : condition_number_test_3 ] - [ run test_real_concept.cpp ../../test/build//boost_unit_test_framework ] - [ run test_remez.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_roots.cpp pch ../../test/build//boost_unit_test_framework ] - [ run test_root_iterations.cpp pch ../../test/build//boost_unit_test_framework : : : [ requires cxx11_hdr_tuple ] ] - [ run test_root_finding_concepts.cpp ../../test/build//boost_unit_test_framework ] - [ run test_toms748_solve.cpp pch ../../test/build//boost_unit_test_framework ] + [ run test_chatterjee_correlation.cpp /boost/test//boost_unit_test_framework ] + [ run test_rank.cpp /boost/test//boost_unit_test_framework ] + [ run lanczos_smoothing_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] + [ run condition_number_test.cpp /boost/test//boost_unit_test_framework : : : TEST=1 msvc:/bigobj float128_type : condition_number_test_1 ] + [ run condition_number_test.cpp /boost/test//boost_unit_test_framework : : : TEST=2 msvc:/bigobj float128_type : condition_number_test_2 ] + [ run condition_number_test.cpp /boost/test//boost_unit_test_framework : : : TEST=3 msvc:/bigobj float128_type : condition_number_test_3 ] + [ run test_real_concept.cpp /boost/test//boost_unit_test_framework ] + [ run test_remez.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_roots.cpp pch /boost/test//boost_unit_test_framework ] + [ run test_root_iterations.cpp pch /boost/test//boost_unit_test_framework : : : [ requires cxx11_hdr_tuple ] ] + [ run test_root_finding_concepts.cpp /boost/test//boost_unit_test_framework ] + [ run test_toms748_solve.cpp pch /boost/test//boost_unit_test_framework ] [ run compile_test/interpolators_cubic_spline_incl_test.cpp compile_test_main : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/interpolators_barycentric_rational_incl_test.cpp compile_test_main : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run octonion_test.cpp - ../../test/build//boost_unit_test_framework ] + /boost/test//boost_unit_test_framework ] [ run octonion_test_simple.cpp ] [ run quaternion_constexpr_test.cpp ] [ run quaternion_test.cpp - ../../test/build//boost_unit_test_framework : : : msvc-14.0:off [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] + /boost/test//boost_unit_test_framework : : : msvc-14.0:off float128_type ] [ run quaternion_mult_incl_test.cpp quaternion_mi1.cpp quaternion_mi2.cpp - ../../test/build//boost_unit_test_framework ] + /boost/test//boost_unit_test_framework ] # [ run __temporary_test.cpp test_instances//test_instances : : : always_show_run_output off ] ; test-suite interpolators : - [ run test_barycentric_rational.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_unified_initialization_syntax ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run test_vector_barycentric_rational.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_unified_initialization_syntax ] [ check-target-builds ../../multiprecision/config//has_eigen : : no ] ] - [ run cardinal_cubic_b_spline_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions ] off msvc:/bigobj release ] - [ run cardinal_b_spline_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run jacobi_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run gegenbauer_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run daubechies_scaling_test.cpp : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] - [ run daubechies_wavelet_test.cpp : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] - [ run fourier_transform_daubechies_test.cpp : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] - [ run wavelet_transform_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ run agm_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run rsqrt_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run cohen_acceleration_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] + [ run test_barycentric_rational.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_unified_initialization_syntax ] float128_type ] + [ run test_vector_barycentric_rational.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_unified_initialization_syntax ] [ check-target-builds ../../multiprecision/config//has_eigen : : no ] ] + [ run cardinal_cubic_b_spline_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions ] off msvc:/bigobj release ] + [ run cardinal_b_spline_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] float128_type ] + [ run jacobi_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] float128_type ] + [ run gegenbauer_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] float128_type ] + [ run daubechies_scaling_test.cpp /boost/hana//boost_hana : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] + [ run daubechies_wavelet_test.cpp /boost/hana//boost_hana : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] + [ run fourier_transform_daubechies_test.cpp : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] + [ run wavelet_transform_test.cpp /boost/hana//boost_hana : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run agm_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run rsqrt_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run cohen_acceleration_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] [ compile compile_test/filters_daubechies_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ compile compile_test/sf_daubechies_scaling_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run whittaker_shannon_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] ] [ run cardinal_quadratic_b_spline_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] ] - [ run cardinal_quintic_b_spline_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run makima_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run pchip_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run septic_hermite_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run quintic_hermite_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run cubic_hermite_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] + [ run cardinal_quintic_b_spline_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] float128_type ] + [ run makima_test.cpp /boost/circular_buffer//boost_circular_buffer : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run pchip_test.cpp /boost/circular_buffer//boost_circular_buffer : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run septic_hermite_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run quintic_hermite_test.cpp /boost/circular_buffer//boost_circular_buffer : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run cubic_hermite_test.cpp /boost/circular_buffer//boost_circular_buffer : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] [ run bilinear_uniform_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] - [ run bezier_polynomial_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run catmull_rom_test.cpp ../../test/build//boost_unit_test_framework : : : TEST=1 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_1 ] - [ run catmull_rom_test.cpp ../../test/build//boost_unit_test_framework : : : TEST=2 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_2 ] - [ run catmull_rom_test.cpp ../../test/build//boost_unit_test_framework : : : TEST=3 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_3 ] + [ run bezier_polynomial_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run catmull_rom_test.cpp /boost/test//boost_unit_test_framework : : : TEST=1 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_1 ] + [ run catmull_rom_test.cpp /boost/test//boost_unit_test_framework : : : TEST=2 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_2 ] + [ run catmull_rom_test.cpp /boost/test//boost_unit_test_framework : : : TEST=3 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_3 ] [ run compile_test/interpolators_catmull_rom_incl_test.cpp compile_test_main : : : [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] ] [ run compile_test/interpolators_catmull_rom_concept_test.cpp compile_test_main : : : [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] ] [ run test_standalone_asserts.cpp ] @@ -1072,118 +1082,118 @@ test-suite interpolators : ; test-suite quadrature : - [ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : msvc:/bigobj TEST1 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : msvc:/bigobj TEST1 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] : tanh_sinh_quadrature_test_1 ] - [ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : msvc:/bigobj TEST1A [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : msvc:/bigobj TEST1A float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] : tanh_sinh_quadrature_test_1a ] - [ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release msvc:/bigobj TEST1B [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release msvc:/bigobj TEST1B float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] : tanh_sinh_quadrature_test_1b ] - [ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : msvc:/bigobj TEST2 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : msvc:/bigobj TEST2 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] : tanh_sinh_quadrature_test_2 ] - [ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release msvc:/bigobj TEST2A [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release msvc:/bigobj TEST2A float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] : tanh_sinh_quadrature_test_2a ] - [ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : msvc:/bigobj TEST3 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : msvc:/bigobj TEST3 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_3 ] - [ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release msvc:/bigobj TEST3A [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release msvc:/bigobj TEST3A float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_3a ] - [ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release msvc:/bigobj TEST4 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release msvc:/bigobj TEST4 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_4 ] - [ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release msvc:/bigobj TEST5 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release msvc:/bigobj TEST5 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_5 ] - [ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : msvc:/bigobj TEST6 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : msvc:/bigobj TEST6 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_6 ] - [ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release msvc:/bigobj TEST6A [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release msvc:/bigobj TEST6A float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_6a ] - [ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release msvc:/bigobj TEST7 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release msvc:/bigobj TEST7 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_7 ] - [ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release msvc:/bigobj TEST8 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release msvc:/bigobj TEST8 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_8 ] - [ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework + [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework : : : release msvc:/bigobj TEST9 [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_9 ] [ run tanh_sinh_mpfr.cpp ../tools//mpfr ../tools//gmp : : : [ check-target-builds ../config//has_mpfr : : no ] [ check-target-builds ../config//has_gmp : : no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] release clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ run sinh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] ] - [ run exp_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : TEST1 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] : exp_sinh_quadrature_test_1 ] + [ run sinh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] ] + [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : TEST1 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] : exp_sinh_quadrature_test_1 ] - [ run exp_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release TEST2 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release TEST2 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] : exp_sinh_quadrature_test_2 ] - [ run exp_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : TEST3 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : TEST3 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_3 ] - [ run exp_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release TEST4 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release TEST4 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_4 ] - [ run exp_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release TEST5 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release TEST5 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_5 ] - [ run exp_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release TEST6 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release TEST6 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_6 ] - [ run exp_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release TEST7 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release TEST7 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_7 ] - [ run exp_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release TEST8 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release TEST8 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_8 ] - [ run exp_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release TEST9 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release TEST9 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_9 ] - [ run exp_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework - : : : release TEST10 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework + : : : release TEST10 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_10 ] - [ run gauss_quadrature_test.cpp : : : TEST1 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run gauss_quadrature_test.cpp : : : TEST1 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release : gauss_quadrature_test_1 ] - [ run gauss_quadrature_test.cpp : : : TEST2 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run gauss_quadrature_test.cpp : : : TEST2 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : gauss_quadrature_test_2 ] - [ run gauss_quadrature_test.cpp : : : TEST3 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run gauss_quadrature_test.cpp : : : TEST3 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : gauss_quadrature_test_3 ] - [ run gauss_kronrod_quadrature_test.cpp : : : TEST1 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run gauss_kronrod_quadrature_test.cpp : : : TEST1 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release : gauss_kronrod_quadrature_test_1 ] - [ run gauss_kronrod_quadrature_test.cpp : : : TEST1A [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run gauss_kronrod_quadrature_test.cpp : : : TEST1A float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : gauss_kronrod_quadrature_test_1a ] - [ run gauss_kronrod_quadrature_test.cpp : : : TEST2 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run gauss_kronrod_quadrature_test.cpp : : : TEST2 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : gauss_kronrod_quadrature_test_2 ] - [ run gauss_kronrod_quadrature_test.cpp : : : TEST3 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run gauss_kronrod_quadrature_test.cpp : : : TEST3 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : gauss_kronrod_quadrature_test_3 ] - [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST1 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST1 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release : adaptive_gauss_quadrature_test_1 ] - [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST1A [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST1A float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : adaptive_gauss_quadrature_test_1a ] - [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST2 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST2 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : adaptive_gauss_quadrature_test_2 ] - [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST3 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] + [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST3 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : adaptive_gauss_quadrature_test_3 ] [ run naive_monte_carlo_test.cpp : : : @@ -1286,28 +1296,28 @@ test-suite quadrature : [ compile compile_test/gauss_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ compile compile_test/gauss_kronrod_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run git_issue_898.cpp ] - [ run git_issue_1075.cpp : : : [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : "-Bstatic -lquadmath -Bdynamic" ] ] + [ run git_issue_1075.cpp : : : float128_type ] - [ run test_trapezoidal.cpp ../../test/build//boost_unit_test_framework : : : + [ run test_trapezoidal.cpp /boost/test//boost_unit_test_framework : : : release [ requires cxx11_lambdas cxx11_auto_declarations cxx11_decltype cxx11_unified_initialization_syntax cxx11_variadic_templates ] - [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : "-Bstatic -lquadmath -Bdynamic" ] ] + float128_type ] ; test-suite autodiff : - [ run test_numerical_differentiation.cpp ../../test/build//boost_unit_test_framework : : : msvc:/bigobj [ requires cxx11_auto_declarations cxx11_constexpr ] ] + [ run test_numerical_differentiation.cpp /boost/test//boost_unit_test_framework : : : msvc:/bigobj [ requires cxx11_auto_declarations cxx11_constexpr ] ] [ run compile_test/diff_numerical_differentiation_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_constexpr ] ] [ compile compile_test/diff_numerical_differentiation_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_constexpr ] ] - [ run test_autodiff_1.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ run test_autodiff_2.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ run test_autodiff_3.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ run test_autodiff_4.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ run test_autodiff_5.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ run test_autodiff_6.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ run test_autodiff_7.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ run test_autodiff_8.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ check-target-builds ../config//is_ci_standalone_run "Standalone CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ compile compile_test/diff_autodiff_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ compile compile_test/diff_finite_difference_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ compile compile_test/diff_lanczos_smoothing_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_1.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_2.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_3.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_4.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_5.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_6.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_7.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_8.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ check-target-builds ../config//is_ci_standalone_run "Standalone CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ compile compile_test/diff_autodiff_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ compile compile_test/diff_finite_difference_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ compile compile_test/diff_lanczos_smoothing_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] ; # @@ -1316,18 +1326,18 @@ test-suite autodiff : # too much time: # test-suite long-running-tests : - [ run test_0F1.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] : test_0F1_3 ] - [ run test_0F1.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=4 release : test_0F1_4 ] - [ run test_1F1.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=5 clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_real_concept ] - [ run test_1F1.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] clang:-Wno-literal-range : test_1F1_quad ] - [ run test_1F1.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=7 release clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_dec_40 ] - [ run test_1F1_regularized.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] clang:-Wno-literal-range : test_1F1_regularized_quad ] - [ run test_1F1_regularized.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=7 release clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_regularized_dec_40 ] - [ run test_1F1_log.cpp ../../test/build//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_log_quad ] - [ run test_1F1_log.cpp ../../test/build//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=7 release clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_log_dec_40 ] - [ run test_pFq.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : BOOST_MATH_TEST_FLOAT128 "-Bstatic -lquadmath -Bdynamic" ] clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_pFq_quad ] - [ run test_pFq.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=7 release clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_pFq_dec_40 ] - [ run test_pFq_precision.cpp ../tools//mpfr ../tools//gmp ../../test/build//boost_unit_test_framework /boost/system//boost_system /boost/chrono//boost_chrono : : : [ check-target-builds ../config//has_mpfr : : no ] [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] release clang:-Wno-literal-range ] + [ run test_0F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 release float128_type : test_0F1_3 ] + [ run test_0F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=4 release : test_0F1_4 ] + [ run test_1F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=5 clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_real_concept ] + [ run test_1F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] clang:-Wno-literal-range : test_1F1_quad ] + [ run test_1F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=7 release clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_dec_40 ] + [ run test_1F1_regularized.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] clang:-Wno-literal-range : test_1F1_regularized_quad ] + [ run test_1F1_regularized.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=7 release clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_regularized_dec_40 ] + [ run test_1F1_log.cpp /boost/test//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release float128_type clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_log_quad ] + [ run test_1F1_log.cpp /boost/test//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=7 release clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_log_dec_40 ] + [ run test_pFq.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release float128_type clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_pFq_quad ] + [ run test_pFq.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=7 release clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_pFq_dec_40 ] + [ run test_pFq_precision.cpp ../tools//mpfr ../tools//gmp /boost/test//boost_unit_test_framework /boost/system//boost_system /boost/chrono//boost_chrono : : : [ check-target-builds ../config//has_mpfr : : no ] [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] release clang:-Wno-literal-range ] [ run test_constant_generate.cpp : : : release USE_CPP_FLOAT=1 off:no ] ; @@ -1345,9 +1355,7 @@ rule get_float128_tests : # command line : # input files : # requirements - [ check-target-builds ../config//has_intel_quad "Intel _Quad datatype support" : -Qoption,cpp,--extended_float_type BOOST_MATH_USE_FLOAT128 ] - [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] - [ check-target-builds ../config//has_128bit_floatmax_t "128-bit floatmax_t" : : no ] + float128_type BOOST_ALL_NO_LIB : $(source:B)_floatmax_t ] ; } @@ -1496,7 +1504,7 @@ test-suite concepts : [ compile compile_test/std_real_concept_check.cpp : EMULATE128 [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : std_real_concept_check_128 ] [ run compile_test/cstdfloat_concept_check_1.cpp : : : [ check-target-builds ../config//has_intel_quad "Intel _Quad datatype support" : -Qoption,cpp,--extended_float_type ] - [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/cstdfloat_concept_check_2.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/cstdfloat_concept_check_3.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/cstdfloat_concept_check_4.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] @@ -1505,7 +1513,7 @@ test-suite concepts : [ compile compile_test/cstdfloat_iostream_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ compile compile_test/cstdfloat_limits_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ compile compile_test/cstdfloat_types_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ run test_cstdfloat.cpp ../../test/build//boost_unit_test_framework : : : [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run test_cstdfloat.cpp /boost/test//boost_unit_test_framework : : : float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/sf_airy_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/sf_hankel_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/sf_jacobi_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] diff --git a/test/float128/log1p_expm1_test.cpp b/test/float128/log1p_expm1_test.cpp index 7948614403..c46d5b099a 100644 --- a/test/float128/log1p_expm1_test.cpp +++ b/test/float128/log1p_expm1_test.cpp @@ -14,7 +14,7 @@ #include "table_type.hpp" -#include "libs/math/test/log1p_expm1_test.hpp" +#include "log1p_expm1_test.hpp" // // DESCRIPTION: diff --git a/test/float128/powm1_sqrtp1m1_test.cpp b/test/float128/powm1_sqrtp1m1_test.cpp index 73972bb7a0..bfc219bcc6 100644 --- a/test/float128/powm1_sqrtp1m1_test.cpp +++ b/test/float128/powm1_sqrtp1m1_test.cpp @@ -16,7 +16,7 @@ #include "table_type.hpp" -#include "libs/math/test/powm1_sqrtp1m1_test.hpp" +#include "powm1_sqrtp1m1_test.hpp" // // DESCRIPTION: diff --git a/test/float128/table_type.hpp b/test/float128/table_type.hpp index 6560762db4..7e5c07b248 100644 --- a/test/float128/table_type.hpp +++ b/test/float128/table_type.hpp @@ -5,7 +5,7 @@ #ifndef BOOST_MP_TABLE_TYPE -#include +#include #define SC_(x) BOOST_FLOATMAX_C(x) diff --git a/test/float128/test_bessel_i.cpp b/test/float128/test_bessel_i.cpp index 952cc9d6a6..7e0374cdfc 100644 --- a/test/float128/test_bessel_i.cpp +++ b/test/float128/test_bessel_i.cpp @@ -12,7 +12,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_bessel_i.hpp" +#include "test_bessel_i.hpp" void expected_results() { diff --git a/test/float128/test_bessel_j.cpp b/test/float128/test_bessel_j.cpp index 7afeeebeb4..f3bab11fd7 100644 --- a/test/float128/test_bessel_j.cpp +++ b/test/float128/test_bessel_j.cpp @@ -12,7 +12,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_bessel_j.hpp" +#include "test_bessel_j.hpp" void expected_results() { diff --git a/test/float128/test_bessel_k.cpp b/test/float128/test_bessel_k.cpp index a5ec1e2b4e..7f7144649f 100644 --- a/test/float128/test_bessel_k.cpp +++ b/test/float128/test_bessel_k.cpp @@ -12,7 +12,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_bessel_k.hpp" +#include "test_bessel_k.hpp" void expected_results() { diff --git a/test/float128/test_bessel_y.cpp b/test/float128/test_bessel_y.cpp index 55bdf56e71..240d7785a1 100644 --- a/test/float128/test_bessel_y.cpp +++ b/test/float128/test_bessel_y.cpp @@ -12,7 +12,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_bessel_y.hpp" +#include "test_bessel_y.hpp" void expected_results() { diff --git a/test/float128/test_beta.cpp b/test/float128/test_beta.cpp index 6cfddd566a..ecdf347964 100644 --- a/test/float128/test_beta.cpp +++ b/test/float128/test_beta.cpp @@ -12,7 +12,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_beta.hpp" +#include "test_beta.hpp" void expected_results() { diff --git a/test/float128/test_binomial_coeff.cpp b/test/float128/test_binomial_coeff.cpp index be208f4f55..392150b06f 100644 --- a/test/float128/test_binomial_coeff.cpp +++ b/test/float128/test_binomial_coeff.cpp @@ -12,7 +12,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_binomial_coeff.hpp" +#include "test_binomial_coeff.hpp" void expected_results() { diff --git a/test/float128/test_carlson.cpp b/test/float128/test_carlson.cpp index 1458493732..0954816c36 100644 --- a/test/float128/test_carlson.cpp +++ b/test/float128/test_carlson.cpp @@ -11,7 +11,7 @@ #include #include #include -#include "libs/math/test/test_carlson.hpp" +#include "test_carlson.hpp" void expected_results() { diff --git a/test/float128/test_cbrt.cpp b/test/float128/test_cbrt.cpp index d6690bdd98..7b53b8a434 100644 --- a/test/float128/test_cbrt.cpp +++ b/test/float128/test_cbrt.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_cbrt.hpp" +#include "test_cbrt.hpp" void expected_results() { diff --git a/test/float128/test_digamma.cpp b/test/float128/test_digamma.cpp index 9856223bef..5702ccf73b 100644 --- a/test/float128/test_digamma.cpp +++ b/test/float128/test_digamma.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_digamma.hpp" +#include "test_digamma.hpp" void expected_results() { diff --git a/test/float128/test_ellint_1.cpp b/test/float128/test_ellint_1.cpp index 5c259e9405..90f9e1bed5 100644 --- a/test/float128/test_ellint_1.cpp +++ b/test/float128/test_ellint_1.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_ellint_1.hpp" +#include "test_ellint_1.hpp" void expected_results() { diff --git a/test/float128/test_ellint_2.cpp b/test/float128/test_ellint_2.cpp index 8b05124670..3f43e8c1dc 100644 --- a/test/float128/test_ellint_2.cpp +++ b/test/float128/test_ellint_2.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_ellint_2.hpp" +#include "test_ellint_2.hpp" void expected_results() { diff --git a/test/float128/test_ellint_3.cpp b/test/float128/test_ellint_3.cpp index e462683888..644dd1cbb8 100644 --- a/test/float128/test_ellint_3.cpp +++ b/test/float128/test_ellint_3.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_ellint_3.hpp" +#include "test_ellint_3.hpp" void expected_results() { diff --git a/test/float128/test_erf.cpp b/test/float128/test_erf.cpp index 90efd139e7..5f3bcaa46a 100644 --- a/test/float128/test_erf.cpp +++ b/test/float128/test_erf.cpp @@ -8,7 +8,7 @@ #define TEST_UDT #include -#include "libs/math/test/test_erf.hpp" +#include "test_erf.hpp" void expected_results() { diff --git a/test/float128/test_expint.cpp b/test/float128/test_expint.cpp index 73a1f6bb5f..ff9ece822d 100644 --- a/test/float128/test_expint.cpp +++ b/test/float128/test_expint.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_expint.hpp" +#include "test_expint.hpp" void expected_results() { diff --git a/test/float128/test_gamma.cpp b/test/float128/test_gamma.cpp index ddaae2adf0..bcec76083e 100644 --- a/test/float128/test_gamma.cpp +++ b/test/float128/test_gamma.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_gamma.hpp" +#include "test_gamma.hpp" void expected_results() { diff --git a/test/float128/test_hermite.cpp b/test/float128/test_hermite.cpp index f933c6d27f..3b6fcdfb5d 100644 --- a/test/float128/test_hermite.cpp +++ b/test/float128/test_hermite.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_hermite.hpp" +#include "test_hermite.hpp" void expected_results() { diff --git a/test/float128/test_ibeta.cpp b/test/float128/test_ibeta.cpp index 708a6950de..c46da77665 100644 --- a/test/float128/test_ibeta.cpp +++ b/test/float128/test_ibeta.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_ibeta.hpp" +#include "test_ibeta.hpp" void expected_results() { diff --git a/test/float128/test_ibeta_inv_1.cpp b/test/float128/test_ibeta_inv_1.cpp index 68049024f3..2fc059740c 100644 --- a/test/float128/test_ibeta_inv_1.cpp +++ b/test/float128/test_ibeta_inv_1.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_ibeta_inv.hpp" +#include "test_ibeta_inv.hpp" void expected_results() { diff --git a/test/float128/test_ibeta_inv_ab_4.cpp b/test/float128/test_ibeta_inv_ab_4.cpp index 3e0bc85816..d02a99f26f 100644 --- a/test/float128/test_ibeta_inv_ab_4.cpp +++ b/test/float128/test_ibeta_inv_ab_4.cpp @@ -11,7 +11,7 @@ #define FULL_TEST #include -#include "libs/math/test/test_ibeta_inv_ab.hpp" +#include "test_ibeta_inv_ab.hpp" void expected_results() { diff --git a/test/float128/test_igamma.cpp b/test/float128/test_igamma.cpp index d533254841..7a987c643e 100644 --- a/test/float128/test_igamma.cpp +++ b/test/float128/test_igamma.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_igamma.hpp" +#include "test_igamma.hpp" void expected_results() { diff --git a/test/float128/test_igamma_inv.cpp b/test/float128/test_igamma_inv.cpp index 122db9d42e..bc9b4289e2 100644 --- a/test/float128/test_igamma_inv.cpp +++ b/test/float128/test_igamma_inv.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_igamma_inv.hpp" +#include "test_igamma_inv.hpp" void expected_results() { diff --git a/test/float128/test_igamma_inva.cpp b/test/float128/test_igamma_inva.cpp index 0a244c2f45..19daa7cfa7 100644 --- a/test/float128/test_igamma_inva.cpp +++ b/test/float128/test_igamma_inva.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_igamma_inva.hpp" +#include "test_igamma_inva.hpp" void expected_results() { diff --git a/test/float128/test_laguerre.cpp b/test/float128/test_laguerre.cpp index 04ae016b94..dfa475448c 100644 --- a/test/float128/test_laguerre.cpp +++ b/test/float128/test_laguerre.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_laguerre.hpp" +#include "test_laguerre.hpp" void expected_results() { diff --git a/test/float128/test_legendre.cpp b/test/float128/test_legendre.cpp index 463c2d90a7..e6de9644a7 100644 --- a/test/float128/test_legendre.cpp +++ b/test/float128/test_legendre.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_legendre.hpp" +#include "test_legendre.hpp" void expected_results() { diff --git a/test/float128/test_polygamma.cpp b/test/float128/test_polygamma.cpp index e62cef9af6..1ff41e34f1 100644 --- a/test/float128/test_polygamma.cpp +++ b/test/float128/test_polygamma.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_polygamma.hpp" +#include "test_polygamma.hpp" void expected_results() { diff --git a/test/float128/test_tgamma_ratio.cpp b/test/float128/test_tgamma_ratio.cpp index 9d2568f558..0138ce472f 100644 --- a/test/float128/test_tgamma_ratio.cpp +++ b/test/float128/test_tgamma_ratio.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_tgamma_ratio.hpp" +#include "test_tgamma_ratio.hpp" void expected_results() { diff --git a/test/float128/test_trigamma.cpp b/test/float128/test_trigamma.cpp index 8862b53d00..3ab2f9473b 100644 --- a/test/float128/test_trigamma.cpp +++ b/test/float128/test_trigamma.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_trigamma.hpp" +#include "test_trigamma.hpp" void expected_results() { diff --git a/test/float128/test_zeta.cpp b/test/float128/test_zeta.cpp index 4dcdf19cc1..67aebfbff5 100644 --- a/test/float128/test_zeta.cpp +++ b/test/float128/test_zeta.cpp @@ -7,7 +7,7 @@ #include "table_type.hpp" #include -#include "libs/math/test/test_zeta.hpp" +#include "test_zeta.hpp" void expected_results() { diff --git a/test/test_bernoulli_constants.cpp b/test/test_bernoulli_constants.cpp index 6d73d82a4c..cb15aaca95 100644 --- a/test/test_bernoulli_constants.cpp +++ b/test/test_bernoulli_constants.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/test_nonfinite_io.cpp b/test/test_nonfinite_io.cpp index b917549810..855843c715 100644 --- a/test/test_nonfinite_io.cpp +++ b/test/test_nonfinite_io.cpp @@ -14,8 +14,8 @@ #define BOOST_TEST_MAIN #include -#include // Similar to BOOST_CLOSE_FRACTION. -#include // To create test strings like std::basic_string s = S_("0 -0"); +#include // Similar to BOOST_CLOSE_FRACTION. +#include // To create test strings like std::basic_string s = S_("0 -0"); #include #include diff --git a/test/test_owens_t.cpp b/test/test_owens_t.cpp index 8c33e77f07..11389dd205 100644 --- a/test/test_owens_t.cpp +++ b/test/test_owens_t.cpp @@ -38,9 +38,9 @@ using boost::math::owens_t; #include #include -#include "libs/math/test/handle_test_result.hpp" -#include "libs/math/test/table_type.hpp" -#include "libs/math/test/functor.hpp" +#include "handle_test_result.hpp" +#include "table_type.hpp" +#include "functor.hpp" #include "boost/math/tools/test_value.hpp" #include "test_owens_t.hpp" diff --git a/tools/Jamfile.v2 b/tools/Jamfile.v2 index 4a986620b7..40678700d5 100644 --- a/tools/Jamfile.v2 +++ b/tools/Jamfile.v2 @@ -9,7 +9,7 @@ # bring in the rules for testing import modules ; import path ; -import ../../config/checks/config : requires ; +import config : requires ; project : requirements @@ -28,26 +28,27 @@ project msvc:/wd4701 # needed for lexical cast - temporary. static borland:static - ../../.. BOOST_ALL_NO_LIB=1 BOOST_UBLAS_UNSUPPORTED_COMPILER=0 . ../include_private + /boost/multiprecision//boost_multiprecision + /boost/algorithm//boost_algorithm ; -lib gmp ; -lib mpfr ; -lib mpfi ; -lib quadmath ; +searched-lib gmp : : shared ; +searched-lib mpfr : : shared ; +searched-lib mpfi : : shared ; +searched-lib quadmath : : shared ; exe bessel_data : bessel_data.cpp : [ check-target-builds ../config//is_ci_standalone_run : no ] ; install bessel_data_install : bessel_data : bin ; -exe ellint_f_data : ellint_f_data.cpp ; +exe ellint_f_data : ellint_f_data.cpp /boost/test//boost_test ; install ellint_f_data_install : ellint_f_data : bin ; -exe heuman_lambda_data : heuman_lambda_data.cpp ; +exe heuman_lambda_data : heuman_lambda_data.cpp /boost/test//boost_test ; install heuman_lambda_data_install : heuman_lambda_data : bin ; exe hyp_2f2_data : hyp_2f2_data.cpp ; @@ -56,13 +57,13 @@ install hyp_2f2_data_install : hyp_2f2_data : bin ; exe laguerre_data : laguerre_data.cpp ; install laguerre_data_install : laguerre_data : bin ; -exe bessel_derivative_data : bessel_derivative_data.cpp : -[ check-target-builds ../../multiprecision/config//has_gmp : gmp : no ] -[ check-target-builds ../../multiprecision/config//has_mpfr : mpfr : no ] +exe bessel_derivative_data : bessel_derivative_data.cpp /boost/test//boost_test : +[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] [ check-target-builds ../config//is_ci_standalone_run : no ] ; install bessel_derivative_data_install : bessel_derivative_data : bin ; -exe ellint_k_data : ellint_k_data.cpp ; +exe ellint_k_data : ellint_k_data.cpp /boost/test//boost_test ; install ellint_k_data_install : ellint_k_data : bin ; exe hyp_0f2_data : hyp_0f2_data.cpp ; @@ -81,13 +82,13 @@ exe beta_data : beta_data.cpp : [ check-target-builds ../config//is_ci_standalone_run : no ] ; install beta_data_install : beta_data : bin ; -exe ellint_pi2_data : ellint_pi2_data.cpp ; +exe ellint_pi2_data : ellint_pi2_data.cpp /boost/test//boost_test ; install ellint_pi2_data_install : ellint_pi2_data : bin ; exe hyp_1f1_big_data : hyp_1f1_big_data.cpp : -[ check-target-builds ../../multiprecision/config//has_gmp : gmp : no ] -[ check-target-builds ../../multiprecision/config//has_mpfr : mpfr : no ] -[ check-target-builds ../../multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] +[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] [ requires cxx11_decltype ] ; install hyp_1f1_big_data_install : hyp_1f1_big_data : bin ; @@ -98,68 +99,68 @@ install ibeta_data_install : ibeta_data : bin ; exe log1p_expm1_data : log1p_expm1_data.cpp ; install log1p_expm1_data_install : log1p_expm1_data : bin ; -exe carlson_ellint_data : carlson_ellint_data.cpp ; +exe carlson_ellint_data : carlson_ellint_data.cpp /boost/test//boost_test ; install carlson_ellint_data_install : carlson_ellint_data : bin ; -exe ellint_pi3_data : ellint_pi3_data.cpp ; +exe ellint_pi3_data : ellint_pi3_data.cpp /boost/test//boost_test ; install ellint_pi3_data_install : ellint_pi3_data : bin ; exe hyp_1f1_data : hyp_1f1_data.cpp : -[ check-target-builds ../../multiprecision/config//has_gmp : gmp : no ] -[ check-target-builds ../../multiprecision/config//has_mpfr : mpfr : no ] -[ check-target-builds ../../multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] +[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] [ requires cxx11_decltype ] ; install hyp_1f1_data_install : hyp_1f1_data : bin ; -exe ibeta_derivative_data : ibeta_derivative_data.cpp : +exe ibeta_derivative_data : ibeta_derivative_data.cpp /boost/math//testing : [ check-target-builds ../config//is_ci_standalone_run : no ] ; install ibeta_derivative_data_install : ibeta_derivative_data : bin ; -exe sinc_data : sinc_data.cpp ; +exe sinc_data : sinc_data.cpp /boost/test//boost_test ; install sinc_data_install : sinc_data : bin ; exe cbrt_data : cbrt_data.cpp ; install cbrt_data_install : cbrt_data : bin ; -exe erf_data : erf_data.cpp : [ check-target-builds ../../multiprecision/config//has_float128 : quadmath : no ] ; +exe erf_data : erf_data.cpp : [ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] ; install erf_data_install : erf_data : bin ; exe hyp_1f1_log_big_data : hyp_1f1_log_big_data.cpp : -[ check-target-builds ../../multiprecision/config//has_gmp : gmp : no ] -[ check-target-builds ../../multiprecision/config//has_mpfr : mpfr : no ] -[ check-target-builds ../../multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] +[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] [ requires cxx11_decltype ] ; install hyp_1f1_log_big_data_install : hyp_1f1_log_big_data : bin ; -exe ibeta_inv_data : ibeta_inv_data.cpp : [ check-target-builds ../../multiprecision/config//has_float128 : quadmath : no ] ; +exe ibeta_inv_data : ibeta_inv_data.cpp : [ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] ; install ibeta_inv_data_install : ibeta_inv_data : bin ; exe spherical_harmonic_data : spherical_harmonic_data.cpp : [ check-target-builds ../config//is_ci_standalone_run : no ] ; install spherical_harmonic_data_install : spherical_harmonic_data : bin ; -exe digamma_data : digamma_data.cpp : [ check-target-builds ../../multiprecision/config//has_float128 : quadmath : no ] ; +exe digamma_data : digamma_data.cpp /boost/test//boost_test : [ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] ; install digamma_data_install : digamma_data : bin ; exe expint_data : expint_data.cpp ; install expint_data_install : expint_data : bin ; exe hyp_1f1_reg_big_data : hyp_1f1_reg_big_data.cpp : -[ check-target-builds ../../multiprecision/config//has_gmp : gmp : no ] -[ check-target-builds ../../multiprecision/config//has_mpfr : mpfr : no ] -[ check-target-builds ../../multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] +[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] [ requires cxx11_decltype ] ; install hyp_1f1_reg_big_data_install : hyp_1f1_reg_big_data : bin ; -exe ibeta_invab_data : ibeta_invab_data.cpp : [ check-target-builds ../../multiprecision/config//has_float128 : quadmath : no ] ; +exe ibeta_invab_data : ibeta_invab_data.cpp : [ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] ; install ibeta_invab_data_install : ibeta_invab_data : bin ; -exe tgamma_large_data : tgamma_large_data.cpp : -[ check-target-builds ../../multiprecision/config//has_gmp : gmp : no ] -[ check-target-builds ../../multiprecision/config//has_mpfr : mpfr : no ] ; +exe tgamma_large_data : tgamma_large_data.cpp /boost/test//boost_test : +[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] ; install tgamma_large_data_install : tgamma_large_data : bin ; -exe ellint_d_data : ellint_d_data.cpp ; +exe ellint_d_data : ellint_d_data.cpp /boost/test//boost_test ; install ellint_d_data_install : ellint_d_data : bin ; exe expint_i_data : expint_i_data.cpp ; @@ -168,17 +169,17 @@ install expint_i_data_install : expint_i_data : bin ; exe hyp_1f2_data : hyp_1f2_data.cpp ; install hyp_1f2_data_install : hyp_1f2_data : bin ; -exe igamma_data : igamma_data.cpp : [ check-target-builds ../../multiprecision/config//has_float128 : quadmath : no ] ; +exe igamma_data : igamma_data.cpp : [ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] ; install igamma_data_install : igamma_data : bin ; exe tgamma_ratio_data : tgamma_ratio_data.cpp : [ check-target-builds ../config//is_ci_standalone_run : no ] ; install tgamma_ratio_data_install : tgamma_ratio_data : bin ; -exe ellint_d2_data : ellint_d2_data.cpp ; +exe ellint_d2_data : ellint_d2_data.cpp /boost/test//boost_test ; install ellint_d2_data_install : ellint_d2_data : bin ; -exe gamma_P_inva_data : gamma_P_inva_data.cpp : [ check-target-builds ../../multiprecision/config//has_float128 : quadmath : no ] ; +exe gamma_P_inva_data : gamma_P_inva_data.cpp : [ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] ; install gamma_P_inva_data_install : gamma_P_inva_data : bin ; exe hyp_2f0_data : hyp_2f0_data.cpp ; @@ -190,7 +191,7 @@ install inv_hyp_data_install : inv_hyp_data : bin ; exe trig_data : trig_data.cpp ; install trig_data_install : trig_data : bin ; -exe ellint_e_data : ellint_e_data.cpp ; +exe ellint_e_data : ellint_e_data.cpp /boost/test//boost_test ; install ellint_e_data_install : ellint_e_data : bin ; exe hermite_data : hermite_data.cpp ; @@ -199,10 +200,10 @@ install hermite_data_install : hermite_data : bin ; exe hyp_2f1_data : hyp_2f1_data.cpp ; install hyp_2f1_data_install : hyp_2f1_data : bin ; -exe jacobi_theta_data : jacobi_theta_data.cpp ; +exe jacobi_theta_data : jacobi_theta_data.cpp /boost/test//boost_test ; install jacobi_theta_data_install : jacobi_theta_data : bin ; -exe jacobi_zeta_data : jacobi_zeta_data.cpp ; +exe jacobi_zeta_data : jacobi_zeta_data.cpp /boost/test//boost_test ; install jacobi_zeta_data_install : jacobi_zeta_data : bin ; exe zeta_data : zeta_data.cpp : @@ -215,8 +216,8 @@ install generate_test_values_install : generate_test_values : bin ; exe igamma_temme_large_coef : igamma_temme_large_coef.cpp ; install igamma_temme_large_coef_install : igamma_temme_large_coef : bin ; -exe lanczos_generator : lanczos_generator.cpp ../../chrono/build//boost_chrono ../../system/build//boost_system : -[ check-target-builds ../../multiprecision/config//has_float128 : quadmath : no ] +exe lanczos_generator : lanczos_generator.cpp /boost/chrono//boost_chrono /boost/system//boost_system : +[ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] [ requires cxx11_nullptr ] ; install lanczos_generator_install : lanczos_generator : bin ; @@ -228,11 +229,11 @@ install generate_rational_test_install : generate_rational_test : bin #for local source in [ glob *_data.cpp ] generate_test_values.cpp igamma_temme_large_coef.cpp lanczos_generator.cpp factorial_tables.cpp generate_rational_test.cpp #{ -# exe $(source:B) : $(source) : [ check-target-builds ../../multiprecision/config//has_gmp : HAS_GMP gmp : no ] [ check-target-builds ../../multiprecision/config//has_mpfr : HAS_MPFR mpfr : no ] [ check-target-builds ../../multiprecision/config//has_mpfi : HAS_MPFI gmp mpfr mpfi ] ; +# exe $(source:B) : $(source) : [ check-target-builds /boost/multiprecision/config//has_gmp : HAS_GMP gmp : no ] [ check-target-builds /boost/multiprecision/config//has_mpfr : HAS_MPFR mpfr : no ] [ check-target-builds /boost/multiprecision/config//has_mpfi : HAS_MPFI gmp mpfr mpfi ] ; # install $(source:B)_bin : $(source:B) : bin ; #} exe generate_rational_code : generate_rational_code.cpp ; -exe process_perf_results : process_perf_results.cpp ; +exe process_perf_results : process_perf_results.cpp /boost/format//boost_format ; install bin : generate_rational_code process_perf_results ; diff --git a/tools/ibeta_derivative_data.cpp b/tools/ibeta_derivative_data.cpp index f00fe46785..27d647410d 100644 --- a/tools/ibeta_derivative_data.cpp +++ b/tools/ibeta_derivative_data.cpp @@ -17,11 +17,11 @@ using namespace boost::math::tools; using namespace boost::math; using namespace std; -#include +#include #define T double #define SC_(x) static_cast(x) -#include +#include int main(int, char* []) { diff --git a/tools/nc_t_data.cpp b/tools/nc_t_data.cpp index 90b9e61558..ff3b994739 100644 --- a/tools/nc_t_data.cpp +++ b/tools/nc_t_data.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include using namespace boost::math::tools; using namespace boost::math; @@ -91,7 +91,7 @@ int main(int, char* []) boost::math::quadrature::exp_sinh integrator(10); using T = float; -#include +#include for (unsigned i = 0; i < nct.size(); ++i) @@ -127,7 +127,7 @@ int main(int, char* []) std::cout << cdf << "), SC_(" << ccdf << ") }}," << std::endl; } -#include +#include for (unsigned i = 0; i < nct_small_delta.size(); ++i) { big_t error1, error2; From b98469f8afb7b7cf5759fcbb3ffec539e2a780f1 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 11 Mar 2024 10:22:06 +0100 Subject: [PATCH 02/23] Fix -Wundef warnings --- include/boost/math/ccmath/detail/config.hpp | 2 +- include/boost/math/tools/config.hpp | 2 +- include/boost/math/tools/promotion.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/math/ccmath/detail/config.hpp b/include/boost/math/ccmath/detail/config.hpp index e076366ca1..097d69a16b 100644 --- a/include/boost/math/ccmath/detail/config.hpp +++ b/include/boost/math/ccmath/detail/config.hpp @@ -43,7 +43,7 @@ // // Don't check here for msvc as they didn't get std lib configuration macros at the same time as C++17 // -#if (__cpp_lib_bool_constant < 201505L) && !defined(BOOST_MATH_NO_CCMATH) +#if (defined(__cpp_lib_bool_constant) && __cpp_lib_bool_constant < 201505L) && !defined(BOOST_MATH_NO_CCMATH) # define BOOST_MATH_NO_CCMATH #endif #endif diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index 28d0d7a559..9e4b7d7ca9 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -197,7 +197,7 @@ #endif // C++23 -#if __cplusplus > 202002L || _MSVC_LANG > 202002L +#if __cplusplus > 202002L || (defined(_MSVC_LANG) &&_MSVC_LANG > 202002L) # if __GNUC__ >= 13 // libstdc++3 only defines to/from_chars for std::float128_t when one of these defines are set // otherwise we're right out of luck... diff --git a/include/boost/math/tools/promotion.hpp b/include/boost/math/tools/promotion.hpp index 842022694e..c117e9575d 100644 --- a/include/boost/math/tools/promotion.hpp +++ b/include/boost/math/tools/promotion.hpp @@ -27,7 +27,7 @@ #include #if defined __has_include -# if __cplusplus > 202002L || _MSVC_LANG > 202002L +# if __cplusplus > 202002L || (defined(_MSVC_LANG) && _MSVC_LANG > 202002L) # if __has_include () # include # endif From 79c09aeaaa221b9c4d176cdd297fea407892c537 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 29 Mar 2024 21:15:59 -0500 Subject: [PATCH 03/23] Switch to library requirements instead of source. As source puts extra source in install targets. --- build.jam | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/build.jam b/build.jam index 028acf42ae..86c593fc7c 100644 --- a/build.jam +++ b/build.jam @@ -8,16 +8,16 @@ import project ; project /boost/math : common-requirements include - /boost/assert//boost_assert - /boost/concept_check//boost_concept_check - /boost/config//boost_config - /boost/core//boost_core - /boost/integer//boost_integer - /boost/lexical_cast//boost_lexical_cast - /boost/predef//boost_predef - /boost/random//boost_random - /boost/static_assert//boost_static_assert - /boost/throw_exception//boost_throw_exception + /boost/assert//boost_assert + /boost/concept_check//boost_concept_check + /boost/config//boost_config + /boost/core//boost_core + /boost/integer//boost_integer + /boost/lexical_cast//boost_lexical_cast + /boost/predef//boost_predef + /boost/random//boost_random + /boost/static_assert//boost_static_assert + /boost/throw_exception//boost_throw_exception ; explicit From 9170c3c4393050c355cd2b3f88659e492a185ae2 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 28 Apr 2024 20:16:08 -0500 Subject: [PATCH 04/23] Add missing NO_LIB usage requirements. --- build/Jamfile.v2 | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index d0354faf1e..a05d6889a4 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -1,16 +1,16 @@ # copyright John Maddock 2008 -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt. import testing ; import pch ; import config : requires ; -project - : requirements - intel-win:-nologo - intel-win:-nologo +project + : requirements + intel-win:-nologo + intel-win:-nologo #intel-linux:off intel-darwin:off gcc,windows:off @@ -20,9 +20,11 @@ project [ check-target-builds ../config//has_gcc_visibility "gcc visibility" : gcc:-fvisibility=hidden : ] [ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ] [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction ] + : usage-requirements + BOOST_MATH_TR1_NO_LIB=1 ; -cpp-pch pch : ../src/tr1/pch.hpp : ../src/tr1 shared:BOOST_MATH_TR1_DYN_LINK=1 ; +cpp-pch pch : ../src/tr1/pch.hpp : ../src/tr1 shared:BOOST_MATH_TR1_DYN_LINK=1 ; C99_SOURCES = acosh asinh @@ -46,7 +48,7 @@ round tgamma trunc ; -TR1_SOURCES = +TR1_SOURCES = assoc_laguerre assoc_legendre beta @@ -80,22 +82,22 @@ import targets ; obj long_double_check : ../config/has_long_double_support.cpp ; explicit long_double_check ; - + # Library targets lib boost_math_tr1 : ../src/tr1/$(TR1_SOURCES).cpp pch - : + : shared:BOOST_MATH_TR1_DYN_LINK=1 ../src/tr1 ; lib boost_math_tr1f : ../src/tr1/$(TR1_SOURCES)f.cpp pch - : + : shared:BOOST_MATH_TR1_DYN_LINK=1 ../src/tr1 ; lib boost_math_tr1l : ../src/tr1/$(TR1_SOURCES)l.cpp pch - : + : shared:BOOST_MATH_TR1_DYN_LINK=1 ../config//has_long_double_support ../src/tr1 @@ -103,19 +105,19 @@ lib boost_math_tr1l : ../src/tr1/$(TR1_SOURCES)l.cpp pch ; lib boost_math_c99 : ../src/tr1/$(C99_SOURCES).cpp pch - : + : shared:BOOST_MATH_TR1_DYN_LINK=1 ../src/tr1 ; lib boost_math_c99f : ../src/tr1/$(C99_SOURCES)f.cpp pch - : + : shared:BOOST_MATH_TR1_DYN_LINK=1 ../src/tr1 ; lib boost_math_c99l : ../src/tr1/$(C99_SOURCES)l.cpp pch - : + : shared:BOOST_MATH_TR1_DYN_LINK=1 ../config//has_long_double_support ../src/tr1 From edcca9f278a5fa9ef0af7b5f618bb94c7225b6b4 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 29 Apr 2024 12:58:49 -0500 Subject: [PATCH 05/23] Remove boost-root relative include path. --- test/test_float_io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_float_io.cpp b/test/test_float_io.cpp index 107cc39d4a..e1b5c67a12 100644 --- a/test/test_float_io.cpp +++ b/test/test_float_io.cpp @@ -301,7 +301,7 @@ void test() std::ios_base::fixed | std::ios_base::showpos}}; std::array, 40> string_data = {{ -#include "libs/math/test/string_data.ipp" +#include "string_data.ipp" }}; double num = 123456789.0; From e98fc46023232f185cf748d911670bb91ce455fc Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 4 May 2024 23:30:30 -0500 Subject: [PATCH 06/23] Add missing import-search for cconfig/predef checks. --- build/Jamfile.v2 | 1 + example/Jamfile.v2 | 1 + reporting/accuracy/Jamfile.v2 | 55 ++++++++++++------------ reporting/performance/Jamfile.v2 | 1 + test/Jamfile.v2 | 3 +- tools/Jamfile.v2 | 73 ++++++++++++++++---------------- 6 files changed, 70 insertions(+), 64 deletions(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index a05d6889a4..42e112a4a1 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -5,6 +5,7 @@ import testing ; import pch ; +import-search /boost/config/checks ; import config : requires ; project diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 533557ffd6..a30a80e17a 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -7,6 +7,7 @@ # bring in the rules for testing import testing ; +import-search /boost/config/checks ; import config : requires ; project diff --git a/reporting/accuracy/Jamfile.v2 b/reporting/accuracy/Jamfile.v2 index 482b07f1d7..0d961e66c5 100644 --- a/reporting/accuracy/Jamfile.v2 +++ b/reporting/accuracy/Jamfile.v2 @@ -12,6 +12,7 @@ import testing ; import modules ; import path ; import pch ; +import-search /boost/config/checks ; import config : requires ; using quickbook ; using auto-index ; @@ -47,16 +48,16 @@ explicit has_gsl ; exe has_rmath : has_rmath.cpp Rmath ; explicit has_rmath ; -CEPHES_SOURCE = acosh.c airy.c asin.c asinh.c atan.c atanh.c bdtr.c beta.c -btdtr.c cbrt.c chbevl.c chdtr.c clog.c cmplx.c const.c -cosh.c dawsn.c drand.c ei.c ellie.c ellik.c ellpe.c ellpj.c ellpk.c -exp.c exp10.c exp2.c expn.c expx2.c fabs.c fac.c fdtr.c -fresnl.c gamma.c gdtr.c hyp2f1.c hyperg.c i0.c i1.c igami.c incbet.c -incbi.c igam.c isnan.c iv.c j0.c j1.c jn.c jv.c k0.c k1.c kn.c kolmogorov.c -log.c log2.c log10.c lrand.c nbdtr.c ndtr.c ndtri.c pdtr.c planck.c -polevl.c polmisc.c polylog.c polyn.c pow.c powi.c psi.c rgamma.c round.c -shichi.c sici.c sin.c sindg.c sinh.c spence.c stdtr.c struve.c -tan.c tandg.c tanh.c unity.c yn.c zeta.c zetac.c +CEPHES_SOURCE = acosh.c airy.c asin.c asinh.c atan.c atanh.c bdtr.c beta.c +btdtr.c cbrt.c chbevl.c chdtr.c clog.c cmplx.c const.c +cosh.c dawsn.c drand.c ei.c ellie.c ellik.c ellpe.c ellpj.c ellpk.c +exp.c exp10.c exp2.c expn.c expx2.c fabs.c fac.c fdtr.c +fresnl.c gamma.c gdtr.c hyp2f1.c hyperg.c i0.c i1.c igami.c incbet.c +incbi.c igam.c isnan.c iv.c j0.c j1.c jn.c jv.c k0.c k1.c kn.c kolmogorov.c +log.c log2.c log10.c lrand.c nbdtr.c ndtr.c ndtri.c pdtr.c planck.c +polevl.c polmisc.c polylog.c polyn.c pow.c powi.c psi.c rgamma.c round.c +shichi.c sici.c sin.c sindg.c sinh.c spence.c stdtr.c struve.c +tan.c tandg.c tanh.c unity.c yn.c zeta.c zetac.c sqrt.c floor.c setprec.c mtherr.c ; path-constant here : . ; @@ -68,10 +69,10 @@ actions check_exists explicit $(here)/third_party/cephes_double/acosh.c ; lib cephes_double : $(here)/third_party/cephes_double/$(CEPHES_SOURCE) - : + : release static - [ check-target-builds $(here)/third_party/cephes_double/acosh.c : : no ] + [ check-target-builds $(here)/third_party/cephes_double/acosh.c : : no ] ; explicit cephes_double ; @@ -81,51 +82,51 @@ rule all-tests { for local source in [ glob test*.cpp ] { result += [ run $(source) /boost/system//boost_system /boost/filesystem//boost_filesystem /boost/test//boost_unit_test_framework /boost/interprocess//boost_interprocess /boost/multiprecision//boost_multiprecision /boost/type_index//boost_type_index quadmath mpfr - : : : - [ check-target-builds has_gsl : ALWAYS_TEST_DOUBLE : ] + : : : + [ check-target-builds has_gsl : ALWAYS_TEST_DOUBLE : ] linux:-lpthread linux:-lrt gcc:$(OTHERFLAGS) ] ; result += [ run $(source) /boost/system//boost_system /boost/filesystem//boost_filesystem /boost/test//boost_unit_test_framework /boost/interprocess//boost_interprocess /boost/multiprecision//boost_multiprecision /boost/type_index//boost_type_index quadmath mpfr - : : : [ check-target-builds has_cxx17_cmath : TEST_CXX17_CMATH : no ] + : : : [ check-target-builds has_cxx17_cmath : TEST_CXX17_CMATH : no ] linux:-lpthread linux:-lrt gcc:$(OTHERFLAGS) - : $(source:B)_cxx17_cmath ] + : $(source:B)_cxx17_cmath ] ; result += [ run $(source) /boost/system//boost_system /boost/filesystem//boost_filesystem /boost/test//boost_unit_test_framework /boost/interprocess//boost_interprocess /boost/multiprecision//boost_multiprecision /boost/type_index//boost_type_index quadmath mpfr - : : : [ check-target-builds has_c99_cmath : TEST_C99 : no ] + : : : [ check-target-builds has_c99_cmath : TEST_C99 : no ] linux:-lpthread linux:-lrt gcc:$(OTHERFLAGS) - : $(source:B)_c99 ] + : $(source:B)_c99 ] ; result += [ run $(source) /boost/system//boost_system /boost/filesystem//boost_filesystem /boost/test//boost_unit_test_framework /boost/interprocess//boost_interprocess /boost/multiprecision//boost_multiprecision /boost/type_index//boost_type_index gsl gslcblas - : : : [ check-target-builds has_gsl : TEST_GSL : no ] + : : : [ check-target-builds has_gsl : TEST_GSL : no ] linux:-lpthread linux:-lrt gcc:$(OTHERFLAGS) - : $(source:B)_gsl ] + : $(source:B)_gsl ] ; result += [ run $(source) /boost/system//boost_system /boost/filesystem//boost_filesystem /boost/test//boost_unit_test_framework /boost/interprocess//boost_interprocess /boost/multiprecision//boost_multiprecision /boost/type_index//boost_type_index Rmath - : : : [ check-target-builds has_rmath : TEST_RMATH : no ] + : : : [ check-target-builds has_rmath : TEST_RMATH : no ] linux:-lpthread linux:-lrt gcc:$(OTHERFLAGS) - : $(source:B)_rmath ] + : $(source:B)_rmath ] ; result += [ run $(source) /boost/system//boost_system /boost/filesystem//boost_filesystem /boost/test//boost_unit_test_framework /boost/interprocess//boost_interprocess /boost/multiprecision//boost_multiprecision /boost/type_index//boost_type_index cephes_double - : : : [ check-target-builds $(here)/third_party/cephes_double/acosh.c : TEST_CEPHES cephes_double : no ] + : : : [ check-target-builds $(here)/third_party/cephes_double/acosh.c : TEST_CEPHES cephes_double : no ] linux:-lpthread linux:-lrt gcc:$(OTHERFLAGS) - : $(source:B)_cephes ] + : $(source:B)_cephes ] ; } - return $(result) ; + return $(result) ; } - + test-suite report_gen : [ all-tests ] ; path-constant images_location : html ; @@ -138,7 +139,7 @@ boostbook standalone : # Path for links to Boost: boost.root=../../../../.. - + # Some general style settings: table.footnote.number.format=1 footnote.number.format=1 diff --git a/reporting/performance/Jamfile.v2 b/reporting/performance/Jamfile.v2 index a86ab196f4..5c60291b2c 100644 --- a/reporting/performance/Jamfile.v2 +++ b/reporting/performance/Jamfile.v2 @@ -12,6 +12,7 @@ import testing ; import modules ; import path ; import pch ; +import-search /boost/config/checks ; import config : requires ; using quickbook ; using auto-index ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9cdb0c90d7..6723d26c41 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -12,6 +12,7 @@ import testing ; import modules ; import path ; import pch ; +import-search /boost/config/checks ; import config : requires ; local ntl-path = [ modules.peek : NTL_PATH ] ; @@ -887,7 +888,7 @@ test-suite distribution_tests : [ run git_issue_1120.cpp ] ; -test-suite new_floats : +test-suite new_floats : [ compile compile_test/float32.cpp ] [ compile compile_test/float64.cpp ] [ compile compile_test/float128.cpp ] diff --git a/tools/Jamfile.v2 b/tools/Jamfile.v2 index 40678700d5..fd33960704 100644 --- a/tools/Jamfile.v2 +++ b/tools/Jamfile.v2 @@ -1,6 +1,6 @@ # Copyright John Maddock 2010 -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt. # \math_toolkit\libs\math\test\jamfile.v2 # Runs all math toolkit tests, functions & distributions, @@ -9,22 +9,23 @@ # bring in the rules for testing import modules ; import path ; +import-search /boost/config/checks ; import config : requires ; -project - : requirements +project + : requirements gcc:-Wno-missing-braces darwin:-Wno-missing-braces acc:+W2068,2461,2236,4070,4069 - intel-win:-nologo - intel-win:-nologo + intel-win:-nologo + intel-win:-nologo msvc:all msvc:on msvc:/wd4996 - msvc:/wd4512 - msvc:/wd4610 - msvc:/wd4510 - msvc:/wd4127 + msvc:/wd4512 + msvc:/wd4610 + msvc:/wd4510 + msvc:/wd4127 msvc:/wd4701 # needed for lexical cast - temporary. static borland:static @@ -58,8 +59,8 @@ exe laguerre_data : laguerre_data.cpp ; install laguerre_data_install : laguerre_data : bin ; exe bessel_derivative_data : bessel_derivative_data.cpp /boost/test//boost_test : -[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] -[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] +[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] [ check-target-builds ../config//is_ci_standalone_run : no ] ; install bessel_derivative_data_install : bessel_derivative_data : bin ; @@ -69,12 +70,12 @@ install ellint_k_data_install : ellint_k_data : bin ; exe hyp_0f2_data : hyp_0f2_data.cpp ; install hyp_0f2_data_install : hyp_0f2_data : bin ; -exe hypergeometric_dist_data : hypergeometric_dist_data.cpp : -[ check-target-builds ../config//is_ci_standalone_run : no ] +exe hypergeometric_dist_data : hypergeometric_dist_data.cpp : +[ check-target-builds ../config//is_ci_standalone_run : no ] [ requires cxx11_hdr_random ] ; install hypergeometric_dist_data_install : hypergeometric_dist_data : bin ; -exe legendre_data : legendre_data.cpp : +exe legendre_data : legendre_data.cpp : [ check-target-builds ../config//is_ci_standalone_run : no ] ; install legendre_data_install : legendre_data : bin ; @@ -85,10 +86,10 @@ install beta_data_install : beta_data : bin ; exe ellint_pi2_data : ellint_pi2_data.cpp /boost/test//boost_test ; install ellint_pi2_data_install : ellint_pi2_data : bin ; -exe hyp_1f1_big_data : hyp_1f1_big_data.cpp : -[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] -[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] -[ check-target-builds /boost/multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] +exe hyp_1f1_big_data : hyp_1f1_big_data.cpp : +[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] [ requires cxx11_decltype ] ; install hyp_1f1_big_data_install : hyp_1f1_big_data : bin ; @@ -105,10 +106,10 @@ install carlson_ellint_data_install : carlson_ellint_data : bin ; exe ellint_pi3_data : ellint_pi3_data.cpp /boost/test//boost_test ; install ellint_pi3_data_install : ellint_pi3_data : bin ; -exe hyp_1f1_data : hyp_1f1_data.cpp : -[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] -[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] -[ check-target-builds /boost/multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] +exe hyp_1f1_data : hyp_1f1_data.cpp : +[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] [ requires cxx11_decltype ] ; install hyp_1f1_data_install : hyp_1f1_data : bin ; @@ -125,10 +126,10 @@ install cbrt_data_install : cbrt_data : bin ; exe erf_data : erf_data.cpp : [ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] ; install erf_data_install : erf_data : bin ; -exe hyp_1f1_log_big_data : hyp_1f1_log_big_data.cpp : -[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] -[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] -[ check-target-builds /boost/multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] +exe hyp_1f1_log_big_data : hyp_1f1_log_big_data.cpp : +[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] [ requires cxx11_decltype ] ; install hyp_1f1_log_big_data_install : hyp_1f1_log_big_data : bin ; @@ -145,18 +146,18 @@ install digamma_data_install : digamma_data : bin ; exe expint_data : expint_data.cpp ; install expint_data_install : expint_data : bin ; -exe hyp_1f1_reg_big_data : hyp_1f1_reg_big_data.cpp : -[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] -[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] -[ check-target-builds /boost/multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] +exe hyp_1f1_reg_big_data : hyp_1f1_reg_big_data.cpp : +[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] +[ check-target-builds /boost/multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] [ requires cxx11_decltype ] ; install hyp_1f1_reg_big_data_install : hyp_1f1_reg_big_data : bin ; exe ibeta_invab_data : ibeta_invab_data.cpp : [ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] ; install ibeta_invab_data_install : ibeta_invab_data : bin ; -exe tgamma_large_data : tgamma_large_data.cpp /boost/test//boost_test : -[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] +exe tgamma_large_data : tgamma_large_data.cpp /boost/test//boost_test : +[ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] [ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] ; install tgamma_large_data_install : tgamma_large_data : bin ; @@ -172,7 +173,7 @@ install hyp_1f2_data_install : hyp_1f2_data : bin ; exe igamma_data : igamma_data.cpp : [ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] ; install igamma_data_install : igamma_data : bin ; -exe tgamma_ratio_data : tgamma_ratio_data.cpp : +exe tgamma_ratio_data : tgamma_ratio_data.cpp : [ check-target-builds ../config//is_ci_standalone_run : no ] ; install tgamma_ratio_data_install : tgamma_ratio_data : bin ; @@ -216,8 +217,8 @@ install generate_test_values_install : generate_test_values : bin ; exe igamma_temme_large_coef : igamma_temme_large_coef.cpp ; install igamma_temme_large_coef_install : igamma_temme_large_coef : bin ; -exe lanczos_generator : lanczos_generator.cpp /boost/chrono//boost_chrono /boost/system//boost_system : -[ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] +exe lanczos_generator : lanczos_generator.cpp /boost/chrono//boost_chrono /boost/system//boost_system : +[ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] [ requires cxx11_nullptr ] ; install lanczos_generator_install : lanczos_generator : bin ; From 24646860a980082be6d10f67d920025f7be60045 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:00:01 -0500 Subject: [PATCH 07/23] Add requires-b2 check to top-level build file. --- build.jam | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.jam b/build.jam index 86c593fc7c..885298031c 100644 --- a/build.jam +++ b/build.jam @@ -3,6 +3,8 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) +require-b2 5.1 ; + import project ; project /boost/math From 1b67d842e0f40cbe6ffe2a0c4bf1783e4b6bc3a4 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 30 May 2024 11:27:41 -0500 Subject: [PATCH 08/23] Sync upstream. --- test/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 621d4eb503..6b83f7722e 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -185,7 +185,7 @@ test-suite special_fun : [ run git_issue_184.cpp ] [ run git_issue_1137.cpp ] [ run git_issue_1139.cpp ] - [ run special_functions_test.cpp /boost/test//boost_unit_test_framework ] + [ run special_functions_test.cpp /boost/test//boost_unit_test_frameworkcd ] [ run test_airy.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] [ run test_bessel_j.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] [ run test_bessel_y.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] From b5dd7cbd8851e5046cbaade5207a4425f9382dee Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 2 Jun 2024 23:24:12 -0500 Subject: [PATCH 09/23] Fix typo in test framework reference. --- test/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 7afb0a5486..5437f19476 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -185,7 +185,7 @@ test-suite special_fun : [ run git_issue_184.cpp ] [ run git_issue_1137.cpp ] [ run git_issue_1139.cpp ] - [ run special_functions_test.cpp /boost/test//boost_unit_test_frameworkcd ] + [ run special_functions_test.cpp /boost/test//boost_unit_test_framework ] [ run test_airy.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] [ run test_bessel_j.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] [ run test_bessel_y.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] From dddb31de123eb09ada3d2edf3d5e133e27526fe0 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Jun 2024 11:33:56 -0500 Subject: [PATCH 10/23] Bump B2 require to 5.2 --- build.jam | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.jam b/build.jam index 885298031c..572ade14aa 100644 --- a/build.jam +++ b/build.jam @@ -3,9 +3,7 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -require-b2 5.1 ; - -import project ; +require-b2 5.2 ; project /boost/math : common-requirements From 3c85e371a0a84c5d8bba428c4f9184aeb56ed794 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 22:52:03 -0500 Subject: [PATCH 11/23] Update copyright dates. --- build.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.jam b/build.jam index 572ade14aa..4f32abe572 100644 --- a/build.jam +++ b/build.jam @@ -1,4 +1,4 @@ -# Copyright René Ferdinand Rivera Morell 2023 +# Copyright René Ferdinand Rivera Morell 2023-2024 # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) From da0956a9edd3a916beed87a3f45913ad9c74de00 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:34:22 -0500 Subject: [PATCH 12/23] Move inter-lib dependencies to a project variable and into the build targets. --- build.jam | 25 ++++++++++++++----------- build/Jamfile.v2 | 1 + 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/build.jam b/build.jam index 4f32abe572..fb244e511d 100644 --- a/build.jam +++ b/build.jam @@ -5,23 +5,25 @@ require-b2 5.2 ; +constant boost_dependencies : + /boost/assert//boost_assert + /boost/concept_check//boost_concept_check + /boost/config//boost_config + /boost/core//boost_core + /boost/integer//boost_integer + /boost/lexical_cast//boost_lexical_cast + /boost/predef//boost_predef + /boost/random//boost_random + /boost/static_assert//boost_static_assert + /boost/throw_exception//boost_throw_exception ; + project /boost/math : common-requirements include - /boost/assert//boost_assert - /boost/concept_check//boost_concept_check - /boost/config//boost_config - /boost/core//boost_core - /boost/integer//boost_integer - /boost/lexical_cast//boost_lexical_cast - /boost/predef//boost_predef - /boost/random//boost_random - /boost/static_assert//boost_static_assert - /boost/throw_exception//boost_throw_exception ; explicit - [ alias boost_math ] + [ alias boost_math : : : : $(boost_dependencies) ] [ alias boost_math_c99 : build//boost_math_c99 ] [ alias boost_math_c99f : build//boost_math_c99f ] [ alias boost_math_c99l : build//boost_math_c99l ] @@ -43,3 +45,4 @@ call-if : boost-library math boost_math_c99 boost_math_c99f boost_math_c99l boost_math_tr1 boost_math_tr1f boost_math_tr1l ; + diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 42e112a4a1..500c77363d 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -9,6 +9,7 @@ import-search /boost/config/checks ; import config : requires ; project + : common-requirements $(boost_dependencies) : requirements intel-win:-nologo intel-win:-nologo From 333d993689e28c436dcfe85a70183a7fc52c1529 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 25 Jul 2024 23:29:59 -0500 Subject: [PATCH 13/23] Switch to /boost/test//included target for header only mode of Boost.Test. --- example/Jamfile.v2 | 2 +- test/Jamfile.v2 | 2 +- tools/Jamfile.v2 | 30 +++++++++++++++--------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index a30a80e17a..8dd02b3cd4 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -54,7 +54,7 @@ test-suite examples : [ run binomial_example_nag.cpp ] [ run binomial_quiz_example.cpp : : : off:no ] [ run binomial_sample_sizes.cpp ] - [ run brent_minimise_example.cpp /boost/test//boost_test : : : [ requires cxx11_hdr_tuple ] ] + [ run brent_minimise_example.cpp /boost/test//included : : : [ requires cxx11_hdr_tuple ] ] [ run c_error_policy_example.cpp ] [ run chi_square_std_dev_test.cpp : : : off:no ] diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 262042c06c..634afc19af 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -36,7 +36,7 @@ obj no_eh : noeh_support.cpp ; project : requirements /boost/multiprecision//boost_multiprecision - /boost/test//boost_test + /boost/test//included /boost/type_index//boost_type_index /boost/ublas//boost_ublas $(OBJ_REMOVAL_OPTIONS) diff --git a/tools/Jamfile.v2 b/tools/Jamfile.v2 index fd33960704..56155ec3cc 100644 --- a/tools/Jamfile.v2 +++ b/tools/Jamfile.v2 @@ -46,10 +46,10 @@ exe bessel_data : bessel_data.cpp : [ check-target-builds ../config//is_ci_standalone_run : no ] ; install bessel_data_install : bessel_data : bin ; -exe ellint_f_data : ellint_f_data.cpp /boost/test//boost_test ; +exe ellint_f_data : ellint_f_data.cpp /boost/test//included ; install ellint_f_data_install : ellint_f_data : bin ; -exe heuman_lambda_data : heuman_lambda_data.cpp /boost/test//boost_test ; +exe heuman_lambda_data : heuman_lambda_data.cpp /boost/test//included ; install heuman_lambda_data_install : heuman_lambda_data : bin ; exe hyp_2f2_data : hyp_2f2_data.cpp ; @@ -58,13 +58,13 @@ install hyp_2f2_data_install : hyp_2f2_data : bin ; exe laguerre_data : laguerre_data.cpp ; install laguerre_data_install : laguerre_data : bin ; -exe bessel_derivative_data : bessel_derivative_data.cpp /boost/test//boost_test : +exe bessel_derivative_data : bessel_derivative_data.cpp /boost/test//included : [ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] [ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] [ check-target-builds ../config//is_ci_standalone_run : no ] ; install bessel_derivative_data_install : bessel_derivative_data : bin ; -exe ellint_k_data : ellint_k_data.cpp /boost/test//boost_test ; +exe ellint_k_data : ellint_k_data.cpp /boost/test//included ; install ellint_k_data_install : ellint_k_data : bin ; exe hyp_0f2_data : hyp_0f2_data.cpp ; @@ -83,7 +83,7 @@ exe beta_data : beta_data.cpp : [ check-target-builds ../config//is_ci_standalone_run : no ] ; install beta_data_install : beta_data : bin ; -exe ellint_pi2_data : ellint_pi2_data.cpp /boost/test//boost_test ; +exe ellint_pi2_data : ellint_pi2_data.cpp /boost/test//included ; install ellint_pi2_data_install : ellint_pi2_data : bin ; exe hyp_1f1_big_data : hyp_1f1_big_data.cpp : @@ -100,10 +100,10 @@ install ibeta_data_install : ibeta_data : bin ; exe log1p_expm1_data : log1p_expm1_data.cpp ; install log1p_expm1_data_install : log1p_expm1_data : bin ; -exe carlson_ellint_data : carlson_ellint_data.cpp /boost/test//boost_test ; +exe carlson_ellint_data : carlson_ellint_data.cpp /boost/test//included ; install carlson_ellint_data_install : carlson_ellint_data : bin ; -exe ellint_pi3_data : ellint_pi3_data.cpp /boost/test//boost_test ; +exe ellint_pi3_data : ellint_pi3_data.cpp /boost/test//included ; install ellint_pi3_data_install : ellint_pi3_data : bin ; exe hyp_1f1_data : hyp_1f1_data.cpp : @@ -117,7 +117,7 @@ exe ibeta_derivative_data : ibeta_derivative_data.cpp /boost/math//testing : [ check-target-builds ../config//is_ci_standalone_run : no ] ; install ibeta_derivative_data_install : ibeta_derivative_data : bin ; -exe sinc_data : sinc_data.cpp /boost/test//boost_test ; +exe sinc_data : sinc_data.cpp /boost/test//included ; install sinc_data_install : sinc_data : bin ; exe cbrt_data : cbrt_data.cpp ; @@ -140,7 +140,7 @@ exe spherical_harmonic_data : spherical_harmonic_data.cpp : [ check-target-builds ../config//is_ci_standalone_run : no ] ; install spherical_harmonic_data_install : spherical_harmonic_data : bin ; -exe digamma_data : digamma_data.cpp /boost/test//boost_test : [ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] ; +exe digamma_data : digamma_data.cpp /boost/test//included : [ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] ; install digamma_data_install : digamma_data : bin ; exe expint_data : expint_data.cpp ; @@ -156,12 +156,12 @@ install hyp_1f1_reg_big_data_install : hyp_1f1_reg_big_data : bin ; exe ibeta_invab_data : ibeta_invab_data.cpp : [ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] ; install ibeta_invab_data_install : ibeta_invab_data : bin ; -exe tgamma_large_data : tgamma_large_data.cpp /boost/test//boost_test : +exe tgamma_large_data : tgamma_large_data.cpp /boost/test//included : [ check-target-builds /boost/multiprecision/config//has_gmp : gmp : no ] [ check-target-builds /boost/multiprecision/config//has_mpfr : mpfr : no ] ; install tgamma_large_data_install : tgamma_large_data : bin ; -exe ellint_d_data : ellint_d_data.cpp /boost/test//boost_test ; +exe ellint_d_data : ellint_d_data.cpp /boost/test//included ; install ellint_d_data_install : ellint_d_data : bin ; exe expint_i_data : expint_i_data.cpp ; @@ -177,7 +177,7 @@ exe tgamma_ratio_data : tgamma_ratio_data.cpp : [ check-target-builds ../config//is_ci_standalone_run : no ] ; install tgamma_ratio_data_install : tgamma_ratio_data : bin ; -exe ellint_d2_data : ellint_d2_data.cpp /boost/test//boost_test ; +exe ellint_d2_data : ellint_d2_data.cpp /boost/test//included ; install ellint_d2_data_install : ellint_d2_data : bin ; exe gamma_P_inva_data : gamma_P_inva_data.cpp : [ check-target-builds /boost/multiprecision/config//has_float128 : quadmath : no ] ; @@ -192,7 +192,7 @@ install inv_hyp_data_install : inv_hyp_data : bin ; exe trig_data : trig_data.cpp ; install trig_data_install : trig_data : bin ; -exe ellint_e_data : ellint_e_data.cpp /boost/test//boost_test ; +exe ellint_e_data : ellint_e_data.cpp /boost/test//included ; install ellint_e_data_install : ellint_e_data : bin ; exe hermite_data : hermite_data.cpp ; @@ -201,10 +201,10 @@ install hermite_data_install : hermite_data : bin ; exe hyp_2f1_data : hyp_2f1_data.cpp ; install hyp_2f1_data_install : hyp_2f1_data : bin ; -exe jacobi_theta_data : jacobi_theta_data.cpp /boost/test//boost_test ; +exe jacobi_theta_data : jacobi_theta_data.cpp /boost/test//included ; install jacobi_theta_data_install : jacobi_theta_data : bin ; -exe jacobi_zeta_data : jacobi_zeta_data.cpp /boost/test//boost_test ; +exe jacobi_zeta_data : jacobi_zeta_data.cpp /boost/test//included ; install jacobi_zeta_data_install : jacobi_zeta_data : bin ; exe zeta_data : zeta_data.cpp : From 59d4cd3a2f1a50804e9d1ebd3c1a24cce37a1905 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 28 Jul 2024 16:46:10 -0500 Subject: [PATCH 14/23] Adjust doc build to avoid boost-root references. --- doc/Jamfile.v2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 71746726f5..511262d493 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -13,7 +13,7 @@ path-constant here : . ; constant here-url : [ regex.replace $(here) "\\\\" "/" ] ; xml math : math.qbk : - enable_index + enable_index __base_path__=$(here-url) pdf:__build_pdf html:__build_html @@ -25,7 +25,7 @@ boostbook standalone # Path for links to Boost: boost.root=../../../.. html.stylesheet=math.css - + # Some general style settings: table.footnote.number.format=1 footnote.number.format=1 @@ -46,11 +46,11 @@ boostbook standalone # Index on type: index.on.type=1 boost.noexpand.chapter.toc=1 - + #root.filename="sf_dist_and_tools" #graphicsize.extension=1 #use.extensions=1 - + # PDF Options: # TOC Generation: this is needed for FOP-0.9 and later: fop1.extensions=0 @@ -74,7 +74,7 @@ boostbook standalone # better use SVG's instead: pdf:admon.graphics.extension=".svg" pdf:admon.graphics.path=$(here)/../../../doc/src/images/ - pdf:use.role.for.mediaobject=1 + pdf:use.role.for.mediaobject=1 pdf:preferred.mediaobject.role=print pdf:img.src.path=$(images_location)/ pdf:draft.mode="no" @@ -82,7 +82,7 @@ boostbook standalone on pdf:off html:on $(here)/index.idx - $(here)/../../.. + $(here)/../include #on pdf:index.on.type=1 ; @@ -90,7 +90,7 @@ boostbook standalone install pdfinstall : standalone/pdf : . PDF math.pdf ; explicit pdfinstall ; # b2 pdf pdfinstall to do this pdf file copy. -install css_install : math.css : $(here)/html ; +install css_install : math.css : $(here)/html ; ############################################################################### alias boostdoc ; From 4ea6592f96eea092ef3e333a67a85cdd3a92e066 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 3 Aug 2024 17:44:30 -0500 Subject: [PATCH 15/23] Update build deps. --- example/Jamfile.v2 | 1 + test/Jamfile.v2 | 1 + 2 files changed, 2 insertions(+) diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 8dd02b3cd4..2a6ad6947d 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -12,6 +12,7 @@ import config : requires ; project : requirements + /boost/math//boost_math /boost/multiprecision//boost_multiprecision gcc:-Wno-missing-braces darwin:-Wno-missing-braces diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 75bdbb2ac9..92c622d56a 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -35,6 +35,7 @@ obj no_eh : noeh_support.cpp ; project : requirements + /boost/math//boost_math /boost/multiprecision//boost_multiprecision /boost/test//included /boost/type_index//boost_type_index From 70754484d74d5cb6134a8d467876794915e27f23 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 4 Aug 2024 10:33:13 -0500 Subject: [PATCH 16/23] Fix project props not applying to the no_eh.obj compile. --- test/Jamfile.v2 | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 92c622d56a..f3bcb24f05 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -19,19 +19,6 @@ local ntl-path = [ modules.peek : NTL_PATH ] ; local gmp_path = [ modules.peek : GMP_PATH ] ; local e_float_path = [ modules.peek : E_FLOAT_PATH ] ; -# -# PCH support is broken when --remove-test-targets is specified on the command -# line. Disable it until someone fixes this. -# -local remove-test-targets = [ MATCH (--remove-test-targets) : [ modules.peek : ARGV ] ] ; - -if $(remove-test-targets) -{ - OBJ_REMOVAL_OPTIONS = off ; -} - -obj no_eh : noeh_support.cpp ; - project : requirements @@ -83,6 +70,19 @@ project [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction ] ; +# +# PCH support is broken when --remove-test-targets is specified on the command +# line. Disable it until someone fixes this. +# +local remove-test-targets = [ MATCH (--remove-test-targets) : [ modules.peek : ARGV ] ] ; + +if $(remove-test-targets) +{ + OBJ_REMOVAL_OPTIONS = off ; +} + +obj no_eh : noeh_support.cpp ; + if $(ntl-path) { lib ntl : [ GLOB $(ntl-path)/src : *.cpp ] ; From 893e21aa69f26f1798a93bd89fbed0bb879ad5b5 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 5 Aug 2024 23:05:32 -0500 Subject: [PATCH 17/23] Update build deps. --- test/Jamfile.v2 | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index f3bcb24f05..f93528a654 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -19,6 +19,19 @@ local ntl-path = [ modules.peek : NTL_PATH ] ; local gmp_path = [ modules.peek : GMP_PATH ] ; local e_float_path = [ modules.peek : E_FLOAT_PATH ] ; +# +# PCH support is broken when --remove-test-targets is specified on the command +# line. Disable it until someone fixes this. +# +local remove-test-targets = [ MATCH (--remove-test-targets) : [ modules.peek : ARGV ] ] ; + +if $(remove-test-targets) +{ + OBJ_REMOVAL_OPTIONS = off ; +} + +obj no_eh : noeh_support.cpp : /boost/config//boost_config ; + project : requirements @@ -70,19 +83,6 @@ project [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction ] ; -# -# PCH support is broken when --remove-test-targets is specified on the command -# line. Disable it until someone fixes this. -# -local remove-test-targets = [ MATCH (--remove-test-targets) : [ modules.peek : ARGV ] ] ; - -if $(remove-test-targets) -{ - OBJ_REMOVAL_OPTIONS = off ; -} - -obj no_eh : noeh_support.cpp ; - if $(ntl-path) { lib ntl : [ GLOB $(ntl-path)/src : *.cpp ] ; From 68279e5036f18bed5d90b431d35be274f8aafee9 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 7 Aug 2024 23:40:29 -0500 Subject: [PATCH 18/23] Add missing import-search. --- reporting/performance/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/reporting/performance/Jamfile.v2 b/reporting/performance/Jamfile.v2 index 5c60291b2c..0a960e9236 100644 --- a/reporting/performance/Jamfile.v2 +++ b/reporting/performance/Jamfile.v2 @@ -17,6 +17,7 @@ import config : requires ; using quickbook ; using auto-index ; +import-search /boost/predef/tools/check ; import predef : check require : predef-check predef-require ; From 27d84fd7372b41620ee44781ac3700c2faae6f2b Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 25 Aug 2024 10:10:10 -0500 Subject: [PATCH 19/23] Fix float128_type checks to actually disable tests. Problem was that build is a non-free feature. Which can't be acquired through a usage requirement. --- test/Jamfile.v2 | 278 ++++++++++++++++++++++++------------------------ 1 file changed, 139 insertions(+), 139 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index f93528a654..439fbfddbc 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -99,7 +99,7 @@ cpp-pch pch_light : pch_light.hpp : /boost/test//boost_unit_test_framework lib compile_test_main : compile_test/main.cpp ; searched-lib quadmath : : shared ; -alias float128_type : : : : +local float128_type = [ check-target-builds ../config//has_intel_quad "Intel _Quad datatype support" : -Qoption,cpp,--extended_float_type BOOST_MATH_USE_FLOAT128 ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : gcc:quadmath gcc:BOOST_MATH_TEST_FLOAT128 ] [ check-target-builds ../config//has_128bit_floatmax_t "128-bit floatmax_t" : gcc:quadmath gcc:BOOST_MATH_TEST_FLOAT128 : no ] @@ -109,10 +109,10 @@ test-suite special_fun : [ run test_1F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=1 : test_1F0_1 ] # hypergeometric_pFq_checked_series.hpp uses auto, the rest are from quadrature tests. [ run test_1F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=2 : test_1F0_2 ] # hypergeometric_pFq_checked_series.hpp uses auto, the rest are from quadrature tests. [ run test_1F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 : test_1F0_3 ] # hypergeometric_pFq_checked_series.hpp uses auto, the rest are from quadrature tests. - [ run test_2F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] float128_type TEST=1 : test_2F0_1 ] - [ run test_2F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] float128_type TEST=2 : test_2F0_2 ] - [ run test_2F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] float128_type TEST=3 : test_2F0_3 ] - [ run test_2F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] float128_type TEST=4 : test_2F0_4 ] + [ run test_2F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] $(float128_type) TEST=1 : test_2F0_1 ] + [ run test_2F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] $(float128_type) TEST=2 : test_2F0_2 ] + [ run test_2F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] $(float128_type) TEST=3 : test_2F0_3 ] + [ run test_2F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] $(float128_type) TEST=4 : test_2F0_4 ] [ run test_0F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=1 : test_0F1_1 ] [ run test_0F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=2 : test_0F1_2 ] @@ -142,40 +142,40 @@ test-suite special_fun : [ run pow_test.cpp /boost/test//boost_unit_test_framework ] [ run logaddexp_test.cpp /boost/test//boost_unit_test_framework ] [ run logsumexp_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_variadic_templates ] ] - [ run ccmath_sqrt_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_isinf_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_isnan_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_abs_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_isfinite_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_isnormal_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_fpclassify_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_frexp_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_ldexp_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_div_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_logb_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_ilogb_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_scalbn_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_scalbln_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_floor_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_ceil_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_trunc_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_modf_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_round_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_fmod_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_remainder_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_copysign_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_hypot_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_fdim_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_fmax_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_fmin_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_isgreater_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_isgreaterequal_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_isless_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_islessequal_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_isunordered_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_next_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_fma_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] - [ run ccmath_signbit_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] float128_type ] + [ run ccmath_sqrt_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_isinf_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_isnan_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_abs_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_isfinite_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_isnormal_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_fpclassify_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_frexp_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_ldexp_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_div_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_logb_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_ilogb_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_scalbn_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_scalbln_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_floor_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_ceil_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_trunc_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_modf_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_round_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_fmod_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_remainder_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_copysign_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_hypot_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_fdim_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_fmax_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_fmin_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_isgreater_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_isgreaterequal_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_isless_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_islessequal_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_isunordered_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_next_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_fma_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] + [ run ccmath_signbit_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr ] $(float128_type) ] [ run log1p_expm1_test.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] [ run powm1_sqrtp1m1_test.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] [ run git_issue_705.cpp /boost/test//boost_unit_test_framework ] @@ -523,19 +523,19 @@ test-suite special_fun : [ run test_laguerre.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] [ run test_lambert_w.cpp /boost/test//boost_unit_test_framework ] - [ run test_lambert_w.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=1 float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_1 ] - [ run test_lambert_w.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=2 float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_2 ] - [ run test_lambert_w.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=3 float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_3 ] - [ run test_lambert_w.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=4 BOOST_MATH_TEST_FLOAT128 float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_4 ] + [ run test_lambert_w.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=1 $(float128_type) [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_1 ] + [ run test_lambert_w.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=2 $(float128_type) [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_2 ] + [ run test_lambert_w.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=3 $(float128_type) [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_3 ] + [ run test_lambert_w.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION=4 BOOST_MATH_TEST_FLOAT128 $(float128_type) [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_lambert_w_multiprecision_4 ] [ run test_lambert_w_integrals_float128.cpp /boost/test//boost_unit_test_framework : : : release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : "-Bstatic -lquadmath -Bdynamic" : no ] [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ run test_lambert_w_integrals_quad.cpp /boost/test//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run test_lambert_w_integrals_quad.cpp /boost/test//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] $(float128_type) [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run test_lambert_w_integrals_long_double.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] ] [ run test_lambert_w_integrals_double.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] ] [ run test_lambert_w_integrals_float.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] ] - [ run test_lambert_w_derivative.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION float128_type ] + [ run test_lambert_w_derivative.cpp /boost/test//boost_unit_test_framework : : : BOOST_MATH_TEST_MULTIPRECISION $(float128_type) ] - [ run test_legendre.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : : : float128_type ] - [ run chebyshev_test.cpp : : : [ requires cxx11_inline_namespaces cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_range_based_for cxx11_constexpr ] float128_type ] + [ run test_legendre.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework : : : $(float128_type) ] + [ run chebyshev_test.cpp : : : [ requires cxx11_inline_namespaces cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_range_based_for cxx11_constexpr ] $(float128_type) ] [ run chebyshev_transform_test.cpp ../config//fftw3f : : : TEST1 [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_range_based_for ] [ check-target-builds ../config//has_fftw3 "libfftw3" : : no ] : chebyshev_transform_test_1 ] [ run chebyshev_transform_test.cpp ../config//fftw3 : : : TEST2 [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_range_based_for ] [ check-target-builds ../config//has_fftw3 "libfftw3" : : no ] : chebyshev_transform_test_2 ] [ run chebyshev_transform_test.cpp ../config//fftw3l : : : TEST3 [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_range_based_for ] [ check-target-builds ../config//has_fftw3 "libfftw3" : : no ] : chebyshev_transform_test_3 ] @@ -558,7 +558,7 @@ test-suite special_fun : [ run git_issue_430.cpp pch /boost/test//boost_unit_test_framework ] [ run test_spherical_harmonic.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] [ run test_sign.cpp /boost/test//boost_unit_test_framework ] - [ run test_tgamma_for_issue396_part1.cpp /boost/test//boost_unit_test_framework : : : float128_type gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] + [ run test_tgamma_for_issue396_part1.cpp /boost/test//boost_unit_test_framework : : : $(float128_type) gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] [ run test_tgamma_for_issue396_part2.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] [ run test_tgamma_ratio.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] [ run test_trig.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] @@ -899,8 +899,8 @@ test-suite new_floats : [ compile compile_test/float32.cpp ] [ compile compile_test/float64.cpp ] [ compile compile_test/float128.cpp ] - [ run test_float_io.cpp : : : float128_type ] - [ run test_float_io.cpp : : : BOOST_MATH_TEST_IO_AS_INTEL_QUAD=1 float128_type : test_float_io_quad ] + [ run test_float_io.cpp : : : $(float128_type) ] + [ run test_float_io.cpp : : : BOOST_MATH_TEST_IO_AS_INTEL_QUAD=1 $(float128_type) : test_float_io_quad ] ; test-suite mp : @@ -959,14 +959,14 @@ test-suite misc : : test_tr1_c_long_double ] - [ run test_constants.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] - [ run simple_continued_fraction_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] - [ run centered_continued_fraction_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] - [ run luroth_expansion_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] - [ run engel_expansion_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run test_constants.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) ] + [ run simple_continued_fraction_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) ] + [ run centered_continued_fraction_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) ] + [ run luroth_expansion_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) ] + [ run engel_expansion_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) ] [ run test_classify.cpp pch /boost/test//boost_unit_test_framework : : : msvc:/bigobj ] [ run test_error_handling.cpp /boost/test//boost_unit_test_framework ] - [ run legendre_stieltjes_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_range_based_for ] float128_type ] + [ run legendre_stieltjes_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_range_based_for ] $(float128_type) ] [ run test_minima.cpp pch /boost/test//boost_unit_test_framework ] [ run test_rationals.cpp /boost/test//boost_unit_test_framework test_rational_instances/test_rational_double1.cpp @@ -1003,13 +1003,13 @@ test-suite misc : [ run test_long_double_support.cpp /boost/test//boost_unit_test_framework : : : [ check-target-builds ../config//has_long_double_support "long double support" : : no ] ] [ run test_recurrence.cpp : : : TEST=1 [ requires cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_auto_declarations cxx11_decltype ] msvc:/bigobj : test_recurrence_1 ] - [ run test_recurrence.cpp : : : TEST=2 release float128_type [ requires cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_auto_declarations cxx11_decltype ] : test_recurrence_2 ] - [ run test_recurrence.cpp : : : TEST=3 release float128_type [ requires cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_auto_declarations cxx11_decltype ] : test_recurrence_3 ] + [ run test_recurrence.cpp : : : TEST=2 release $(float128_type) [ requires cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_auto_declarations cxx11_decltype ] : test_recurrence_2 ] + [ run test_recurrence.cpp : : : TEST=3 release $(float128_type) [ requires cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_auto_declarations cxx11_decltype ] : test_recurrence_3 ] [ run test_print_info_on_type.cpp ] [ run univariate_statistics_test.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run univariate_statistics_backwards_compatible_test.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ] - [ run ooura_fourier_integral_test.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] float128_type [ requires cxx17_if_constexpr cxx17_std_apply ] ] + [ run ooura_fourier_integral_test.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] $(float128_type) [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run empirical_cumulative_distribution_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run norms_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run signal_statistics_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] @@ -1017,17 +1017,17 @@ test-suite misc : [ run ljung_box_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run cubic_roots_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run quartic_roots_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] - [ run test_t_test.cpp : : : float128_type [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ] - [ run test_z_test.cpp : : : float128_type [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ] + [ run test_t_test.cpp : : : $(float128_type) [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ] + [ run test_z_test.cpp : : : $(float128_type) [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ] [ run bivariate_statistics_test.cpp : : : [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] [ run linear_regression_test.cpp : : : [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ] [ run test_runs_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run test_chatterjee_correlation.cpp /boost/test//boost_unit_test_framework ] [ run test_rank.cpp /boost/test//boost_unit_test_framework ] [ run lanczos_smoothing_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] - [ run condition_number_test.cpp /boost/test//boost_unit_test_framework : : : TEST=1 msvc:/bigobj float128_type : condition_number_test_1 ] - [ run condition_number_test.cpp /boost/test//boost_unit_test_framework : : : TEST=2 msvc:/bigobj float128_type : condition_number_test_2 ] - [ run condition_number_test.cpp /boost/test//boost_unit_test_framework : : : TEST=3 msvc:/bigobj float128_type : condition_number_test_3 ] + [ run condition_number_test.cpp /boost/test//boost_unit_test_framework : : : TEST=1 msvc:/bigobj $(float128_type) : condition_number_test_1 ] + [ run condition_number_test.cpp /boost/test//boost_unit_test_framework : : : TEST=2 msvc:/bigobj $(float128_type) : condition_number_test_2 ] + [ run condition_number_test.cpp /boost/test//boost_unit_test_framework : : : TEST=3 msvc:/bigobj $(float128_type) : condition_number_test_3 ] [ run test_real_concept.cpp /boost/test//boost_unit_test_framework ] [ run test_remez.cpp pch /boost/test//boost_unit_test_framework ] [ run test_roots.cpp pch /boost/test//boost_unit_test_framework ] @@ -1041,7 +1041,7 @@ test-suite misc : [ run octonion_test_simple.cpp ] [ run quaternion_constexpr_test.cpp ] [ run quaternion_test.cpp - /boost/test//boost_unit_test_framework : : : msvc-14.0:off float128_type ] + /boost/test//boost_unit_test_framework : : : msvc-14.0:off $(float128_type) ] [ run quaternion_mult_incl_test.cpp quaternion_mi1.cpp quaternion_mi2.cpp @@ -1051,31 +1051,31 @@ test-suite misc : ; test-suite interpolators : - [ run test_barycentric_rational.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_unified_initialization_syntax ] float128_type ] + [ run test_barycentric_rational.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_unified_initialization_syntax ] $(float128_type) ] [ run test_vector_barycentric_rational.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_unified_initialization_syntax ] [ check-target-builds ../../multiprecision/config//has_eigen : : no ] ] [ run cardinal_cubic_b_spline_test.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions ] off msvc:/bigobj release ] - [ run cardinal_b_spline_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] float128_type ] - [ run jacobi_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] float128_type ] - [ run gegenbauer_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] float128_type ] - [ run daubechies_scaling_test.cpp /boost/hana//boost_hana : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] - [ run daubechies_wavelet_test.cpp /boost/hana//boost_hana : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] - [ run fourier_transform_daubechies_test.cpp : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] - [ run wavelet_transform_test.cpp /boost/hana//boost_hana : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ run agm_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] - [ run rsqrt_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] - [ run cohen_acceleration_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run cardinal_b_spline_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] $(float128_type) ] + [ run jacobi_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] $(float128_type) ] + [ run gegenbauer_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] $(float128_type) ] + [ run daubechies_scaling_test.cpp /boost/hana//boost_hana : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] + [ run daubechies_wavelet_test.cpp /boost/hana//boost_hana : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] + [ run fourier_transform_daubechies_test.cpp : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] + [ run wavelet_transform_test.cpp /boost/hana//boost_hana : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run agm_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) ] + [ run rsqrt_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) ] + [ run cohen_acceleration_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) ] [ compile compile_test/filters_daubechies_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ compile compile_test/sf_daubechies_scaling_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run whittaker_shannon_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] ] [ run cardinal_quadratic_b_spline_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] ] - [ run cardinal_quintic_b_spline_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] float128_type ] - [ run makima_test.cpp /boost/circular_buffer//boost_circular_buffer : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] - [ run pchip_test.cpp /boost/circular_buffer//boost_circular_buffer : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] - [ run septic_hermite_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] - [ run quintic_hermite_test.cpp /boost/circular_buffer//boost_circular_buffer : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] - [ run cubic_hermite_test.cpp /boost/circular_buffer//boost_circular_buffer : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run cardinal_quintic_b_spline_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] $(float128_type) ] + [ run makima_test.cpp /boost/circular_buffer//boost_circular_buffer : : : [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) ] + [ run pchip_test.cpp /boost/circular_buffer//boost_circular_buffer : : : [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) ] + [ run septic_hermite_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) ] + [ run quintic_hermite_test.cpp /boost/circular_buffer//boost_circular_buffer : : : [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) ] + [ run cubic_hermite_test.cpp /boost/circular_buffer//boost_circular_buffer : : : [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) ] [ run bilinear_uniform_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ] - [ run bezier_polynomial_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type ] + [ run bezier_polynomial_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) ] [ run catmull_rom_test.cpp /boost/test//boost_unit_test_framework : : : TEST=1 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_1 ] [ run catmull_rom_test.cpp /boost/test//boost_unit_test_framework : : : TEST=2 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_2 ] [ run catmull_rom_test.cpp /boost/test//boost_unit_test_framework : : : TEST=3 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_3 ] @@ -1093,55 +1093,55 @@ test-suite interpolators : test-suite quadrature : [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : msvc:/bigobj TEST1 float128_type + : : : msvc:/bigobj TEST1 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] : tanh_sinh_quadrature_test_1 ] [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : msvc:/bigobj TEST1A float128_type + : : : msvc:/bigobj TEST1A $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] : tanh_sinh_quadrature_test_1a ] [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release msvc:/bigobj TEST1B float128_type + : : : release msvc:/bigobj TEST1B $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] : tanh_sinh_quadrature_test_1b ] [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : msvc:/bigobj TEST2 float128_type + : : : msvc:/bigobj TEST2 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] : tanh_sinh_quadrature_test_2 ] [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release msvc:/bigobj TEST2A float128_type + : : : release msvc:/bigobj TEST2A $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] : tanh_sinh_quadrature_test_2a ] [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : msvc:/bigobj TEST3 float128_type + : : : msvc:/bigobj TEST3 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_3 ] [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release msvc:/bigobj TEST3A float128_type + : : : release msvc:/bigobj TEST3A $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_3a ] [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release msvc:/bigobj TEST4 float128_type + : : : release msvc:/bigobj TEST4 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_4 ] [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release msvc:/bigobj TEST5 float128_type + : : : release msvc:/bigobj TEST5 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_5 ] [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : msvc:/bigobj TEST6 float128_type + : : : msvc:/bigobj TEST6 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_6 ] [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release msvc:/bigobj TEST6A float128_type + : : : release msvc:/bigobj TEST6A $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_6a ] [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release msvc:/bigobj TEST7 float128_type + : : : release msvc:/bigobj TEST7 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_7 ] [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release msvc:/bigobj TEST8 float128_type + : : : release msvc:/bigobj TEST8 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : tanh_sinh_quadrature_test_8 ] [ run tanh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework @@ -1151,59 +1151,59 @@ test-suite quadrature : [ run tanh_sinh_mpfr.cpp ../tools//mpfr ../tools//gmp : : : [ check-target-builds ../config//has_mpfr : : no ] [ check-target-builds ../config//has_gmp : : no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] release clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run sinh_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] ] + : : : release $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] ] [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : TEST1 float128_type [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] : exp_sinh_quadrature_test_1 ] + : : : TEST1 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] : exp_sinh_quadrature_test_1 ] [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release TEST2 float128_type + : : : release TEST2 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] : exp_sinh_quadrature_test_2 ] [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : TEST3 float128_type + : : : TEST3 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_3 ] [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release TEST4 float128_type + : : : release TEST4 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_4 ] [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release TEST5 float128_type + : : : release TEST5 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_5 ] [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release TEST6 float128_type + : : : release TEST6 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_6 ] [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release TEST7 float128_type + : : : release TEST7 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_7 ] [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release TEST8 float128_type + : : : release TEST8 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_8 ] [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release TEST9 float128_type + : : : release TEST9 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_9 ] [ run exp_sinh_quadrature_test.cpp /boost/test//boost_unit_test_framework - : : : release TEST10 float128_type + : : : release TEST10 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_10 ] - [ run gauss_quadrature_test.cpp : : : TEST1 float128_type + [ run gauss_quadrature_test.cpp : : : TEST1 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release : gauss_quadrature_test_1 ] - [ run gauss_quadrature_test.cpp : : : TEST2 float128_type + [ run gauss_quadrature_test.cpp : : : TEST2 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : gauss_quadrature_test_2 ] - [ run gauss_quadrature_test.cpp : : : TEST3 float128_type + [ run gauss_quadrature_test.cpp : : : TEST3 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : gauss_quadrature_test_3 ] - [ run gauss_kronrod_quadrature_test.cpp : : : TEST1 float128_type + [ run gauss_kronrod_quadrature_test.cpp : : : TEST1 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release : gauss_kronrod_quadrature_test_1 ] - [ run gauss_kronrod_quadrature_test.cpp : : : TEST1A float128_type + [ run gauss_kronrod_quadrature_test.cpp : : : TEST1A $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : gauss_kronrod_quadrature_test_1a ] - [ run gauss_kronrod_quadrature_test.cpp : : : TEST2 float128_type + [ run gauss_kronrod_quadrature_test.cpp : : : TEST2 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : gauss_kronrod_quadrature_test_2 ] - [ run gauss_kronrod_quadrature_test.cpp : : : TEST3 float128_type + [ run gauss_kronrod_quadrature_test.cpp : : : TEST3 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : gauss_kronrod_quadrature_test_3 ] - [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST1 float128_type + [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST1 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release : adaptive_gauss_quadrature_test_1 ] - [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST1A float128_type + [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST1A $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : adaptive_gauss_quadrature_test_1a ] - [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST2 float128_type + [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST2 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : adaptive_gauss_quadrature_test_2 ] - [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST3 float128_type + [ run adaptive_gauss_kronrod_quadrature_test.cpp : : : TEST3 $(float128_type) [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : adaptive_gauss_quadrature_test_3 ] [ run naive_monte_carlo_test.cpp : : : @@ -1306,28 +1306,28 @@ test-suite quadrature : [ compile compile_test/gauss_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ compile compile_test/gauss_kronrod_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run git_issue_898.cpp ] - [ run git_issue_1075.cpp : : : float128_type ] + [ run git_issue_1075.cpp : : : $(float128_type) ] [ run test_trapezoidal.cpp /boost/test//boost_unit_test_framework : : : release [ requires cxx11_lambdas cxx11_auto_declarations cxx11_decltype cxx11_unified_initialization_syntax cxx11_variadic_templates ] - float128_type ] + $(float128_type) ] ; test-suite autodiff : [ run test_numerical_differentiation.cpp /boost/test//boost_unit_test_framework : : : msvc:/bigobj [ requires cxx11_auto_declarations cxx11_constexpr ] ] [ run compile_test/diff_numerical_differentiation_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_constexpr ] ] [ compile compile_test/diff_numerical_differentiation_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_constexpr ] ] - [ run test_autodiff_1.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ run test_autodiff_2.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ run test_autodiff_3.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ run test_autodiff_4.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ run test_autodiff_5.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ run test_autodiff_6.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ run test_autodiff_7.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ run test_autodiff_8.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ check-target-builds ../config//is_ci_standalone_run "Standalone CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ compile compile_test/diff_autodiff_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ compile compile_test/diff_finite_difference_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] - [ compile compile_test/diff_lanczos_smoothing_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ requires cxx17_if_constexpr cxx17_std_apply ] float128_type [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_1.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release $(float128_type) [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_2.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release $(float128_type) [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_3.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release $(float128_type) [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_4.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release $(float128_type) [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_5.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release $(float128_type) [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_6.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release $(float128_type) [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_7.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release $(float128_type) [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ run test_autodiff_8.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release $(float128_type) [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ check-target-builds ../config//is_ci_standalone_run "Standalone CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ compile compile_test/diff_autodiff_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release $(float128_type) [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ compile compile_test/diff_finite_difference_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release $(float128_type) [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] + [ compile compile_test/diff_lanczos_smoothing_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ requires cxx17_if_constexpr cxx17_std_apply ] $(float128_type) [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] [ requires cxx11_inline_namespaces ] ] ; # @@ -1336,16 +1336,16 @@ test-suite autodiff : # too much time: # test-suite long-running-tests : - [ run test_0F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 release float128_type : test_0F1_3 ] + [ run test_0F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=3 release $(float128_type) : test_0F1_3 ] [ run test_0F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=4 release : test_0F1_4 ] [ run test_1F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=5 clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_real_concept ] - [ run test_1F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] clang:-Wno-literal-range : test_1F1_quad ] + [ run test_1F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release $(float128_type) [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] clang:-Wno-literal-range : test_1F1_quad ] [ run test_1F1.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=7 release clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_dec_40 ] - [ run test_1F1_regularized.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] clang:-Wno-literal-range : test_1F1_regularized_quad ] + [ run test_1F1_regularized.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release $(float128_type) [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] clang:-Wno-literal-range : test_1F1_regularized_quad ] [ run test_1F1_regularized.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=7 release clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_regularized_dec_40 ] - [ run test_1F1_log.cpp /boost/test//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release float128_type clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_log_quad ] + [ run test_1F1_log.cpp /boost/test//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release $(float128_type) clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_log_quad ] [ run test_1F1_log.cpp /boost/test//boost_unit_test_framework : : : release [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=7 release clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_1F1_log_dec_40 ] - [ run test_pFq.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release float128_type clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_pFq_quad ] + [ run test_pFq.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=6 release $(float128_type) clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_pFq_quad ] [ run test_pFq.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=7 release clang:-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : test_pFq_dec_40 ] [ run test_pFq_precision.cpp ../tools//mpfr ../tools//gmp /boost/test//boost_unit_test_framework /boost/system//boost_system /boost/chrono//boost_chrono : : : [ check-target-builds ../config//has_mpfr : : no ] [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] release clang:-Wno-literal-range ] [ run test_constant_generate.cpp : : : release USE_CPP_FLOAT=1 off:no ] @@ -1365,7 +1365,7 @@ rule get_float128_tests : # command line : # input files : # requirements - float128_type + $(float128_type) BOOST_ALL_NO_LIB : $(source:B)_floatmax_t ] ; } @@ -1518,7 +1518,7 @@ test-suite concepts : [ compile compile_test/std_real_concept_check.cpp : EMULATE128 [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : std_real_concept_check_128 ] [ run compile_test/cstdfloat_concept_check_1.cpp : : : [ check-target-builds ../config//has_intel_quad "Intel _Quad datatype support" : -Qoption,cpp,--extended_float_type ] - float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + $(float128_type) [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/cstdfloat_concept_check_2.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/cstdfloat_concept_check_3.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/cstdfloat_concept_check_4.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] @@ -1527,7 +1527,7 @@ test-suite concepts : [ compile compile_test/cstdfloat_iostream_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ compile compile_test/cstdfloat_limits_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ compile compile_test/cstdfloat_types_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ run test_cstdfloat.cpp /boost/test//boost_unit_test_framework : : : float128_type [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run test_cstdfloat.cpp /boost/test//boost_unit_test_framework : : : $(float128_type) [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/sf_airy_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/sf_hankel_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/sf_jacobi_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] From 46a1ba7bd215a285078afc0e39c5979cc0dea70c Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 27 Aug 2024 15:32:03 -0400 Subject: [PATCH 20/23] GPU Batch 7 Fix igamma_large support on device Add GPU support to toms748 Add GPU support to igamma_inv Add GPU markers to gamma_inva Add GPU Markers to lgamma_small Remove STL usage from gamma Remove NVRTC workaround Fix fraction use of STL headers Mark gamma functions in fwd Disable declval on all GPU platforms Disable more unneeded code on device Add forward decl for NVRTC tgamma Disable unneeded items for all GPU Change workaround for missing overloads Rearrange definition location Add include path to cuda now that workaround is removed Fix NVRTC incompatibility with recursion and forward decls Add tgamma_ratio CUDA and NVRTC testing Fix NVRTC handling of gamma_p_derivative Add gamma_p_derivative CUDA and NVRTC testing Remove recursion from gamma_incomplete_imp Add SYCL testing of igamma, igamma_inv, and igamma_inva Ignore literal-range warnings Remove use of static const char* for function name Fix missing CUDA header Remove calls under NVRTC to fwd decl Add more nvrtc workarounds Use builtin erfc instead of header cycle Add CUDA and NVRTC testing of gamma_p_inv Adjust tolerances Add GPU support to chi squared dist Fix static local variable Add chi squared dist SYCL testing Add chi squared dist CUDA testing Add chi squared dist NVRTC testing Add GPU support to weibull dist Add weibull dist SYCL testing Add weibull dist CUDA testing Add weibull dist NVRTC testing --- .../boost/math/distributions/chi_squared.hpp | 71 +-- include/boost/math/distributions/weibull.hpp | 89 +-- include/boost/math/special_functions/beta.hpp | 8 +- .../special_functions/detail/gamma_inva.hpp | 19 +- .../detail/igamma_inverse.hpp | 65 ++- .../special_functions/detail/igamma_large.hpp | 95 ++- .../special_functions/detail/lgamma_small.hpp | 15 +- .../boost/math/special_functions/gamma.hpp | 551 ++++++++++++------ .../boost/math/special_functions/log1p.hpp | 64 +- .../boost/math/special_functions/math_fwd.hpp | 24 +- include/boost/math/tools/config.hpp | 2 + include/boost/math/tools/fraction.hpp | 33 +- include/boost/math/tools/precision.hpp | 2 +- include/boost/math/tools/series.hpp | 1 + include/boost/math/tools/toms748_solve.hpp | 96 +-- include/boost/math/tools/tuple.hpp | 1 + test/cuda_jamfile | 20 + test/nvrtc_jamfile | 20 + test/sycl_jamfile | 16 + test/test_bessel_i.cpp | 8 + test/test_bessel_j.cpp | 8 + test/test_bessel_k.cpp | 8 + test/test_bessel_y.cpp | 8 + test/test_chi_squared.cpp | 6 +- test/test_chi_squared_cdf_double.cu | 109 ++++ test/test_chi_squared_cdf_float.cu | 109 ++++ test/test_chi_squared_cdf_nvrtc_double.cpp | 191 ++++++ test/test_chi_squared_cdf_nvrtc_float.cpp | 191 ++++++ test/test_chi_squared_pdf_double.cu | 109 ++++ test/test_chi_squared_pdf_float.cu | 109 ++++ test/test_chi_squared_pdf_nvrtc_double.cpp | 191 ++++++ test/test_chi_squared_pdf_nvrtc_float.cpp | 191 ++++++ test/test_chi_squared_quan_double.cu | 109 ++++ test/test_chi_squared_quan_float.cu | 109 ++++ test/test_chi_squared_quan_nvrtc_double.cpp | 191 ++++++ test/test_chi_squared_quan_nvrtc_float.cpp | 191 ++++++ test/test_gamma_nvrtc_double.cpp | 4 +- test/test_gamma_nvrtc_float.cpp | 2 +- test/test_gamma_p_derivative_double.cu | 104 ++++ test/test_gamma_p_derivative_float.cu | 104 ++++ test/test_gamma_p_derivative_nvrtc_double.cpp | 190 ++++++ test/test_gamma_p_derivative_nvrtc_float.cpp | 190 ++++++ test/test_gamma_p_inv_double.cu | 108 ++++ test/test_gamma_p_inv_float.cu | 107 ++++ test/test_gamma_p_inv_nvrtc_double.cpp | 190 ++++++ test/test_gamma_p_inv_nvrtc_float.cpp | 190 ++++++ test/test_holtsmark.cpp | 8 + test/test_igamma.cpp | 11 + test/test_igamma.hpp | 3 +- test/test_igamma_inv.cpp | 19 + test/test_igamma_inv.hpp | 3 +- test/test_igamma_inva.cpp | 11 + test/test_igamma_inva.hpp | 3 +- test/test_landau.cpp | 8 + test/test_log1p_nvrtc_double.cpp | 4 +- test/test_log1p_nvrtc_float.cpp | 12 +- test/test_round.cpp | 5 + test/test_tgamma_ratio_double.cu | 104 ++++ test/test_tgamma_ratio_float.cu | 104 ++++ test/test_tgamma_ratio_nvrtc_double.cpp | 190 ++++++ test/test_tgamma_ratio_nvrtc_float.cpp | 190 ++++++ test/test_weibull.cpp | 6 +- test/test_weibull_cdf_double.cu | 109 ++++ test/test_weibull_cdf_float.cu | 109 ++++ test/test_weibull_cdf_nvrtc_double.cpp | 191 ++++++ test/test_weibull_cdf_nvrtc_float.cpp | 191 ++++++ test/test_weibull_pdf_double.cu | 109 ++++ test/test_weibull_pdf_float.cu | 109 ++++ test/test_weibull_pdf_nvrtc_double.cpp | 191 ++++++ test/test_weibull_pdf_nvrtc_float.cpp | 191 ++++++ test/test_weibull_quan_double.cu | 109 ++++ test/test_weibull_quan_float.cu | 109 ++++ test/test_weibull_quan_nvrtc_double.cpp | 191 ++++++ test/test_weibull_quan_nvrtc_float.cpp | 191 ++++++ 74 files changed, 6233 insertions(+), 467 deletions(-) create mode 100644 test/test_chi_squared_cdf_double.cu create mode 100644 test/test_chi_squared_cdf_float.cu create mode 100644 test/test_chi_squared_cdf_nvrtc_double.cpp create mode 100644 test/test_chi_squared_cdf_nvrtc_float.cpp create mode 100644 test/test_chi_squared_pdf_double.cu create mode 100644 test/test_chi_squared_pdf_float.cu create mode 100644 test/test_chi_squared_pdf_nvrtc_double.cpp create mode 100644 test/test_chi_squared_pdf_nvrtc_float.cpp create mode 100644 test/test_chi_squared_quan_double.cu create mode 100644 test/test_chi_squared_quan_float.cu create mode 100644 test/test_chi_squared_quan_nvrtc_double.cpp create mode 100644 test/test_chi_squared_quan_nvrtc_float.cpp create mode 100644 test/test_gamma_p_derivative_double.cu create mode 100644 test/test_gamma_p_derivative_float.cu create mode 100644 test/test_gamma_p_derivative_nvrtc_double.cpp create mode 100644 test/test_gamma_p_derivative_nvrtc_float.cpp create mode 100644 test/test_gamma_p_inv_double.cu create mode 100644 test/test_gamma_p_inv_float.cu create mode 100644 test/test_gamma_p_inv_nvrtc_double.cpp create mode 100644 test/test_gamma_p_inv_nvrtc_float.cpp create mode 100644 test/test_tgamma_ratio_double.cu create mode 100644 test/test_tgamma_ratio_float.cu create mode 100644 test/test_tgamma_ratio_nvrtc_double.cpp create mode 100644 test/test_tgamma_ratio_nvrtc_float.cpp create mode 100644 test/test_weibull_cdf_double.cu create mode 100644 test/test_weibull_cdf_float.cu create mode 100644 test/test_weibull_cdf_nvrtc_double.cpp create mode 100644 test/test_weibull_cdf_nvrtc_float.cpp create mode 100644 test/test_weibull_pdf_double.cu create mode 100644 test/test_weibull_pdf_float.cu create mode 100644 test/test_weibull_pdf_nvrtc_double.cpp create mode 100644 test/test_weibull_pdf_nvrtc_float.cpp create mode 100644 test/test_weibull_quan_double.cu create mode 100644 test/test_weibull_quan_float.cu create mode 100644 test/test_weibull_quan_nvrtc_double.cpp create mode 100644 test/test_weibull_quan_nvrtc_float.cpp diff --git a/include/boost/math/distributions/chi_squared.hpp b/include/boost/math/distributions/chi_squared.hpp index f5daddc0ad..3944569e89 100644 --- a/include/boost/math/distributions/chi_squared.hpp +++ b/include/boost/math/distributions/chi_squared.hpp @@ -9,14 +9,17 @@ #ifndef BOOST_MATH_DISTRIBUTIONS_CHI_SQUARED_HPP #define BOOST_MATH_DISTRIBUTIONS_CHI_SQUARED_HPP +#include +#include +#include +#include +#include #include #include // for incomplete beta. #include // complements #include // error checks #include -#include - namespace boost{ namespace math{ template > @@ -26,20 +29,20 @@ class chi_squared_distribution using value_type = RealType; using policy_type = Policy; - explicit chi_squared_distribution(RealType i) : m_df(i) + BOOST_MATH_GPU_ENABLED explicit chi_squared_distribution(RealType i) : m_df(i) { RealType result; detail::check_df( "boost::math::chi_squared_distribution<%1%>::chi_squared_distribution", m_df, &result, Policy()); } // chi_squared_distribution - RealType degrees_of_freedom()const + BOOST_MATH_GPU_ENABLED RealType degrees_of_freedom()const { return m_df; } // Parameter estimation: - static RealType find_degrees_of_freedom( + BOOST_MATH_GPU_ENABLED static RealType find_degrees_of_freedom( RealType difference_from_variance, RealType alpha, RealType beta, @@ -66,16 +69,16 @@ chi_squared_distribution(RealType)->chi_squared_distribution -inline std::pair range(const chi_squared_distribution& /*dist*/) +BOOST_MATH_GPU_ENABLED inline boost::math::pair range(const chi_squared_distribution& /*dist*/) { // Range of permissible values for random variable x. - if (std::numeric_limits::has_infinity) + BOOST_MATH_IF_CONSTEXPR (boost::math::numeric_limits::has_infinity) { - return std::pair(static_cast(0), std::numeric_limits::infinity()); // 0 to + infinity. + return boost::math::pair(static_cast(0), boost::math::numeric_limits::infinity()); // 0 to + infinity. } else { using boost::math::tools::max_value; - return std::pair(static_cast(0), max_value()); // 0 to + max. + return boost::math::pair(static_cast(0), max_value()); // 0 to + max. } } @@ -84,21 +87,21 @@ inline std::pair range(const chi_squared_distribution -inline std::pair support(const chi_squared_distribution& /*dist*/) +BOOST_MATH_GPU_ENABLED inline boost::math::pair support(const chi_squared_distribution& /*dist*/) { // Range of supported values for random variable x. // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero. - return std::pair(static_cast(0), tools::max_value()); // 0 to + infinity. + return boost::math::pair(static_cast(0), tools::max_value()); // 0 to + infinity. } template -RealType pdf(const chi_squared_distribution& dist, const RealType& chi_square) +BOOST_MATH_GPU_ENABLED RealType pdf(const chi_squared_distribution& dist, const RealType& chi_square) { BOOST_MATH_STD_USING // for ADL of std functions RealType degrees_of_freedom = dist.degrees_of_freedom(); // Error check: RealType error_result; - static const char* function = "boost::math::pdf(const chi_squared_distribution<%1%>&, %1%)"; + constexpr auto function = "boost::math::pdf(const chi_squared_distribution<%1%>&, %1%)"; if(false == detail::check_df( function, degrees_of_freedom, &error_result, Policy())) @@ -132,12 +135,12 @@ RealType pdf(const chi_squared_distribution& dist, const RealT } // pdf template -inline RealType cdf(const chi_squared_distribution& dist, const RealType& chi_square) +BOOST_MATH_GPU_ENABLED inline RealType cdf(const chi_squared_distribution& dist, const RealType& chi_square) { RealType degrees_of_freedom = dist.degrees_of_freedom(); // Error check: RealType error_result; - static const char* function = "boost::math::cdf(const chi_squared_distribution<%1%>&, %1%)"; + constexpr auto function = "boost::math::cdf(const chi_squared_distribution<%1%>&, %1%)"; if(false == detail::check_df( function, degrees_of_freedom, &error_result, Policy())) @@ -153,10 +156,10 @@ inline RealType cdf(const chi_squared_distribution& dist, cons } // cdf template -inline RealType quantile(const chi_squared_distribution& dist, const RealType& p) +BOOST_MATH_GPU_ENABLED inline RealType quantile(const chi_squared_distribution& dist, const RealType& p) { RealType degrees_of_freedom = dist.degrees_of_freedom(); - static const char* function = "boost::math::quantile(const chi_squared_distribution<%1%>&, %1%)"; + constexpr auto function = "boost::math::quantile(const chi_squared_distribution<%1%>&, %1%)"; // Error check: RealType error_result; if(false == @@ -170,11 +173,11 @@ inline RealType quantile(const chi_squared_distribution& dist, } // quantile template -inline RealType cdf(const complemented2_type, RealType>& c) +BOOST_MATH_GPU_ENABLED inline RealType cdf(const complemented2_type, RealType>& c) { RealType const& degrees_of_freedom = c.dist.degrees_of_freedom(); RealType const& chi_square = c.param; - static const char* function = "boost::math::cdf(const chi_squared_distribution<%1%>&, %1%)"; + constexpr auto function = "boost::math::cdf(const chi_squared_distribution<%1%>&, %1%)"; // Error check: RealType error_result; if(false == detail::check_df( @@ -191,11 +194,11 @@ inline RealType cdf(const complemented2_type -inline RealType quantile(const complemented2_type, RealType>& c) +BOOST_MATH_GPU_ENABLED inline RealType quantile(const complemented2_type, RealType>& c) { RealType const& degrees_of_freedom = c.dist.degrees_of_freedom(); RealType const& q = c.param; - static const char* function = "boost::math::quantile(const chi_squared_distribution<%1%>&, %1%)"; + constexpr auto function = "boost::math::quantile(const chi_squared_distribution<%1%>&, %1%)"; // Error check: RealType error_result; if(false == ( @@ -208,22 +211,22 @@ inline RealType quantile(const complemented2_type -inline RealType mean(const chi_squared_distribution& dist) +BOOST_MATH_GPU_ENABLED inline RealType mean(const chi_squared_distribution& dist) { // Mean of Chi-Squared distribution = v. return dist.degrees_of_freedom(); } // mean template -inline RealType variance(const chi_squared_distribution& dist) +BOOST_MATH_GPU_ENABLED inline RealType variance(const chi_squared_distribution& dist) { // Variance of Chi-Squared distribution = 2v. return 2 * dist.degrees_of_freedom(); } // variance template -inline RealType mode(const chi_squared_distribution& dist) +BOOST_MATH_GPU_ENABLED inline RealType mode(const chi_squared_distribution& dist) { RealType df = dist.degrees_of_freedom(); - static const char* function = "boost::math::mode(const chi_squared_distribution<%1%>&)"; + constexpr auto function = "boost::math::mode(const chi_squared_distribution<%1%>&)"; if(df < 2) return policies::raise_domain_error( @@ -234,7 +237,7 @@ inline RealType mode(const chi_squared_distribution& dist) } template -inline RealType skewness(const chi_squared_distribution& dist) +BOOST_MATH_GPU_ENABLED inline RealType skewness(const chi_squared_distribution& dist) { BOOST_MATH_STD_USING // For ADL RealType df = dist.degrees_of_freedom(); @@ -242,14 +245,14 @@ inline RealType skewness(const chi_squared_distribution& dist) } template -inline RealType kurtosis(const chi_squared_distribution& dist) +BOOST_MATH_GPU_ENABLED inline RealType kurtosis(const chi_squared_distribution& dist) { RealType df = dist.degrees_of_freedom(); return 3 + 12 / df; } template -inline RealType kurtosis_excess(const chi_squared_distribution& dist) +BOOST_MATH_GPU_ENABLED inline RealType kurtosis_excess(const chi_squared_distribution& dist) { RealType df = dist.degrees_of_freedom(); return 12 / df; @@ -264,12 +267,12 @@ namespace detail template struct df_estimator { - df_estimator(RealType a, RealType b, RealType variance, RealType delta) + BOOST_MATH_GPU_ENABLED df_estimator(RealType a, RealType b, RealType variance, RealType delta) : alpha(a), beta(b), ratio(delta/variance) { // Constructor } - RealType operator()(const RealType& df) + BOOST_MATH_GPU_ENABLED RealType operator()(const RealType& df) { if(df <= tools::min_value()) return 1; @@ -297,14 +300,14 @@ struct df_estimator } // namespace detail template -RealType chi_squared_distribution::find_degrees_of_freedom( +BOOST_MATH_GPU_ENABLED RealType chi_squared_distribution::find_degrees_of_freedom( RealType difference_from_variance, RealType alpha, RealType beta, RealType variance, RealType hint) { - static const char* function = "boost::math::chi_squared_distribution<%1%>::find_degrees_of_freedom(%1%,%1%,%1%,%1%,%1%)"; + constexpr auto function = "boost::math::chi_squared_distribution<%1%>::find_degrees_of_freedom(%1%,%1%,%1%,%1%,%1%)"; // Check for domain errors: RealType error_result; if(false == @@ -321,8 +324,8 @@ RealType chi_squared_distribution::find_degrees_of_freedom( detail::df_estimator f(alpha, beta, variance, difference_from_variance); tools::eps_tolerance tol(policies::digits()); - std::uintmax_t max_iter = policies::get_max_root_iterations(); - std::pair r = + boost::math::uintmax_t max_iter = policies::get_max_root_iterations(); + boost::math::pair r = tools::bracket_and_solve_root(f, hint, RealType(2), false, tol, max_iter, Policy()); RealType result = r.first + (r.second - r.first) / 2; if(max_iter >= policies::get_max_root_iterations()) diff --git a/include/boost/math/distributions/weibull.hpp b/include/boost/math/distributions/weibull.hpp index ca4bbd7b53..eb4de106c8 100644 --- a/include/boost/math/distributions/weibull.hpp +++ b/include/boost/math/distributions/weibull.hpp @@ -1,4 +1,5 @@ // Copyright John Maddock 2006. +// Copyright Matt Borland 2024. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -9,6 +10,10 @@ // http://www.itl.nist.gov/div898/handbook/eda/section3/eda3668.htm // http://mathworld.wolfram.com/WeibullDistribution.html +#include +#include +#include +#include #include #include #include @@ -16,14 +21,12 @@ #include #include -#include - namespace boost{ namespace math { namespace detail{ template -inline bool check_weibull_shape( +BOOST_MATH_GPU_ENABLED inline bool check_weibull_shape( const char* function, RealType shape, RealType* result, const Policy& pol) @@ -39,7 +42,7 @@ inline bool check_weibull_shape( } template -inline bool check_weibull_x( +BOOST_MATH_GPU_ENABLED inline bool check_weibull_x( const char* function, RealType const& x, RealType* result, const Policy& pol) @@ -55,7 +58,7 @@ inline bool check_weibull_x( } template -inline bool check_weibull( +BOOST_MATH_GPU_ENABLED inline bool check_weibull( const char* function, RealType scale, RealType shape, @@ -73,19 +76,19 @@ class weibull_distribution using value_type = RealType; using policy_type = Policy; - explicit weibull_distribution(RealType l_shape, RealType l_scale = 1) + BOOST_MATH_GPU_ENABLED explicit weibull_distribution(RealType l_shape, RealType l_scale = 1) : m_shape(l_shape), m_scale(l_scale) { RealType result; detail::check_weibull("boost::math::weibull_distribution<%1%>::weibull_distribution", l_scale, l_shape, &result, Policy()); } - RealType shape()const + BOOST_MATH_GPU_ENABLED RealType shape()const { return m_shape; } - RealType scale()const + BOOST_MATH_GPU_ENABLED RealType scale()const { return m_scale; } @@ -107,28 +110,28 @@ weibull_distribution(RealType,RealType)->weibull_distribution -inline std::pair range(const weibull_distribution& /*dist*/) +BOOST_MATH_GPU_ENABLED inline boost::math::pair range(const weibull_distribution& /*dist*/) { // Range of permissible values for random variable x. using boost::math::tools::max_value; - return std::pair(static_cast(0), max_value()); + return boost::math::pair(static_cast(0), max_value()); } template -inline std::pair support(const weibull_distribution& /*dist*/) +BOOST_MATH_GPU_ENABLED inline boost::math::pair support(const weibull_distribution& /*dist*/) { // Range of supported values for random variable x. // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero. using boost::math::tools::max_value; using boost::math::tools::min_value; - return std::pair(min_value(), max_value()); + return boost::math::pair(min_value(), max_value()); // A discontinuity at x == 0, so only support down to min_value. } template -inline RealType pdf(const weibull_distribution& dist, const RealType& x) +BOOST_MATH_GPU_ENABLED inline RealType pdf(const weibull_distribution& dist, const RealType& x) { BOOST_MATH_STD_USING // for ADL of std functions - static const char* function = "boost::math::pdf(const weibull_distribution<%1%>, %1%)"; + constexpr auto function = "boost::math::pdf(const weibull_distribution<%1%>, %1%)"; RealType shape = dist.shape(); RealType scale = dist.scale(); @@ -158,11 +161,11 @@ inline RealType pdf(const weibull_distribution& dist, const Re } template -inline RealType logpdf(const weibull_distribution& dist, const RealType& x) +BOOST_MATH_GPU_ENABLED inline RealType logpdf(const weibull_distribution& dist, const RealType& x) { BOOST_MATH_STD_USING // for ADL of std functions - static const char* function = "boost::math::logpdf(const weibull_distribution<%1%>, %1%)"; + constexpr auto function = "boost::math::logpdf(const weibull_distribution<%1%>, %1%)"; RealType shape = dist.shape(); RealType scale = dist.scale(); @@ -192,11 +195,11 @@ inline RealType logpdf(const weibull_distribution& dist, const } template -inline RealType cdf(const weibull_distribution& dist, const RealType& x) +BOOST_MATH_GPU_ENABLED inline RealType cdf(const weibull_distribution& dist, const RealType& x) { BOOST_MATH_STD_USING // for ADL of std functions - static const char* function = "boost::math::cdf(const weibull_distribution<%1%>, %1%)"; + constexpr auto function = "boost::math::cdf(const weibull_distribution<%1%>, %1%)"; RealType shape = dist.shape(); RealType scale = dist.scale(); @@ -213,11 +216,11 @@ inline RealType cdf(const weibull_distribution& dist, const Re } template -inline RealType logcdf(const weibull_distribution& dist, const RealType& x) +BOOST_MATH_GPU_ENABLED inline RealType logcdf(const weibull_distribution& dist, const RealType& x) { BOOST_MATH_STD_USING // for ADL of std functions - static const char* function = "boost::math::logcdf(const weibull_distribution<%1%>, %1%)"; + constexpr auto function = "boost::math::logcdf(const weibull_distribution<%1%>, %1%)"; RealType shape = dist.shape(); RealType scale = dist.scale(); @@ -234,11 +237,11 @@ inline RealType logcdf(const weibull_distribution& dist, const } template -inline RealType quantile(const weibull_distribution& dist, const RealType& p) +BOOST_MATH_GPU_ENABLED inline RealType quantile(const weibull_distribution& dist, const RealType& p) { BOOST_MATH_STD_USING // for ADL of std functions - static const char* function = "boost::math::quantile(const weibull_distribution<%1%>, %1%)"; + constexpr auto function = "boost::math::quantile(const weibull_distribution<%1%>, %1%)"; RealType shape = dist.shape(); RealType scale = dist.scale(); @@ -258,11 +261,11 @@ inline RealType quantile(const weibull_distribution& dist, con } template -inline RealType cdf(const complemented2_type, RealType>& c) +BOOST_MATH_GPU_ENABLED inline RealType cdf(const complemented2_type, RealType>& c) { BOOST_MATH_STD_USING // for ADL of std functions - static const char* function = "boost::math::cdf(const weibull_distribution<%1%>, %1%)"; + constexpr auto function = "boost::math::cdf(const weibull_distribution<%1%>, %1%)"; RealType shape = c.dist.shape(); RealType scale = c.dist.scale(); @@ -279,11 +282,11 @@ inline RealType cdf(const complemented2_type -inline RealType logcdf(const complemented2_type, RealType>& c) +BOOST_MATH_GPU_ENABLED inline RealType logcdf(const complemented2_type, RealType>& c) { BOOST_MATH_STD_USING // for ADL of std functions - static const char* function = "boost::math::logcdf(const weibull_distribution<%1%>, %1%)"; + constexpr auto function = "boost::math::logcdf(const weibull_distribution<%1%>, %1%)"; RealType shape = c.dist.shape(); RealType scale = c.dist.scale(); @@ -300,11 +303,11 @@ inline RealType logcdf(const complemented2_type -inline RealType quantile(const complemented2_type, RealType>& c) +BOOST_MATH_GPU_ENABLED inline RealType quantile(const complemented2_type, RealType>& c) { BOOST_MATH_STD_USING // for ADL of std functions - static const char* function = "boost::math::quantile(const weibull_distribution<%1%>, %1%)"; + constexpr auto function = "boost::math::quantile(const weibull_distribution<%1%>, %1%)"; RealType shape = c.dist.shape(); RealType scale = c.dist.scale(); @@ -325,11 +328,11 @@ inline RealType quantile(const complemented2_type -inline RealType mean(const weibull_distribution& dist) +BOOST_MATH_GPU_ENABLED inline RealType mean(const weibull_distribution& dist) { BOOST_MATH_STD_USING // for ADL of std functions - static const char* function = "boost::math::mean(const weibull_distribution<%1%>)"; + constexpr auto function = "boost::math::mean(const weibull_distribution<%1%>)"; RealType shape = dist.shape(); RealType scale = dist.scale(); @@ -343,12 +346,12 @@ inline RealType mean(const weibull_distribution& dist) } template -inline RealType variance(const weibull_distribution& dist) +BOOST_MATH_GPU_ENABLED inline RealType variance(const weibull_distribution& dist) { RealType shape = dist.shape(); RealType scale = dist.scale(); - static const char* function = "boost::math::variance(const weibull_distribution<%1%>)"; + constexpr auto function = "boost::math::variance(const weibull_distribution<%1%>)"; RealType result = 0; if(false == detail::check_weibull(function, scale, shape, &result, Policy())) @@ -363,11 +366,11 @@ inline RealType variance(const weibull_distribution& dist) } template -inline RealType mode(const weibull_distribution& dist) +BOOST_MATH_GPU_ENABLED inline RealType mode(const weibull_distribution& dist) { BOOST_MATH_STD_USING // for ADL of std function pow. - static const char* function = "boost::math::mode(const weibull_distribution<%1%>)"; + constexpr auto function = "boost::math::mode(const weibull_distribution<%1%>)"; RealType shape = dist.shape(); RealType scale = dist.scale(); @@ -384,11 +387,11 @@ inline RealType mode(const weibull_distribution& dist) } template -inline RealType median(const weibull_distribution& dist) +BOOST_MATH_GPU_ENABLED inline RealType median(const weibull_distribution& dist) { BOOST_MATH_STD_USING // for ADL of std function pow. - static const char* function = "boost::math::median(const weibull_distribution<%1%>)"; + constexpr auto function = "boost::math::median(const weibull_distribution<%1%>)"; RealType shape = dist.shape(); // Wikipedia k RealType scale = dist.scale(); // Wikipedia lambda @@ -404,11 +407,11 @@ inline RealType median(const weibull_distribution& dist) } template -inline RealType skewness(const weibull_distribution& dist) +BOOST_MATH_GPU_ENABLED inline RealType skewness(const weibull_distribution& dist) { BOOST_MATH_STD_USING // for ADL of std functions - static const char* function = "boost::math::skewness(const weibull_distribution<%1%>)"; + constexpr auto function = "boost::math::skewness(const weibull_distribution<%1%>)"; RealType shape = dist.shape(); RealType scale = dist.scale(); @@ -429,11 +432,11 @@ inline RealType skewness(const weibull_distribution& dist) } template -inline RealType kurtosis_excess(const weibull_distribution& dist) +BOOST_MATH_GPU_ENABLED inline RealType kurtosis_excess(const weibull_distribution& dist) { BOOST_MATH_STD_USING // for ADL of std functions - static const char* function = "boost::math::kurtosis_excess(const weibull_distribution<%1%>)"; + constexpr auto function = "boost::math::kurtosis_excess(const weibull_distribution<%1%>)"; RealType shape = dist.shape(); RealType scale = dist.scale(); @@ -457,15 +460,15 @@ inline RealType kurtosis_excess(const weibull_distribution& di } template -inline RealType kurtosis(const weibull_distribution& dist) +BOOST_MATH_GPU_ENABLED inline RealType kurtosis(const weibull_distribution& dist) { return kurtosis_excess(dist) + 3; } template -inline RealType entropy(const weibull_distribution& dist) +BOOST_MATH_GPU_ENABLED inline RealType entropy(const weibull_distribution& dist) { - using std::log; + BOOST_MATH_STD_USING RealType k = dist.shape(); RealType lambda = dist.scale(); return constants::euler()*(1-1/k) + log(lambda/k) + 1; diff --git a/include/boost/math/special_functions/beta.hpp b/include/boost/math/special_functions/beta.hpp index f0ac6318b5..00b8e45bf2 100644 --- a/include/boost/math/special_functions/beta.hpp +++ b/include/boost/math/special_functions/beta.hpp @@ -136,7 +136,7 @@ BOOST_MATH_GPU_ENABLED T beta_imp(T a, T b, const Lanczos&, const Policy& pol) // Generic implementation of Beta(a,b) without Lanczos approximation support // (Caution this is slow!!!): // -#ifndef BOOST_MATH_HAS_NVRTC +#ifndef BOOST_MATH_HAS_GPU_SUPPORT template BOOST_MATH_GPU_ENABLED T beta_imp(T a, T b, const lanczos::undefined_lanczos& l, const Policy& pol) { @@ -461,7 +461,7 @@ BOOST_MATH_GPU_ENABLED T ibeta_power_terms(T a, // // This version is generic, slow, and does not use the Lanczos approximation. // -#ifndef BOOST_MATH_HAS_NVRTC +#ifndef BOOST_MATH_HAS_GPU_SUPPORT template BOOST_MATH_GPU_ENABLED T ibeta_power_terms(T a, T b, @@ -741,7 +741,7 @@ BOOST_MATH_GPU_ENABLED T ibeta_series(T a, T b, T x, T s0, const Lanczos&, bool // // Incomplete Beta series again, this time without Lanczos support: // -#ifndef BOOST_MATH_HAS_NVRTC +#ifndef BOOST_MATH_HAS_GPU_SUPPORT template BOOST_MATH_GPU_ENABLED T ibeta_series(T a, T b, T x, T s0, const boost::math::lanczos::undefined_lanczos& l, bool normalised, T* p_derivative, T y, const Policy& pol) { @@ -958,7 +958,7 @@ struct Pn_size #endif }; -#ifndef BOOST_MATH_HAS_NVRTC +#ifndef BOOST_MATH_HAS_GPU_SUPPORT template BOOST_MATH_GPU_ENABLED T beta_small_b_large_a_series(T a, T b, T x, T y, T s0, T mult, const Policy& pol, bool normalised) { diff --git a/include/boost/math/special_functions/detail/gamma_inva.hpp b/include/boost/math/special_functions/detail/gamma_inva.hpp index 75ac89e433..61c64a6486 100644 --- a/include/boost/math/special_functions/detail/gamma_inva.hpp +++ b/include/boost/math/special_functions/detail/gamma_inva.hpp @@ -1,4 +1,5 @@ // (C) Copyright John Maddock 2006. +// (C) Copyright Matt Borland 2024. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -17,7 +18,7 @@ #pragma once #endif -#include +#include #include namespace boost{ namespace math{ namespace detail{ @@ -25,8 +26,8 @@ namespace boost{ namespace math{ namespace detail{ template struct gamma_inva_t { - gamma_inva_t(T z_, T p_, bool invert_) : z(z_), p(p_), invert(invert_) {} - T operator()(T a) + BOOST_MATH_GPU_ENABLED gamma_inva_t(T z_, T p_, bool invert_) : z(z_), p(p_), invert(invert_) {} + BOOST_MATH_GPU_ENABLED T operator()(T a) { return invert ? p - boost::math::gamma_q(a, z, Policy()) : boost::math::gamma_p(a, z, Policy()) - p; } @@ -36,7 +37,7 @@ struct gamma_inva_t }; template -T inverse_poisson_cornish_fisher(T lambda, T p, T q, const Policy& pol) +BOOST_MATH_GPU_ENABLED T inverse_poisson_cornish_fisher(T lambda, T p, T q, const Policy& pol) { BOOST_MATH_STD_USING // mean: @@ -67,7 +68,7 @@ T inverse_poisson_cornish_fisher(T lambda, T p, T q, const Policy& pol) } template -T gamma_inva_imp(const T& z, const T& p, const T& q, const Policy& pol) +BOOST_MATH_GPU_ENABLED T gamma_inva_imp(const T& z, const T& p, const T& q, const Policy& pol) { BOOST_MATH_STD_USING // for ADL of std lib math functions // @@ -151,7 +152,7 @@ T gamma_inva_imp(const T& z, const T& p, const T& q, const Policy& pol) } // namespace detail template -inline typename tools::promote_args::type +BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type gamma_p_inva(T1 x, T2 p, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -181,7 +182,7 @@ inline typename tools::promote_args::type } template -inline typename tools::promote_args::type +BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type gamma_q_inva(T1 x, T2 q, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -211,14 +212,14 @@ inline typename tools::promote_args::type } template -inline typename tools::promote_args::type +BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type gamma_p_inva(T1 x, T2 p) { return boost::math::gamma_p_inva(x, p, policies::policy<>()); } template -inline typename tools::promote_args::type +BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type gamma_q_inva(T1 x, T2 q) { return boost::math::gamma_q_inva(x, q, policies::policy<>()); diff --git a/include/boost/math/special_functions/detail/igamma_inverse.hpp b/include/boost/math/special_functions/detail/igamma_inverse.hpp index f6bbcd72d5..4efd4f78a3 100644 --- a/include/boost/math/special_functions/detail/igamma_inverse.hpp +++ b/include/boost/math/special_functions/detail/igamma_inverse.hpp @@ -1,4 +1,5 @@ // (C) Copyright John Maddock 2006. +// (C) Copyright Matt Borland 2024. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -10,6 +11,8 @@ #pragma once #endif +#include +#include #include #include #include @@ -21,7 +24,7 @@ namespace boost{ namespace math{ namespace detail{ template -T find_inverse_s(T p, T q) +BOOST_MATH_GPU_ENABLED T find_inverse_s(T p, T q) { // // Computation of the Incomplete Gamma Function Ratios and their Inverse @@ -41,8 +44,8 @@ T find_inverse_s(T p, T q) { t = sqrt(-2 * log(q)); } - static const double a[4] = { 3.31125922108741, 11.6616720288968, 4.28342155967104, 0.213623493715853 }; - static const double b[5] = { 1, 6.61053765625462, 6.40691597760039, 1.27364489782223, 0.3611708101884203e-1 }; + BOOST_MATH_STATIC const double a[4] = { 3.31125922108741, 11.6616720288968, 4.28342155967104, 0.213623493715853 }; + BOOST_MATH_STATIC const double b[5] = { 1, 6.61053765625462, 6.40691597760039, 1.27364489782223, 0.3611708101884203e-1 }; T s = t - tools::evaluate_polynomial(a, t) / tools::evaluate_polynomial(b, t); if(p < T(0.5)) s = -s; @@ -50,7 +53,7 @@ T find_inverse_s(T p, T q) } template -T didonato_SN(T a, T x, unsigned N, T tolerance = 0) +BOOST_MATH_GPU_ENABLED T didonato_SN(T a, T x, unsigned N, T tolerance = 0) { // // Computation of the Incomplete Gamma Function Ratios and their Inverse @@ -77,7 +80,7 @@ T didonato_SN(T a, T x, unsigned N, T tolerance = 0) } template -inline T didonato_FN(T p, T a, T x, unsigned N, T tolerance, const Policy& pol) +BOOST_MATH_GPU_ENABLED inline T didonato_FN(T p, T a, T x, unsigned N, T tolerance, const Policy& pol) { // // Computation of the Incomplete Gamma Function Ratios and their Inverse @@ -93,7 +96,7 @@ inline T didonato_FN(T p, T a, T x, unsigned N, T tolerance, const Policy& pol) } template -T find_inverse_gamma(T a, T p, T q, const Policy& pol, bool* p_has_10_digits) +BOOST_MATH_GPU_ENABLED T find_inverse_gamma(T a, T p, T q, const Policy& pol, bool* p_has_10_digits) { // // In order to understand what's going on here, you will @@ -233,7 +236,7 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol, bool* p_has_10_digits) } else { - T D = (std::max)(T(2), T(a * (a - 1))); + T D = BOOST_MATH_GPU_SAFE_MAX(T(2), T(a * (a - 1))); T lg = boost::math::lgamma(a, pol); T lb = log(q) + lg; if(lb < -D * T(2.3)) @@ -315,7 +318,7 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol, bool* p_has_10_digits) template struct gamma_p_inverse_func { - gamma_p_inverse_func(T a_, T p_, bool inv) : a(a_), p(p_), invert(inv) + BOOST_MATH_GPU_ENABLED gamma_p_inverse_func(T a_, T p_, bool inv) : a(a_), p(p_), invert(inv) { // // If p is too near 1 then P(x) - p suffers from cancellation @@ -333,7 +336,7 @@ struct gamma_p_inverse_func } } - boost::math::tuple operator()(const T& x)const + BOOST_MATH_GPU_ENABLED boost::math::tuple operator()(const T& x)const { BOOST_FPU_EXCEPTION_GUARD // @@ -395,11 +398,11 @@ struct gamma_p_inverse_func }; template -T gamma_p_inv_imp(T a, T p, const Policy& pol) +BOOST_MATH_GPU_ENABLED T gamma_p_inv_imp(T a, T p, const Policy& pol) { BOOST_MATH_STD_USING // ADL of std functions. - static const char* function = "boost::math::gamma_p_inv<%1%>(%1%, %1%)"; + constexpr auto function = "boost::math::gamma_p_inv<%1%>(%1%, %1%)"; BOOST_MATH_INSTRUMENT_VARIABLE(a); BOOST_MATH_INSTRUMENT_VARIABLE(p); @@ -442,7 +445,9 @@ T gamma_p_inv_imp(T a, T p, const Policy& pol) // // Go ahead and iterate: // - std::uintmax_t max_iter = policies::get_max_root_iterations(); + boost::math::uintmax_t max_iter = policies::get_max_root_iterations(); + + #ifndef BOOST_MATH_HAS_GPU_SUPPORT guess = tools::halley_iterate( detail::gamma_p_inverse_func(a, p, false), guess, @@ -450,6 +455,16 @@ T gamma_p_inv_imp(T a, T p, const Policy& pol) tools::max_value(), digits, max_iter); + #else + guess = tools::newton_raphson_iterate( + detail::gamma_p_inverse_func(a, p, false), + guess, + lower, + tools::max_value(), + digits, + max_iter); + #endif + policies::check_root_iterations(function, max_iter, pol); BOOST_MATH_INSTRUMENT_VARIABLE(guess); if(guess == lower) @@ -458,11 +473,11 @@ T gamma_p_inv_imp(T a, T p, const Policy& pol) } template -T gamma_q_inv_imp(T a, T q, const Policy& pol) +BOOST_MATH_GPU_ENABLED T gamma_q_inv_imp(T a, T q, const Policy& pol) { BOOST_MATH_STD_USING // ADL of std functions. - static const char* function = "boost::math::gamma_q_inv<%1%>(%1%, %1%)"; + constexpr auto function = "boost::math::gamma_q_inv<%1%>(%1%, %1%)"; if(a <= 0) return policies::raise_domain_error(function, "Argument a in the incomplete gamma function inverse must be >= 0 (got a=%1%).", a, pol); @@ -501,7 +516,9 @@ T gamma_q_inv_imp(T a, T q, const Policy& pol) // // Go ahead and iterate: // - std::uintmax_t max_iter = policies::get_max_root_iterations(); + boost::math::uintmax_t max_iter = policies::get_max_root_iterations(); + + #ifndef BOOST_MATH_HAS_GPU_SUPPORT guess = tools::halley_iterate( detail::gamma_p_inverse_func(a, q, true), guess, @@ -509,6 +526,16 @@ T gamma_q_inv_imp(T a, T q, const Policy& pol) tools::max_value(), digits, max_iter); + #else + guess = tools::newton_raphson_iterate( + detail::gamma_p_inverse_func(a, q, true), + guess, + lower, + tools::max_value(), + digits, + max_iter); + #endif + policies::check_root_iterations(function, max_iter, pol); if(guess == lower) guess = policies::raise_underflow_error(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol); @@ -518,7 +545,7 @@ T gamma_q_inv_imp(T a, T q, const Policy& pol) } // namespace detail template -inline typename tools::promote_args::type +BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type gamma_p_inv(T1 a, T2 p, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -528,7 +555,7 @@ inline typename tools::promote_args::type } template -inline typename tools::promote_args::type +BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type gamma_q_inv(T1 a, T2 p, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -538,14 +565,14 @@ inline typename tools::promote_args::type } template -inline typename tools::promote_args::type +BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type gamma_p_inv(T1 a, T2 p) { return gamma_p_inv(a, p, policies::policy<>()); } template -inline typename tools::promote_args::type +BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type gamma_q_inv(T1 a, T2 p) { return gamma_q_inv(a, p, policies::policy<>()); diff --git a/include/boost/math/special_functions/detail/igamma_large.hpp b/include/boost/math/special_functions/detail/igamma_large.hpp index 1fa13c6921..8e0ad1b0dd 100644 --- a/include/boost/math/special_functions/detail/igamma_large.hpp +++ b/include/boost/math/special_functions/detail/igamma_large.hpp @@ -61,6 +61,7 @@ #endif #include +#include namespace boost{ namespace math{ namespace detail{ @@ -68,7 +69,7 @@ namespace boost{ namespace math{ namespace detail{ // when T is unsuitable to be passed to these routines: // template -inline T igamma_temme_large(T, T, const Policy& /* pol */, const std::integral_constant&) +BOOST_MATH_GPU_ENABLED inline T igamma_temme_large(T, T, const Policy& /* pol */, const boost::math::integral_constant&) { // stub function, should never actually be called BOOST_MATH_ASSERT(0); @@ -78,8 +79,11 @@ inline T igamma_temme_large(T, T, const Policy& /* pol */, const std::integral_c // This version is accurate for up to 64-bit mantissa's, // (80-bit long double, or 10^-20). // + +#ifndef BOOST_MATH_HAS_GPU_SUPPORT + template -T igamma_temme_large(T a, T x, const Policy& pol, const std::integral_constant&) +BOOST_MATH_GPU_ENABLED T igamma_temme_large(T a, T x, const Policy& pol, const boost::math::integral_constant&) { BOOST_MATH_STD_USING // ADL of std functions T sigma = (x - a) / a; @@ -91,7 +95,7 @@ T igamma_temme_large(T a, T x, const Policy& pol, const std::integral_constant -BOOST_MATH_GPU_ENABLED T igamma_temme_large(T a, T x, const Policy& pol, const std::integral_constant&) +BOOST_MATH_GPU_ENABLED T igamma_temme_large(T a, T x, const Policy& pol, const boost::math::integral_constant&) { BOOST_MATH_STD_USING // ADL of std functions T sigma = (x - a) / a; @@ -417,7 +424,18 @@ BOOST_MATH_GPU_ENABLED T igamma_temme_large(T a, T x, const Policy& pol, const s if(x < a) result = -result; + #ifdef BOOST_MATH_HAS_NVRTC + if (boost::math::is_same_v) + { + result += ::erfcf(::sqrtf(y)) / 2; + } + else + { + result += ::erfc(::sqrt(y)) / 2; + } + #else result += boost::math::erfc(sqrt(y), pol) / 2; + #endif return result; } @@ -426,7 +444,7 @@ BOOST_MATH_GPU_ENABLED T igamma_temme_large(T a, T x, const Policy& pol, const s // (IEEE float precision, or 10^-8) // template -BOOST_MATH_GPU_ENABLED T igamma_temme_large(T a, T x, const Policy& pol, const std::integral_constant&) +BOOST_MATH_GPU_ENABLED T igamma_temme_large(T a, T x, const Policy& pol, const boost::math::integral_constant&) { BOOST_MATH_STD_USING // ADL of std functions T sigma = (x - a) / a; @@ -470,7 +488,18 @@ BOOST_MATH_GPU_ENABLED T igamma_temme_large(T a, T x, const Policy& pol, const s if(x < a) result = -result; + #ifdef BOOST_MATH_HAS_NVRTC + if (boost::math::is_same_v) + { + result += ::erfcf(::sqrtf(y)) / 2; + } + else + { + result += ::erfc(::sqrt(y)) / 2; + } + #else result += boost::math::erfc(sqrt(y), pol) / 2; + #endif return result; } @@ -481,8 +510,10 @@ BOOST_MATH_GPU_ENABLED T igamma_temme_large(T a, T x, const Policy& pol, const s // It's use for a < 200 is not recommended, that would // require many more terms in the polynomials. // +#ifndef BOOST_MATH_HAS_GPU_SUPPORT + template -T igamma_temme_large(T a, T x, const Policy& pol, const std::integral_constant&) +BOOST_MATH_GPU_ENABLED T igamma_temme_large(T a, T x, const Policy& pol, const boost::math::integral_constant&) { BOOST_MATH_STD_USING // ADL of std functions T sigma = (x - a) / a; @@ -494,7 +525,7 @@ T igamma_temme_large(T a, T x, const Policy& pol, const std::integral_constant #include +#include +#include +#include #if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128) // @@ -32,13 +35,13 @@ namespace boost{ namespace math{ namespace detail{ template BOOST_MATH_GPU_ENABLED T gamma_imp(T z, const Policy& pol, const Lanczos& l); template -T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos& l); +BOOST_MATH_GPU_ENABLED T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos& l); // // lgamma for small arguments: // template -BOOST_MATH_GPU_ENABLED T lgamma_small_imp(T z, T zm1, T zm2, const std::integral_constant&, const Policy& /* l */, const Lanczos&) +BOOST_MATH_GPU_ENABLED T lgamma_small_imp(T z, T zm1, T zm2, const boost::math::integral_constant&, const Policy& /* l */, const Lanczos&) { // This version uses rational approximations for small // values of z accurate enough for 64-bit mantissas @@ -226,8 +229,10 @@ BOOST_MATH_GPU_ENABLED T lgamma_small_imp(T z, T zm1, T zm2, const std::integral } return result; } + +#ifndef BOOST_MATH_HAS_GPU_SUPPORT template -T lgamma_small_imp(T z, T zm1, T zm2, const std::integral_constant&, const Policy& /* l */, const Lanczos&) +T lgamma_small_imp(T z, T zm1, T zm2, const boost::math::integral_constant&, const Policy& /* l */, const Lanczos&) { // // This version uses rational approximations for small @@ -484,7 +489,7 @@ T lgamma_small_imp(T z, T zm1, T zm2, const std::integral_constant&, c return result; } template -T lgamma_small_imp(T z, T zm1, T zm2, const std::integral_constant&, const Policy& pol, const Lanczos& l) +BOOST_MATH_GPU_ENABLED T lgamma_small_imp(T z, T zm1, T zm2, const boost::math::integral_constant&, const Policy& pol, const Lanczos& l) { // // No rational approximations are available because either @@ -528,6 +533,8 @@ T lgamma_small_imp(T z, T zm1, T zm2, const std::integral_constant&, con return result; } +#endif // BOOST_MATH_HAS_GPU_SUPPORT + }}} // namespaces #endif // BOOST_MATH_SPECIAL_FUNCTIONS_DETAIL_LGAMMA_SMALL diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index 9268ba4156..186befb612 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -15,14 +15,13 @@ #endif #include - -#ifndef BOOST_MATH_HAS_NVRTC - #include #include #include #include #include +#include +#include #include #include #include @@ -36,12 +35,12 @@ #include #include #include + +// Only needed for types larger than double +#ifndef BOOST_MATH_HAS_GPU_SUPPORT #include #include - -#include -#include -#include +#endif #ifdef _MSC_VER # pragma warning(push) @@ -60,13 +59,13 @@ namespace boost{ namespace math{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline bool is_odd(T v, const std::true_type&) +BOOST_MATH_GPU_ENABLED inline bool is_odd(T v, const boost::math::true_type&) { int i = static_cast(v); return i&1; } template -BOOST_MATH_GPU_ENABLED inline bool is_odd(T v, const std::false_type&) +BOOST_MATH_GPU_ENABLED inline bool is_odd(T v, const boost::math::false_type&) { // Oh dear can't cast T to int! BOOST_MATH_STD_USING @@ -76,7 +75,7 @@ BOOST_MATH_GPU_ENABLED inline bool is_odd(T v, const std::false_type&) template BOOST_MATH_GPU_ENABLED inline bool is_odd(T v) { - return is_odd(v, ::std::is_convertible()); + return is_odd(v, ::boost::math::is_convertible()); } template @@ -208,7 +207,7 @@ BOOST_MATH_GPU_ENABLED BOOST_MATH_FORCEINLINE T gamma_imp(T z, const Policy& pol result = -boost::math::constants::pi() / result; if(result == 0) return policies::raise_underflow_error(function, "Result of tgamma is too small to represent.", pol); - if((boost::math::fpclassify)(result) == (int)FP_SUBNORMAL) + if((boost::math::fpclassify)(result) == (int)BOOST_MATH_FP_SUBNORMAL) return policies::raise_denorm_error(function, "Result of tgamma is denormalized.", result, pol); BOOST_MATH_INSTRUMENT_VARIABLE(result); return result; @@ -259,7 +258,7 @@ BOOST_MATH_GPU_ENABLED T lgamma_imp_final(T z, const Policy& pol, const Lanczos& else if(z < 15) { typedef typename policies::precision::type precision_type; - typedef std::integral_constant(z, T(z - 1), T(z - 2), tag_type(), pol, l); } - else if((z >= 3) && (z < 100) && (std::numeric_limits::max_exponent >= 1024)) + else if((z >= 3) && (z < 100) && (boost::math::numeric_limits::max_exponent >= 1024)) { // taking the log of tgamma reduces the error, no danger of overflow here: result = log(gamma_imp(z, pol, l)); @@ -349,7 +348,7 @@ struct upper_incomplete_gamma_fract T z, a; int k; public: - typedef std::pair result_type; + typedef boost::math::pair result_type; BOOST_MATH_GPU_ENABLED upper_incomplete_gamma_fract(T a1, T z1) : z(z1-a1+1), a(a1), k(0) @@ -399,26 +398,28 @@ BOOST_MATH_GPU_ENABLED inline T lower_gamma_series(T a, T z, const Policy& pol, // lower incomplete integral. Then divide by tgamma(a) // to get the normalised value. lower_incomplete_gamma_series s(a, z); - std::uintmax_t max_iter = policies::get_max_series_iterations(); + boost::math::uintmax_t max_iter = policies::get_max_series_iterations(); T factor = policies::get_epsilon(); T result = boost::math::tools::sum_series(s, factor, max_iter, init_value); policies::check_series_iterations("boost::math::detail::lower_gamma_series<%1%>(%1%)", max_iter, pol); return result; } +#ifndef BOOST_MATH_HAS_GPU_SUPPORT + // // Fully generic tgamma and lgamma use Stirling's approximation // with Bernoulli numbers. // template -std::size_t highest_bernoulli_index() +boost::math::size_t highest_bernoulli_index() { - const float digits10_of_type = (std::numeric_limits::is_specialized - ? static_cast(std::numeric_limits::digits10) + const float digits10_of_type = (boost::math::numeric_limits::is_specialized + ? static_cast(boost::math::numeric_limits::digits10) : static_cast(boost::math::tools::digits() * 0.301F)); // Find the high index n for Bn to produce the desired precision in Stirling's calculation. - return static_cast(18.0F + (0.6F * digits10_of_type)); + return static_cast(18.0F + (0.6F * digits10_of_type)); } template @@ -426,8 +427,8 @@ int minimum_argument_for_bernoulli_recursion() { BOOST_MATH_STD_USING - const float digits10_of_type = (std::numeric_limits::is_specialized - ? (float) std::numeric_limits::digits10 + const float digits10_of_type = (boost::math::numeric_limits::is_specialized + ? (float) boost::math::numeric_limits::digits10 : (float) (boost::math::tools::digits() * 0.301F)); int min_arg = (int) (digits10_of_type * 1.7F); @@ -449,7 +450,7 @@ int minimum_argument_for_bernoulli_recursion() const float d2_minus_one = ((digits10_of_type / 0.301F) - 1.0F); const float limit = ceil(exp((d2_minus_one * log(2.0F)) / 20.0F)); - min_arg = (int) ((std::min)(digits10_of_type * 1.7F, limit)); + min_arg = (int) (BOOST_MATH_GPU_SAFE_MIN(digits10_of_type * 1.7F, limit)); } return min_arg; @@ -468,7 +469,7 @@ T scaled_tgamma_no_lanczos(const T& z, const Policy& pol, bool islog = false) // Perform the Bernoulli series expansion of Stirling's approximation. - const std::size_t number_of_bernoullis_b2n = policies::get_max_series_iterations(); + const boost::math::size_t number_of_bernoullis_b2n = policies::get_max_series_iterations(); T one_over_x_pow_two_n_minus_one = 1 / z; const T one_over_x2 = one_over_x_pow_two_n_minus_one * one_over_x_pow_two_n_minus_one; @@ -477,11 +478,11 @@ T scaled_tgamma_no_lanczos(const T& z, const Policy& pol, bool islog = false) const T half_ln_two_pi_over_z = sqrt(boost::math::constants::two_pi() / z); T last_term = 2 * sum; - for (std::size_t n = 2U;; ++n) + for (boost::math::size_t n = 2U;; ++n) { one_over_x_pow_two_n_minus_one *= one_over_x2; - const std::size_t n2 = static_cast(n * 2U); + const boost::math::size_t n2 = static_cast(n * 2U); const T term = (boost::math::bernoulli_b2n(static_cast(n)) * one_over_x_pow_two_n_minus_one) / (n2 * (n2 - 1U)); @@ -629,7 +630,7 @@ T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&) if(gamma_value == 0) return policies::raise_underflow_error(function, "Result of tgamma is too small to represent.", pol); - if((boost::math::fpclassify)(gamma_value) == static_cast(FP_SUBNORMAL)) + if((boost::math::fpclassify)(gamma_value) == static_cast(BOOST_MATH_FP_SUBNORMAL)) return policies::raise_denorm_error(function, "Result of tgamma is denormalized.", gamma_value, pol); } @@ -775,6 +776,21 @@ T lgamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&, int* sig return log_gamma_value; } +#endif // BOOST_MATH_HAS_GPU_SUPPORT + +// In order for tgammap1m1_imp to compile we need a forward decl of boost::math::tgamma +// The rub is that we can't just use math_fwd so we provide one here only in that circumstance +#ifdef BOOST_MATH_HAS_NVRTC +template +BOOST_MATH_GPU_ENABLED tools::promote_args_t tgamma(RT z); + +template +BOOST_MATH_GPU_ENABLED tools::promote_args_t tgamma(RT1 a, RT2 z); + +template +BOOST_MATH_GPU_ENABLED tools::promote_args_t tgamma(RT1 a, RT2 z, const Policy& pol); +#endif + // // This helper calculates tgamma(dz+1)-1 without cancellation errors, // used by the upper incomplete gamma with z < 1: @@ -786,7 +802,7 @@ BOOST_MATH_GPU_ENABLED T tgammap1m1_imp(T dz, Policy const& pol, const Lanczos& typedef typename policies::precision::type precision_type; - typedef std::integral_constant inline T tgammap1m1_imp(T z, Policy const& pol, const ::boost::math::lanczos::undefined_lanczos&) @@ -841,6 +867,8 @@ inline T tgammap1m1_imp(T z, Policy const& pol, return boost::math::expm1(boost::math::lgamma(1 + z, pol)); } +#endif // BOOST_MATH_HAS_GPU_SUPPORT + // // Series representation for upper fraction when z is small: // @@ -914,7 +942,7 @@ BOOST_MATH_GPU_ENABLED T full_igamma_prefix(T a, T z, const Policy& pol) // This error handling isn't very good: it happens after the fact // rather than before it... // - if((boost::math::fpclassify)(prefix) == (int)FP_INFINITE) + if((boost::math::fpclassify)(prefix) == (int)BOOST_MATH_FP_INFINITE) return policies::raise_overflow_error("boost::math::detail::full_igamma_prefix<%1%>(%1%, %1%)", "Result of incomplete gamma function is too large to represent.", pol); return prefix; @@ -971,16 +999,16 @@ BOOST_MATH_GPU_ENABLED T regularised_gamma_prefix(T a, T z, const Policy& pol, c // T alz = a * log(z / agh); T amz = a - z; - if(((std::min)(alz, amz) <= tools::log_min_value()) || ((std::max)(alz, amz) >= tools::log_max_value())) + if((BOOST_MATH_GPU_SAFE_MIN(alz, amz) <= tools::log_min_value()) || (BOOST_MATH_GPU_SAFE_MAX(alz, amz) >= tools::log_max_value())) { T amza = amz / a; - if(((std::min)(alz, amz)/2 > tools::log_min_value()) && ((std::max)(alz, amz)/2 < tools::log_max_value())) + if((BOOST_MATH_GPU_SAFE_MIN(alz, amz)/2 > tools::log_min_value()) && (BOOST_MATH_GPU_SAFE_MAX(alz, amz)/2 < tools::log_max_value())) { // compute square root of the result and then square it: T sq = pow(z / agh, a / 2) * exp(amz / 2); prefix = sq * sq; } - else if(((std::min)(alz, amz)/4 > tools::log_min_value()) && ((std::max)(alz, amz)/4 < tools::log_max_value()) && (z > a)) + else if((BOOST_MATH_GPU_SAFE_MIN(alz, amz)/4 > tools::log_min_value()) && (BOOST_MATH_GPU_SAFE_MAX(alz, amz)/4 < tools::log_max_value()) && (z > a)) { // compute the 4th root of the result then square it twice: T sq = pow(z / agh, a / 4) * exp(amz / 4); @@ -1004,6 +1032,9 @@ BOOST_MATH_GPU_ENABLED T regularised_gamma_prefix(T a, T z, const Policy& pol, c prefix *= sqrt(agh / boost::math::constants::e()) / Lanczos::lanczos_sum_expG_scaled(a); return prefix; } + +#ifndef BOOST_MATH_HAS_GPU_SUPPORT + // // And again, without Lanczos support: // @@ -1073,6 +1104,9 @@ T regularised_gamma_prefix(T a, T z, const Policy& pol, const lanczos::undefined } } } + +#endif // BOOST_MATH_HAS_GPU_SUPPORT + // // Upper gamma fraction for very small a: // @@ -1084,7 +1118,14 @@ BOOST_MATH_GPU_ENABLED inline T tgamma_small_upper_part(T a, T x, const Policy& // Compute the full upper fraction (Q) when a is very small: // + #ifdef BOOST_MATH_HAS_NVRTC + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename lanczos::lanczos::type evaluation_type; + T result {detail::tgammap1m1_imp(static_cast(a), pol, evaluation_type())}; + #else T result { boost::math::tgamma1pm1(a, pol) }; + #endif if(pgam) *pgam = (result + 1) / a; @@ -1092,7 +1133,7 @@ BOOST_MATH_GPU_ENABLED inline T tgamma_small_upper_part(T a, T x, const Policy& result -= p; result /= a; detail::small_gamma2_series s(a, x); - std::uintmax_t max_iter = policies::get_max_series_iterations() - 10; + boost::math::uintmax_t max_iter = policies::get_max_series_iterations() - 10; p += 1; if(pderivative) *pderivative = p / (*pgam * exp(x)); @@ -1141,7 +1182,21 @@ BOOST_MATH_GPU_ENABLED T finite_half_gamma_q(T a, T x, T* p_derivative, const Po // Calculates normalised Q when a is a half-integer: // BOOST_MATH_STD_USING + + #ifdef BOOST_MATH_HAS_NVRTC + T e; + if (boost::math::is_same_v) + { + e = ::erfcf(::sqrtf(x)); + } + else + { + e = ::erfc(::sqrt(x)); + } + #else T e = boost::math::erfc(sqrt(x), pol); + #endif + if((e != 0) && (a > 1)) { T term = exp(-x) / sqrt(constants::pi() * x); @@ -1192,7 +1247,7 @@ BOOST_MATH_GPU_ENABLED T incomplete_tgamma_large_x(const T& a, const T& x, const { BOOST_MATH_STD_USING incomplete_tgamma_large_x_series s(a, x); - std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + boost::math::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::tgamma<%1%>(%1%,%1%)", max_iter, pol); return result; @@ -1203,7 +1258,7 @@ BOOST_MATH_GPU_ENABLED T incomplete_tgamma_large_x(const T& a, const T& x, const // Main incomplete gamma entry point, handles all four incomplete gamma's: // template -BOOST_MATH_GPU_ENABLED T gamma_incomplete_imp(T a, T x, bool normalised, bool invert, +BOOST_MATH_GPU_ENABLED T gamma_incomplete_imp_final(T a, T x, bool normalised, bool invert, const Policy& pol, T* p_derivative) { constexpr auto function = "boost::math::gamma_p<%1%>(%1%, %1%)"; @@ -1218,70 +1273,6 @@ BOOST_MATH_GPU_ENABLED T gamma_incomplete_imp(T a, T x, bool normalised, bool in T result = 0; // Just to avoid warning C4701: potentially uninitialized local variable 'result' used - if(a >= max_factorial::value && !normalised) - { - // - // When we're computing the non-normalized incomplete gamma - // and a is large the result is rather hard to compute unless - // we use logs. There are really two options - if x is a long - // way from a in value then we can reliably use methods 2 and 4 - // below in logarithmic form and go straight to the result. - // Otherwise we let the regularized gamma take the strain - // (the result is unlikely to underflow in the central region anyway) - // and combine with lgamma in the hopes that we get a finite result. - // - if(invert && (a * 4 < x)) - { - // This is method 4 below, done in logs: - result = a * log(x) - x; - if(p_derivative) - *p_derivative = exp(result); - result += log(upper_gamma_fraction(a, x, policies::get_epsilon())); - } - else if(!invert && (a > 4 * x)) - { - // This is method 2 below, done in logs: - result = a * log(x) - x; - if(p_derivative) - *p_derivative = exp(result); - T init_value = 0; - result += log(detail::lower_gamma_series(a, x, pol, init_value) / a); - } - else - { - result = gamma_incomplete_imp(a, x, true, invert, pol, p_derivative); - if(result == 0) - { - if(invert) - { - // Try http://functions.wolfram.com/06.06.06.0039.01 - result = 1 + 1 / (12 * a) + 1 / (288 * a * a); - result = log(result) - a + (a - 0.5f) * log(a) + log(boost::math::constants::root_two_pi()); - if(p_derivative) - *p_derivative = exp(a * log(x) - x); - } - else - { - // This is method 2 below, done in logs, we're really outside the - // range of this method, but since the result is almost certainly - // infinite, we should probably be OK: - result = a * log(x) - x; - if(p_derivative) - *p_derivative = exp(result); - T init_value = 0; - result += log(detail::lower_gamma_series(a, x, pol, init_value) / a); - } - } - else - { - result = log(result) + boost::math::lgamma(a, pol); - } - } - if(result > tools::log_max_value()) - return policies::raise_overflow_error(function, nullptr, pol); - return exp(result); - } - BOOST_MATH_ASSERT((p_derivative == nullptr) || normalised); bool is_int, is_half_int; @@ -1357,7 +1348,7 @@ BOOST_MATH_GPU_ENABLED T gamma_incomplete_imp(T a, T x, bool normalised, bool in // series and continued fractions are slow to converge: // bool use_temme = false; - if(normalised && std::numeric_limits::is_specialized && (a > 20)) + if(normalised && boost::math::numeric_limits::is_specialized && (a > 20)) { T sigma = fabs((x-a)/a); if((a > 200) && (policies::digits() <= 113)) @@ -1414,14 +1405,40 @@ BOOST_MATH_GPU_ENABLED T gamma_incomplete_imp(T a, T x, bool normalised, bool in { result = finite_gamma_q(a, x, pol, p_derivative); if(!normalised) + { + #ifdef BOOST_MATH_HAS_NVRTC + if (boost::math::is_same_v) + { + result *= ::tgammaf(a); + } + else + { + result *= ::tgamma(a); + } + #else result *= boost::math::tgamma(a, pol); + #endif + } break; } case 1: { result = finite_half_gamma_q(a, x, p_derivative, pol); if(!normalised) + { + #ifdef BOOST_MATH_HAS_NVRTC + if (boost::math::is_same_v) + { + result *= ::tgammaf(a); + } + else + { + result *= ::tgamma(a); + } + #else result *= boost::math::tgamma(a, pol); + #endif + } if(p_derivative && (*p_derivative == 0)) *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type()); break; @@ -1450,7 +1467,19 @@ BOOST_MATH_GPU_ENABLED T gamma_incomplete_imp(T a, T x, bool normalised, bool in bool optimised_invert = false; if(invert) { + #ifdef BOOST_MATH_HAS_NVRTC + if (boost::math::is_same_v) + { + init_value = (normalised ? 1 : ::tgammaf(a)); + } + else + { + init_value = (normalised ? 1 : ::tgamma(a)); + } + #else init_value = (normalised ? 1 : boost::math::tgamma(a, pol)); + #endif + if(normalised || (result >= 1) || (tools::max_value() * result > init_value)) { init_value /= result; @@ -1507,7 +1536,7 @@ BOOST_MATH_GPU_ENABLED T gamma_incomplete_imp(T a, T x, bool normalised, bool in // typedef typename policies::precision::type precision_type; - typedef std::integral_constant) + { + result = ::powf(x, a) / ::tgammaf(a + 1); + } + else + { + result = ::pow(x, a) / ::tgamma(a + 1); + } + #else result = pow(x, a) / boost::math::tgamma(a + 1, pol); + #endif #ifndef BOOST_MATH_NO_EXCEPTIONS } catch (const std::overflow_error&) @@ -1565,7 +1605,19 @@ BOOST_MATH_GPU_ENABLED T gamma_incomplete_imp(T a, T x, bool normalised, bool in result = 1; if(invert) { + #ifdef BOOST_MATH_HAS_NVRTC + T gam; + if (boost::math::is_same_v) + { + gam = normalised ? 1 : ::tgammaf(a); + } + else + { + gam = normalised ? 1 : ::tgamma(a); + } + #else T gam = normalised ? 1 : boost::math::tgamma(a, pol); + #endif result = gam - result; } if(p_derivative) @@ -1585,6 +1637,101 @@ BOOST_MATH_GPU_ENABLED T gamma_incomplete_imp(T a, T x, bool normalised, bool in return result; } +// Need to implement this dispatch to avoid recursion for device compilers +template +BOOST_MATH_GPU_ENABLED T gamma_incomplete_imp(T a, T x, bool normalised, bool invert, + const Policy& pol, T* p_derivative) +{ + constexpr auto function = "boost::math::gamma_p<%1%>(%1%, %1%)"; + if(a <= 0) + return policies::raise_domain_error(function, "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol); + if(x < 0) + return policies::raise_domain_error(function, "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol); + + BOOST_MATH_STD_USING + + + T result = 0; // Just to avoid warning C4701: potentially uninitialized local variable 'result' used + + if(a >= max_factorial::value && !normalised) + { + // + // When we're computing the non-normalized incomplete gamma + // and a is large the result is rather hard to compute unless + // we use logs. There are really two options - if x is a long + // way from a in value then we can reliably use methods 2 and 4 + // below in logarithmic form and go straight to the result. + // Otherwise we let the regularized gamma take the strain + // (the result is unlikely to underflow in the central region anyway) + // and combine with lgamma in the hopes that we get a finite result. + // + if(invert && (a * 4 < x)) + { + // This is method 4 below, done in logs: + result = a * log(x) - x; + if(p_derivative) + *p_derivative = exp(result); + result += log(upper_gamma_fraction(a, x, policies::get_epsilon())); + } + else if(!invert && (a > 4 * x)) + { + // This is method 2 below, done in logs: + result = a * log(x) - x; + if(p_derivative) + *p_derivative = exp(result); + T init_value = 0; + result += log(detail::lower_gamma_series(a, x, pol, init_value) / a); + } + else + { + result = gamma_incomplete_imp_final(T(a), T(x), true, invert, pol, p_derivative); + if(result == 0) + { + if(invert) + { + // Try http://functions.wolfram.com/06.06.06.0039.01 + result = 1 + 1 / (12 * a) + 1 / (288 * a * a); + result = log(result) - a + (a - 0.5f) * log(a) + log(boost::math::constants::root_two_pi()); + if(p_derivative) + *p_derivative = exp(a * log(x) - x); + } + else + { + // This is method 2 below, done in logs, we're really outside the + // range of this method, but since the result is almost certainly + // infinite, we should probably be OK: + result = a * log(x) - x; + if(p_derivative) + *p_derivative = exp(result); + T init_value = 0; + result += log(detail::lower_gamma_series(a, x, pol, init_value) / a); + } + } + else + { + #ifdef BOOST_MATH_HAS_NVRTC + if (boost::math::is_same_v) + { + result = ::logf(result) + ::lgammaf(a); + } + else + { + result = ::log(result) + ::lgamma(a); + } + #else + result = log(result) + boost::math::lgamma(a, pol); + #endif + } + } + if(result > tools::log_max_value()) + return policies::raise_overflow_error(function, nullptr, pol); + return exp(result); + } + + // If no special handling is required then we proceeds as normal + return gamma_incomplete_imp_final(T(a), T(x), normalised, invert, pol, p_derivative); +} + // // Ratios of two gamma functions: // @@ -1612,7 +1759,18 @@ BOOST_MATH_GPU_ENABLED T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Poli } else { + #ifdef BOOST_MATH_HAS_NVRTC + if (boost::math::is_same_v) + { + return 1 / (z * ::tgammaf(z + delta)); + } + else + { + return 1 / (z * ::tgamma(z + delta)); + } + #else return 1 / (z * boost::math::tgamma(z + delta, pol)); + #endif } } T zgh = static_cast(z + T(Lanczos::g()) - constants::half()); @@ -1651,6 +1809,8 @@ BOOST_MATH_GPU_ENABLED T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Poli // // And again without Lanczos support this time: // +#ifndef BOOST_MATH_HAS_GPU_SUPPORT + template T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const lanczos::undefined_lanczos& l) { @@ -1707,6 +1867,8 @@ T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const lanczos: return ratio; } +#endif + template BOOST_MATH_GPU_ENABLED T tgamma_delta_ratio_imp(T z, T delta, const Policy& pol) { @@ -1715,7 +1877,18 @@ BOOST_MATH_GPU_ENABLED T tgamma_delta_ratio_imp(T z, T delta, const Policy& pol) if((z <= 0) || (z + delta <= 0)) { // This isn't very sophisticated, or accurate, but it does work: + #ifdef BOOST_MATH_HAS_NVRTC + if (boost::math::is_same_v) + { + return ::tgammaf(z) / ::tgammaf(z + delta); + } + else + { + return ::tgamma(z) / ::tgamma(z + delta); + } + #else return boost::math::tgamma(z, pol) / boost::math::tgamma(z + delta, pol); + #endif } if(floor(delta) == delta) @@ -1775,17 +1948,32 @@ BOOST_MATH_GPU_ENABLED T tgamma_ratio_imp(T x, T y, const Policy& pol) if((y <= 0) || (boost::math::isinf)(y)) return policies::raise_domain_error("boost::math::tgamma_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got b=%1%).", y, pol); + // We don't need to worry about the denorm case on device + // And this has the added bonus of removing recursion + #ifndef BOOST_MATH_HAS_GPU_SUPPORT if(x <= tools::min_value()) { // Special case for denorms...Ugh. T shift = ldexp(T(1), tools::digits()); return shift * tgamma_ratio_imp(T(x * shift), y, pol); } + #endif if((x < max_factorial::value) && (y < max_factorial::value)) { // Rather than subtracting values, lets just call the gamma functions directly: + #ifdef BOOST_MATH_HAS_NVRTC + if (boost::math::is_same_v) + { + return ::tgammaf(x) / ::tgammaf(y); + } + else + { + return ::tgamma(x) / ::tgamma(y); + } + #else return boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol); + #endif } T prefix = 1; if(x < 1) @@ -1801,12 +1989,35 @@ BOOST_MATH_GPU_ENABLED T tgamma_ratio_imp(T x, T y, const Policy& pol) y -= 1; prefix /= y; } + + #ifdef BOOST_MATH_HAS_NVRTC + if (boost::math::is_same_v) + { + return prefix * ::tgammaf(x) / ::tgammaf(y); + } + else + { + return prefix * ::tgamma(x) / ::tgamma(y); + } + #else return prefix * boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol); + #endif } // // result is almost certainly going to underflow to zero, try logs just in case: // + #ifdef BOOST_MATH_HAS_NVRTC + if (boost::math::is_same_v) + { + return ::expf(::lgammaf(x) - ::lgammaf(y)); + } + else + { + return ::exp(::lgamma(x) - ::lgamma(y)); + } + #else return exp(boost::math::lgamma(x, pol) - boost::math::lgamma(y, pol)); + #endif } if(y < 1) { @@ -1821,17 +2032,44 @@ BOOST_MATH_GPU_ENABLED T tgamma_ratio_imp(T x, T y, const Policy& pol) x -= 1; prefix *= x; } + + #ifdef BOOST_MATH_HAS_NVRTC + if (boost::math::is_same_v) + { + return prefix * ::tgammaf(x) / ::tgammaf(y); + } + else + { + return prefix * ::tgamma(x) / ::tgamma(y); + } + #else return prefix * boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol); + #endif } // // Result will almost certainly overflow, try logs just in case: // + #ifdef BOOST_MATH_HAS_NVRTC + if (boost::math::is_same_v) + { + return ::expf(::lgammaf(x) - ::lgammaf(y)); + } + else + { + return ::exp(::lgamma(x) - ::lgamma(y)); + } + #else return exp(boost::math::lgamma(x, pol) - boost::math::lgamma(y, pol)); + #endif } // // Regular case, x and y both large and similar in magnitude: // + #ifdef BOOST_MATH_HAS_NVRTC + return detail::tgamma_delta_ratio_imp(x, y - x, pol); + #else return boost::math::tgamma_delta_ratio(x, y - x, pol); + #endif } template @@ -1866,7 +2104,18 @@ BOOST_MATH_GPU_ENABLED T gamma_p_derivative_imp(T a, T x, const Policy& pol) if(f1 == 0) { // Underflow in calculation, use logs instead: + #ifdef BOOST_MATH_HAS_NVRTC + if (boost::math::is_same_v) + { + f1 = a * ::logf(x) - x - ::lgammaf(a) - ::logf(x); + } + else + { + f1 = a * ::log(x) - x - ::lgamma(a) - ::log(x); + } + #else f1 = a * log(x) - x - lgamma(a, pol) - log(x); + #endif f1 = exp(f1); } else @@ -1901,7 +2150,7 @@ struct igamma_initializer { typedef typename policies::precision::type precision_type; - typedef std::integral_constant - BOOST_MATH_GPU_ENABLED static void do_init(const std::integral_constant&) + BOOST_MATH_GPU_ENABLED static void do_init(const boost::math::integral_constant&) { // If std::numeric_limits::digits is zero, we must not call // our initialization code here as the precision presumably // varies at runtime, and will not have been set yet. Plus the // code requiring initialization isn't called when digits == 0. - if (std::numeric_limits::digits) + if (boost::math::numeric_limits::digits) { boost::math::gamma_p(static_cast(400), static_cast(400), Policy()); } } - BOOST_MATH_GPU_ENABLED static void do_init(const std::integral_constant&){} - void force_instantiate()const{} + BOOST_MATH_GPU_ENABLED static void do_init(const boost::math::integral_constant&){} + BOOST_MATH_GPU_ENABLED void force_instantiate()const{} }; BOOST_MATH_STATIC const init initializer; BOOST_MATH_GPU_ENABLED static void force_instantiate() @@ -1945,7 +2194,7 @@ struct lgamma_initializer BOOST_MATH_GPU_ENABLED init() { typedef typename policies::precision::type precision_type; - typedef std::integral_constant&) + BOOST_MATH_GPU_ENABLED static void do_init(const boost::math::integral_constant&) { boost::math::lgamma(static_cast(2.5), Policy()); boost::math::lgamma(static_cast(1.25), Policy()); boost::math::lgamma(static_cast(1.75), Policy()); } - BOOST_MATH_GPU_ENABLED static void do_init(const std::integral_constant&) + BOOST_MATH_GPU_ENABLED static void do_init(const boost::math::integral_constant&) { boost::math::lgamma(static_cast(2.5), Policy()); boost::math::lgamma(static_cast(1.25), Policy()); boost::math::lgamma(static_cast(1.5), Policy()); boost::math::lgamma(static_cast(1.75), Policy()); } - BOOST_MATH_GPU_ENABLED static void do_init(const std::integral_constant&) + BOOST_MATH_GPU_ENABLED static void do_init(const boost::math::integral_constant&) { } BOOST_MATH_GPU_ENABLED void force_instantiate()const{} @@ -2016,13 +2265,6 @@ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t } // namespace detail -template -BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type - tgamma(T z) -{ - return tgamma(z, policies::policy<>()); -} - template BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type lgamma(T z, int* sign, const Policy&) @@ -2079,7 +2321,7 @@ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; - return policies::checked_narrowing_cast::type, forwarding_policy>(detail::tgammap1m1_imp(static_cast(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma1pm1<%!%>(%1%)"); + return policies::checked_narrowing_cast::type, forwarding_policy>(detail::tgammap1m1_imp(static_cast(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma1pm1<%!%>(%1%)"); } template @@ -2111,6 +2353,12 @@ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t using result_type = tools::promote_args_t; return static_cast(detail::tgamma(a, z, pol, boost::math::false_type())); } +template +BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type + tgamma(T z) +{ + return tgamma(z, policies::policy<>()); +} // // Full lower incomplete gamma: // @@ -2284,73 +2532,4 @@ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t #include #include -#else - -#include -#include - -namespace boost { -namespace math { - -inline BOOST_MATH_GPU_ENABLED float tgamma(float x) { return ::tgammaf(x); } -inline BOOST_MATH_GPU_ENABLED double tgamma(double x) { return ::tgamma(x); } - -template -BOOST_MATH_GPU_ENABLED T tgamma(T x, const Policy&) -{ - return boost::math::tgamma(x); -} - -inline BOOST_MATH_GPU_ENABLED float lgamma(float x) { return ::lgammaf(x); } -inline BOOST_MATH_GPU_ENABLED double lgamma(double x) { return ::lgamma(x); } - -template -BOOST_MATH_GPU_ENABLED T lgamma(T x, const Policy&) -{ - return boost::math::lgamma(x); -} - -template -BOOST_MATH_GPU_ENABLED T lgamma(T x, int* sign, const Policy&) -{ - auto res = boost::math::lgamma(x); - if (sign != nullptr) - { - if (res < 0) - { - *sign = -1; - } - else - { - *sign = 1; - } - } - - return res; -} - -template -BOOST_MATH_GPU_ENABLED T tgamma1pm1(T z) -{ - using namespace boost::math; - - if (fabs(z) < T(0.55)) - { - return expm1(lgamma(z)); - } - - return expm1(lgamma(1 + z)); -} - -template -BOOST_MATH_GPU_ENABLED T tgamma1pm1(T x, const Policy&) -{ - return tgamma1pm1(x); -} - -} // namespace math -} // namespace boost - -#endif // __CUDACC_RTC__ - #endif // BOOST_MATH_SF_GAMMA_HPP diff --git a/include/boost/math/special_functions/log1p.hpp b/include/boost/math/special_functions/log1p.hpp index cdec8ee86c..758f606687 100644 --- a/include/boost/math/special_functions/log1p.hpp +++ b/include/boost/math/special_functions/log1p.hpp @@ -13,15 +13,13 @@ #endif #include - -#ifndef BOOST_MATH_HAS_NVRTC - -#include -#include -#include #include #include #include +#include +#include +#include +#include #include #include #include @@ -82,7 +80,7 @@ namespace detail // it performs no better than log(1+x): which is to say not very well at all. // template -BOOST_MATH_GPU_ENABLED T log1p_imp(T const & x, const Policy& pol, const std::integral_constant&) +BOOST_MATH_GPU_ENABLED T log1p_imp(T const & x, const Policy& pol, const boost::math::integral_constant&) { // The function returns the natural logarithm of 1 + x. typedef typename tools::promote_args::type result_type; BOOST_MATH_STD_USING @@ -104,7 +102,7 @@ BOOST_MATH_GPU_ENABLED T log1p_imp(T const & x, const Policy& pol, const std::in if(a < tools::epsilon()) return x; detail::log1p_series s(x); - std::uintmax_t max_iter = policies::get_max_series_iterations(); + boost::math::uintmax_t max_iter = policies::get_max_series_iterations(); result_type result = tools::sum_series(s, policies::get_epsilon(), max_iter); @@ -113,7 +111,7 @@ BOOST_MATH_GPU_ENABLED T log1p_imp(T const & x, const Policy& pol, const std::in } template -BOOST_MATH_GPU_ENABLED T log1p_imp(T const& x, const Policy& pol, const std::integral_constant&) +BOOST_MATH_GPU_ENABLED T log1p_imp(T const& x, const Policy& pol, const boost::math::integral_constant&) { // The function returns the natural logarithm of 1 + x. BOOST_MATH_STD_USING @@ -166,7 +164,7 @@ BOOST_MATH_GPU_ENABLED T log1p_imp(T const& x, const Policy& pol, const std::int } template -BOOST_MATH_GPU_ENABLED T log1p_imp(T const& x, const Policy& pol, const std::integral_constant&) +BOOST_MATH_GPU_ENABLED T log1p_imp(T const& x, const Policy& pol, const boost::math::integral_constant&) { // The function returns the natural logarithm of 1 + x. BOOST_MATH_STD_USING @@ -221,7 +219,7 @@ BOOST_MATH_GPU_ENABLED T log1p_imp(T const& x, const Policy& pol, const std::int } template -BOOST_MATH_GPU_ENABLED T log1p_imp(T const& x, const Policy& pol, const std::integral_constant&) +BOOST_MATH_GPU_ENABLED T log1p_imp(T const& x, const Policy& pol, const boost::math::integral_constant&) { // The function returns the natural logarithm of 1 + x. BOOST_MATH_STD_USING @@ -276,8 +274,8 @@ struct log1p_initializer do_init(tag()); } template - BOOST_MATH_GPU_ENABLED static void do_init(const std::integral_constant&){} - BOOST_MATH_GPU_ENABLED static void do_init(const std::integral_constant&) + BOOST_MATH_GPU_ENABLED static void do_init(const boost::math::integral_constant&){} + BOOST_MATH_GPU_ENABLED static void do_init(const boost::math::integral_constant&) { boost::math::log1p(static_cast(0.25), Policy()); } @@ -286,7 +284,9 @@ struct log1p_initializer BOOST_MATH_STATIC const init initializer; BOOST_MATH_GPU_ENABLED static void force_instantiate() { + #ifndef BOOST_MATH_HAS_GPU_SUPPORT initializer.force_instantiate(); + #endif } }; @@ -309,7 +309,7 @@ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type log1p(T x, c policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; - typedef std::integral_constant::type return -x * x / 2; boost::math::detail::log1p_series s(x); s(); - std::uintmax_t max_iter = policies::get_max_series_iterations(); + boost::math::uintmax_t max_iter = policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, policies::get_epsilon(), max_iter); @@ -476,40 +476,6 @@ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type log1pmx(T x) } // namespace math } // namespace boost -#else // Special handling for NVRTC platform - -namespace boost { -namespace math { - -template -BOOST_MATH_GPU_ENABLED auto log1p(T x) -{ - return ::log1p(x); -} - -template <> -BOOST_MATH_GPU_ENABLED auto log1p(float x) -{ - return ::log1pf(x); -} - -template -BOOST_MATH_GPU_ENABLED auto log1p(T x, const Policy&) -{ - return ::log1p(x); -} - -template -BOOST_MATH_GPU_ENABLED auto log1p(float x, const Policy&) -{ - return ::log1pf(x); -} - -} // namespace math -} // namespace boost - -#endif // BOOST_MATH_HAS_NVRTC - #ifdef _MSC_VER #pragma warning(pop) #endif diff --git a/include/boost/math/special_functions/math_fwd.hpp b/include/boost/math/special_functions/math_fwd.hpp index 21f51e5075..16ae3b61eb 100644 --- a/include/boost/math/special_functions/math_fwd.hpp +++ b/include/boost/math/special_functions/math_fwd.hpp @@ -512,28 +512,28 @@ namespace boost // gamma inverse. template - tools::promote_args_t gamma_p_inv(T1 a, T2 p); + BOOST_MATH_GPU_ENABLED tools::promote_args_t gamma_p_inv(T1 a, T2 p); template - tools::promote_args_t gamma_p_inva(T1 a, T2 p, const Policy&); + BOOST_MATH_GPU_ENABLED tools::promote_args_t gamma_p_inva(T1 a, T2 p, const Policy&); template - tools::promote_args_t gamma_p_inva(T1 a, T2 p); + BOOST_MATH_GPU_ENABLED tools::promote_args_t gamma_p_inva(T1 a, T2 p); template - tools::promote_args_t gamma_p_inv(T1 a, T2 p, const Policy&); + BOOST_MATH_GPU_ENABLED tools::promote_args_t gamma_p_inv(T1 a, T2 p, const Policy&); template - tools::promote_args_t gamma_q_inv(T1 a, T2 q); + BOOST_MATH_GPU_ENABLED tools::promote_args_t gamma_q_inv(T1 a, T2 q); template - tools::promote_args_t gamma_q_inv(T1 a, T2 q, const Policy&); + BOOST_MATH_GPU_ENABLED tools::promote_args_t gamma_q_inv(T1 a, T2 q, const Policy&); template - tools::promote_args_t gamma_q_inva(T1 a, T2 q); + BOOST_MATH_GPU_ENABLED tools::promote_args_t gamma_q_inva(T1 a, T2 q); template - tools::promote_args_t gamma_q_inva(T1 a, T2 q, const Policy&); + BOOST_MATH_GPU_ENABLED tools::promote_args_t gamma_q_inva(T1 a, T2 q, const Policy&); // digamma: template @@ -1447,16 +1447,16 @@ namespace boost BOOST_MATH_GPU_ENABLED inline boost::math::tools::promote_args_t gamma_p_derivative(T1 a, T2 x){ return boost::math::gamma_p_derivative(a, x, Policy()); }\ \ template \ - inline boost::math::tools::promote_args_t gamma_p_inv(T1 a, T2 p){ return boost::math::gamma_p_inv(a, p, Policy()); }\ + BOOST_MATH_GPU_ENABLED inline boost::math::tools::promote_args_t gamma_p_inv(T1 a, T2 p){ return boost::math::gamma_p_inv(a, p, Policy()); }\ \ template \ - inline boost::math::tools::promote_args_t gamma_p_inva(T1 a, T2 p){ return boost::math::gamma_p_inva(a, p, Policy()); }\ + BOOST_MATH_GPU_ENABLED inline boost::math::tools::promote_args_t gamma_p_inva(T1 a, T2 p){ return boost::math::gamma_p_inva(a, p, Policy()); }\ \ template \ - inline boost::math::tools::promote_args_t gamma_q_inv(T1 a, T2 q){ return boost::math::gamma_q_inv(a, q, Policy()); }\ + BOOST_MATH_GPU_ENABLED inline boost::math::tools::promote_args_t gamma_q_inv(T1 a, T2 q){ return boost::math::gamma_q_inv(a, q, Policy()); }\ \ template \ - inline boost::math::tools::promote_args_t gamma_q_inva(T1 a, T2 q){ return boost::math::gamma_q_inva(a, q, Policy()); }\ + BOOST_MATH_GPU_ENABLED inline boost::math::tools::promote_args_t gamma_q_inva(T1 a, T2 q){ return boost::math::gamma_q_inva(a, q, Policy()); }\ \ template \ BOOST_MATH_GPU_ENABLED inline boost::math::tools::promote_args_t digamma(T x){ return boost::math::digamma(x, Policy()); }\ diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index 1f444c0048..a2af127630 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -677,6 +677,7 @@ namespace boost{ namespace math{ #include #include #include +#include # define BOOST_MATH_CUDA_ENABLED __host__ __device__ # define BOOST_MATH_HAS_GPU_SUPPORT @@ -802,6 +803,7 @@ BOOST_MATH_GPU_ENABLED constexpr T gpu_safe_max(const T& a, const T& b) { return #define BOOST_MATH_IF_CONSTEXPR if constexpr #define BOOST_MATH_IS_FLOAT(T) (boost::math::is_floating_point::value) #define BOOST_MATH_CONSTEXPR_TABLE_FUNCTION constexpr +#define BOOST_MATH_NO_EXCEPTIONS // This should be defined to nothing but since it is not specifically a math macro // we need to undef before proceeding diff --git a/include/boost/math/tools/fraction.hpp b/include/boost/math/tools/fraction.hpp index e5a31edf65..f36d024c40 100644 --- a/include/boost/math/tools/fraction.hpp +++ b/include/boost/math/tools/fraction.hpp @@ -18,9 +18,6 @@ #include #include #include -#include -#include -#include namespace boost{ namespace math{ namespace tools{ @@ -67,7 +64,7 @@ namespace detail template struct fraction_traits - : public std::conditional< + : public boost::math::conditional< is_pair::value, fraction_traits_pair, fraction_traits_simple>::type @@ -115,7 +112,7 @@ namespace detail { template BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type continued_fraction_b_impl(Gen& g, const U& factor, boost::math::uintmax_t& max_terms) noexcept(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits::result_type) - #ifndef BOOST_MATH_ENABLE_SYCL + #ifndef BOOST_MATH_HAS_GPU_SUPPORT // SYCL can not handle this condition so we only check float on that platform && noexcept(std::declval()()) #endif @@ -167,7 +164,7 @@ BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type template BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, const U& factor, boost::math::uintmax_t& max_terms) noexcept(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits::result_type) - #ifndef BOOST_MATH_ENABLE_SYCL + #ifndef BOOST_MATH_HAS_GPU_SUPPORT && noexcept(std::declval()()) #endif ) @@ -178,19 +175,19 @@ BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type template BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, const U& factor) noexcept(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits::result_type) - #ifndef BOOST_MATH_ENABLE_SYCL + #ifndef BOOST_MATH_HAS_GPU_SUPPORT && noexcept(std::declval()()) #endif ) { - boost::math::uintmax_t max_terms = (std::numeric_limits::max)(); + boost::math::uintmax_t max_terms = (boost::math::numeric_limits::max)(); return detail::continued_fraction_b_impl(g, factor, max_terms); } template BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, int bits) noexcept(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits::result_type) - #ifndef BOOST_MATH_ENABLE_SYCL + #ifndef BOOST_MATH_HAS_GPU_SUPPORT && noexcept(std::declval()()) #endif ) @@ -201,14 +198,14 @@ BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type using result_type = typename traits::result_type; result_type factor = ldexp(1.0f, 1 - bits); // 1 / pow(result_type(2), bits); - boost::math::uintmax_t max_terms = (std::numeric_limits::max)(); + boost::math::uintmax_t max_terms = (boost::math::numeric_limits::max)(); return detail::continued_fraction_b_impl(g, factor, max_terms); } template BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, int bits, boost::math::uintmax_t& max_terms) noexcept(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits::result_type) - #ifndef BOOST_MATH_ENABLE_SYCL + #ifndef BOOST_MATH_HAS_GPU_SUPPORT && noexcept(std::declval()()) #endif ) @@ -241,7 +238,7 @@ namespace detail { template BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type continued_fraction_a_impl(Gen& g, const U& factor, boost::math::uintmax_t& max_terms) noexcept(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits::result_type) - #ifndef BOOST_MATH_ENABLE_SYCL + #ifndef BOOST_MATH_HAS_GPU_SUPPORT && noexcept(std::declval()()) #endif ) @@ -294,7 +291,7 @@ BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type template BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, const U& factor, boost::math::uintmax_t& max_terms) noexcept(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits::result_type) - #ifndef BOOST_MATH_ENABLE_SYCL + #ifndef BOOST_MATH_HAS_GPU_SUPPORT && noexcept(std::declval()()) #endif ) @@ -305,19 +302,19 @@ BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type template BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, const U& factor) noexcept(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits::result_type) - #ifndef BOOST_MATH_ENABLE_SYCL + #ifndef BOOST_MATH_HAS_GPU_SUPPORT && noexcept(std::declval()()) #endif ) { - boost::math::uintmax_t max_iter = (std::numeric_limits::max)(); + boost::math::uintmax_t max_iter = (boost::math::numeric_limits::max)(); return detail::continued_fraction_a_impl(g, factor, max_iter); } template BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, int bits) noexcept(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits::result_type) - #ifndef BOOST_MATH_ENABLE_SYCL + #ifndef BOOST_MATH_HAS_GPU_SUPPORT && noexcept(std::declval()()) #endif ) @@ -328,7 +325,7 @@ BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type typedef typename traits::result_type result_type; result_type factor = ldexp(1.0f, 1-bits); // 1 / pow(result_type(2), bits); - boost::math::uintmax_t max_iter = (std::numeric_limits::max)(); + boost::math::uintmax_t max_iter = (boost::math::numeric_limits::max)(); return detail::continued_fraction_a_impl(g, factor, max_iter); } @@ -336,7 +333,7 @@ BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type template BOOST_MATH_GPU_ENABLED inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, int bits, boost::math::uintmax_t& max_terms) noexcept(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits::result_type) - #ifndef BOOST_MATH_ENABLE_SYCL + #ifndef BOOST_MATH_HAS_GPU_SUPPORT && noexcept(std::declval()()) #endif ) diff --git a/include/boost/math/tools/precision.hpp b/include/boost/math/tools/precision.hpp index 1e4bf58ac0..662657732c 100644 --- a/include/boost/math/tools/precision.hpp +++ b/include/boost/math/tools/precision.hpp @@ -290,7 +290,7 @@ template BOOST_MATH_GPU_ENABLED inline T root_epsilon_imp(const T*, const Tag&) { BOOST_MATH_STD_USING - static const T r_eps = sqrt(tools::epsilon()); + BOOST_MATH_STATIC_LOCAL_VARIABLE const T r_eps = sqrt(tools::epsilon()); return r_eps; } diff --git a/include/boost/math/tools/series.hpp b/include/boost/math/tools/series.hpp index 50f2828bb4..4617ea3df7 100644 --- a/include/boost/math/tools/series.hpp +++ b/include/boost/math/tools/series.hpp @@ -14,6 +14,7 @@ #include #include #include +#include namespace boost{ namespace math{ namespace tools{ diff --git a/include/boost/math/tools/toms748_solve.hpp b/include/boost/math/tools/toms748_solve.hpp index ea93713224..dee2346853 100644 --- a/include/boost/math/tools/toms748_solve.hpp +++ b/include/boost/math/tools/toms748_solve.hpp @@ -1,4 +1,5 @@ // (C) Copyright John Maddock 2006. +// (C) Copyright Matt Borland 2024. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -10,13 +11,13 @@ #pragma once #endif +#include #include +#include +#include +#include #include -#include #include -#include -#include -#include #ifdef BOOST_MATH_LOG_ROOT_ITERATIONS # define BOOST_MATH_LOGGER_INCLUDE @@ -32,29 +33,36 @@ template class eps_tolerance { public: - eps_tolerance() : eps(4 * tools::epsilon()) + BOOST_MATH_GPU_ENABLED eps_tolerance() : eps(4 * tools::epsilon()) { } - eps_tolerance(unsigned bits) + BOOST_MATH_GPU_ENABLED eps_tolerance(unsigned bits) { BOOST_MATH_STD_USING - eps = (std::max)(T(ldexp(1.0F, 1-bits)), T(4 * tools::epsilon())); + eps = BOOST_MATH_GPU_SAFE_MAX(T(ldexp(1.0F, 1-bits)), T(4 * tools::epsilon())); } - bool operator()(const T& a, const T& b) + BOOST_MATH_GPU_ENABLED bool operator()(const T& a, const T& b) { BOOST_MATH_STD_USING - return fabs(a - b) <= (eps * (std::min)(fabs(a), fabs(b))); + return fabs(a - b) <= (eps * BOOST_MATH_GPU_SAFE_MIN(fabs(a), fabs(b))); } private: T eps; }; +// CUDA warns about __host__ __device__ marker on defaulted constructor +// but the warning is benign +#ifdef BOOST_MATH_ENABLE_CUDA +# pragma nv_diag_suppress 20012 +#endif + struct equal_floor { - equal_floor()= default; + BOOST_MATH_GPU_ENABLED equal_floor() = default; + template - bool operator()(const T& a, const T& b) + BOOST_MATH_GPU_ENABLED bool operator()(const T& a, const T& b) { BOOST_MATH_STD_USING return (floor(a) == floor(b)) || (fabs((b-a)/b) < boost::math::tools::epsilon() * 2); @@ -63,9 +71,10 @@ struct equal_floor struct equal_ceil { - equal_ceil()= default; + BOOST_MATH_GPU_ENABLED equal_ceil() = default; + template - bool operator()(const T& a, const T& b) + BOOST_MATH_GPU_ENABLED bool operator()(const T& a, const T& b) { BOOST_MATH_STD_USING return (ceil(a) == ceil(b)) || (fabs((b - a) / b) < boost::math::tools::epsilon() * 2); @@ -74,19 +83,24 @@ struct equal_ceil struct equal_nearest_integer { - equal_nearest_integer()= default; + BOOST_MATH_GPU_ENABLED equal_nearest_integer() = default; + template - bool operator()(const T& a, const T& b) + BOOST_MATH_GPU_ENABLED bool operator()(const T& a, const T& b) { BOOST_MATH_STD_USING return (floor(a + 0.5f) == floor(b + 0.5f)) || (fabs((b - a) / b) < boost::math::tools::epsilon() * 2); } }; +#ifdef BOOST_MATH_ENABLE_CUDA +# pragma nv_diag_default 20012 +#endif + namespace detail{ template -void bracket(F f, T& a, T& b, T c, T& fa, T& fb, T& d, T& fd) +BOOST_MATH_GPU_ENABLED void bracket(F f, T& a, T& b, T c, T& fa, T& fb, T& d, T& fd) { // // Given a point c inside the existing enclosing interval @@ -150,7 +164,7 @@ void bracket(F f, T& a, T& b, T c, T& fa, T& fb, T& d, T& fd) } template -inline T safe_div(T num, T denom, T r) +BOOST_MATH_GPU_ENABLED inline T safe_div(T num, T denom, T r) { // // return num / denom without overflow, @@ -167,7 +181,7 @@ inline T safe_div(T num, T denom, T r) } template -inline T secant_interpolate(const T& a, const T& b, const T& fa, const T& fb) +BOOST_MATH_GPU_ENABLED inline T secant_interpolate(const T& a, const T& b, const T& fa, const T& fb) { // // Performs standard secant interpolation of [a,b] given @@ -188,9 +202,9 @@ inline T secant_interpolate(const T& a, const T& b, const T& fa, const T& fb) } template -T quadratic_interpolate(const T& a, const T& b, T const& d, - const T& fa, const T& fb, T const& fd, - unsigned count) +BOOST_MATH_GPU_ENABLED T quadratic_interpolate(const T& a, const T& b, T const& d, + const T& fa, const T& fb, T const& fd, + unsigned count) { // // Performs quadratic interpolation to determine the next point, @@ -244,9 +258,9 @@ T quadratic_interpolate(const T& a, const T& b, T const& d, } template -T cubic_interpolate(const T& a, const T& b, const T& d, - const T& e, const T& fa, const T& fb, - const T& fd, const T& fe) +BOOST_MATH_GPU_ENABLED T cubic_interpolate(const T& a, const T& b, const T& d, + const T& e, const T& fa, const T& fb, + const T& fd, const T& fe) { // // Uses inverse cubic interpolation of f(x) at points @@ -293,7 +307,7 @@ T cubic_interpolate(const T& a, const T& b, const T& d, } // namespace detail template -std::pair toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, std::uintmax_t& max_iter, const Policy& pol) +BOOST_MATH_GPU_ENABLED boost::math::pair toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, boost::math::uintmax_t& max_iter, const Policy& pol) { // // Main entry point and logic for Toms Algorithm 748 @@ -301,15 +315,15 @@ std::pair toms748_solve(F f, const T& ax, const T& bx, const T& fax, const // BOOST_MATH_STD_USING // For ADL of std math functions - static const char* function = "boost::math::tools::toms748_solve<%1%>"; + constexpr auto function = "boost::math::tools::toms748_solve<%1%>"; // // Sanity check - are we allowed to iterate at all? // if (max_iter == 0) - return std::make_pair(ax, bx); + return boost::math::make_pair(ax, bx); - std::uintmax_t count = max_iter; + boost::math::uintmax_t count = max_iter; T a, b, fa, fb, c, u, fu, a0, b0, d, fd, e, fe; static const T mu = 0.5f; @@ -330,7 +344,7 @@ std::pair toms748_solve(F f, const T& ax, const T& bx, const T& fax, const b = a; else if(fb == 0) a = b; - return std::make_pair(a, b); + return boost::math::make_pair(a, b); } if(boost::math::sign(fa) * boost::math::sign(fb) > 0) @@ -472,37 +486,37 @@ std::pair toms748_solve(F f, const T& ax, const T& bx, const T& fax, const a = b; } BOOST_MATH_LOG_COUNT(max_iter) - return std::make_pair(a, b); + return boost::math::make_pair(a, b); } template -inline std::pair toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, std::uintmax_t& max_iter) +BOOST_MATH_GPU_ENABLED inline boost::math::pair toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, boost::math::uintmax_t& max_iter) { return toms748_solve(f, ax, bx, fax, fbx, tol, max_iter, policies::policy<>()); } template -inline std::pair toms748_solve(F f, const T& ax, const T& bx, Tol tol, std::uintmax_t& max_iter, const Policy& pol) +BOOST_MATH_GPU_ENABLED inline boost::math::pair toms748_solve(F f, const T& ax, const T& bx, Tol tol, boost::math::uintmax_t& max_iter, const Policy& pol) { if (max_iter <= 2) - return std::make_pair(ax, bx); + return boost::math::make_pair(ax, bx); max_iter -= 2; - std::pair r = toms748_solve(f, ax, bx, f(ax), f(bx), tol, max_iter, pol); + boost::math::pair r = toms748_solve(f, ax, bx, f(ax), f(bx), tol, max_iter, pol); max_iter += 2; return r; } template -inline std::pair toms748_solve(F f, const T& ax, const T& bx, Tol tol, std::uintmax_t& max_iter) +BOOST_MATH_GPU_ENABLED inline boost::math::pair toms748_solve(F f, const T& ax, const T& bx, Tol tol, boost::math::uintmax_t& max_iter) { return toms748_solve(f, ax, bx, tol, max_iter, policies::policy<>()); } template -std::pair bracket_and_solve_root(F f, const T& guess, T factor, bool rising, Tol tol, std::uintmax_t& max_iter, const Policy& pol) +BOOST_MATH_GPU_ENABLED boost::math::pair bracket_and_solve_root(F f, const T& guess, T factor, bool rising, Tol tol, boost::math::uintmax_t& max_iter, const Policy& pol) { BOOST_MATH_STD_USING - static const char* function = "boost::math::tools::bracket_and_solve_root<%1%>"; + constexpr auto function = "boost::math::tools::bracket_and_solve_root<%1%>"; // // Set up initial brackets: // @@ -513,7 +527,7 @@ std::pair bracket_and_solve_root(F f, const T& guess, T factor, bool risin // // Set up invocation count: // - std::uintmax_t count = max_iter - 1; + boost::math::uintmax_t count = max_iter - 1; int step = 32; @@ -563,7 +577,7 @@ std::pair bracket_and_solve_root(F f, const T& guess, T factor, bool risin // Escape route just in case the answer is zero! max_iter -= count; max_iter += 1; - return a > 0 ? std::make_pair(T(0), T(a)) : std::make_pair(T(a), T(0)); + return a > 0 ? boost::math::make_pair(T(0), T(a)) : boost::math::make_pair(T(a), T(0)); } if(count == 0) return boost::math::detail::pair_from_single(policies::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", a, pol)); @@ -592,7 +606,7 @@ std::pair bracket_and_solve_root(F f, const T& guess, T factor, bool risin } max_iter -= count; max_iter += 1; - std::pair r = toms748_solve( + boost::math::pair r = toms748_solve( f, (a < 0 ? b : a), (a < 0 ? a : b), @@ -608,7 +622,7 @@ std::pair bracket_and_solve_root(F f, const T& guess, T factor, bool risin } template -inline std::pair bracket_and_solve_root(F f, const T& guess, const T& factor, bool rising, Tol tol, std::uintmax_t& max_iter) +BOOST_MATH_GPU_ENABLED inline boost::math::pair bracket_and_solve_root(F f, const T& guess, const T& factor, bool rising, Tol tol, boost::math::uintmax_t& max_iter) { return bracket_and_solve_root(f, guess, factor, rising, tol, max_iter, policies::policy<>()); } diff --git a/include/boost/math/tools/tuple.hpp b/include/boost/math/tools/tuple.hpp index 6a949d5e5a..82d23b8d77 100644 --- a/include/boost/math/tools/tuple.hpp +++ b/include/boost/math/tools/tuple.hpp @@ -13,6 +13,7 @@ #include #include +#include namespace boost { namespace math { diff --git a/test/cuda_jamfile b/test/cuda_jamfile index 64fac76fba..1fb55da197 100644 --- a/test/cuda_jamfile +++ b/test/cuda_jamfile @@ -34,6 +34,13 @@ run test_cauchy_quan_float.cu ; run test_cauchy_range_support_double.cu ; run test_cauchy_range_support_float.cu ; +run test_chi_squared_cdf_double.cu ; +run test_chi_squared_cdf_float.cu ; +run test_chi_squared_pdf_double.cu ; +run test_chi_squared_pdf_float.cu ; +run test_chi_squared_quan_double.cu ; +run test_chi_squared_quan_float.cu ; + run test_exponential_cdf_double.cu ; run test_exponential_cdf_float.cu ; run test_exponential_pdf_double.cu ; @@ -90,6 +97,13 @@ run test_saspoint5_pdf_float.cu ; run test_saspoint5_quan_double.cu ; run test_saspoint5_quan_float.cu ; +run test_weibull_cdf_double.cu ; +run test_weibull_cdf_float.cu ; +run test_weibull_pdf_double.cu ; +run test_weibull_pdf_float.cu ; +run test_weibull_quan_double.cu ; +run test_weibull_quan_float.cu ; + # Special Functions run test_beta_double.cu ; run test_beta_float.cu ; @@ -153,6 +167,12 @@ run test_lgamma_double.cu ; run test_lgamma_float.cu ; run test_tgamma_double.cu ; run test_tgamma_float.cu ; +run test_tgamma_ratio_double.cu ; +run test_tgamma_ratio_float.cu ; +run test_gamma_p_derivative_double.cu ; +run test_gamma_p_derivative_float.cu ; +run test_gamma_p_inv_double.cu ; +run test_gamma_p_inv_float.cu ; run test_log1p_double.cu ; run test_log1p_float.cu ; diff --git a/test/nvrtc_jamfile b/test/nvrtc_jamfile index de235822ef..4a37960a51 100644 --- a/test/nvrtc_jamfile +++ b/test/nvrtc_jamfile @@ -31,6 +31,13 @@ run test_cauchy_pdf_nvrtc_float.cpp ; run test_cauchy_quan_nvrtc_double.cpp ; run test_cauchy_quan_nvrtc_float.cpp ; +run test_chi_squared_cdf_nvrtc_double.cpp ; +run test_chi_squared_cdf_nvrtc_float.cpp ; +run test_chi_squared_pdf_nvrtc_double.cpp ; +run test_chi_squared_pdf_nvrtc_float.cpp ; +run test_chi_squared_quan_nvrtc_double.cpp ; +run test_chi_squared_quan_nvrtc_float.cpp ; + run test_exponential_cdf_nvrtc_double.cpp ; run test_exponential_cdf_nvrtc_float.cpp ; run test_exponential_pdf_nvrtc_double.cpp ; @@ -87,6 +94,13 @@ run test_saspoint5_pdf_nvrtc_float.cpp ; run test_saspoint5_quan_nvrtc_double.cpp ; run test_saspoint5_quan_nvrtc_float.cpp ; +run test_weibull_cdf_nvrtc_double.cpp ; +run test_weibull_cdf_nvrtc_float.cpp ; +run test_weibull_pdf_nvrtc_double.cpp ; +run test_weibull_pdf_nvrtc_float.cpp ; +run test_weibull_quan_nvrtc_double.cpp ; +run test_weibull_quan_nvrtc_float.cpp ; + # Special Functions run test_beta_nvrtc_double.cpp ; run test_beta_nvrtc_float.cpp ; @@ -148,6 +162,12 @@ run test_fpclassify_nvrtc_float.cpp ; run test_gamma_nvrtc_double.cpp ; run test_gamma_nvrtc_float.cpp ; +run test_gamma_p_derivative_nvrtc_double.cpp ; +run test_gamma_p_derivative_nvrtc_float.cpp ; +run test_gamma_p_inv_nvrtc_double.cpp ; +run test_gamma_p_inv_nvrtc_float.cpp ; +run test_tgamma_ratio_nvrtc_double.cpp ; +run test_tgamma_ratio_nvrtc_float.cpp ; run test_log1p_nvrtc_double.cpp ; run test_log1p_nvrtc_float.cpp ; diff --git a/test/sycl_jamfile b/test/sycl_jamfile index 97c48474ca..2fd5954ae1 100644 --- a/test/sycl_jamfile +++ b/test/sycl_jamfile @@ -13,6 +13,7 @@ project : requirements run test_arcsine.cpp ; run test_bernoulli.cpp ; run test_cauchy.cpp ; +run test_chi_squared.cpp ; run test_exponential_dist.cpp ; run test_extreme_value.cpp ; run test_holtsmark.cpp ; @@ -21,20 +22,35 @@ run test_laplace.cpp ; run test_logistic_dist.cpp ; run test_mapairy.cpp ; run test_saspoint5.cpp ; +run test_weibull.cpp ; # Special Functions run pow_test.cpp ; + run test_beta_simple.cpp ; + run test_bessel_i.cpp ; run test_bessel_j.cpp ; run test_bessel_k.cpp ; run test_bessel_y.cpp ; + run test_cbrt.cpp ; + run test_sign.cpp ; + run test_round.cpp ; + run test_expm1_simple.cpp ; + run test_log1p_simple.cpp ; + run test_digamma_simple.cpp ; + run test_trigamma.cpp ; + run test_erf.cpp ; + run test_gamma.cpp ; +run test_igamma.cpp ; +run test_igamma_inv.cpp ; +run test_igamma_inva.cpp ; diff --git a/test/test_bessel_i.cpp b/test/test_bessel_i.cpp index 70aac91e45..09487ddf1b 100644 --- a/test/test_bessel_i.cpp +++ b/test/test_bessel_i.cpp @@ -10,6 +10,14 @@ #include #endif +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wliteral-range" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-range" +#endif + #include "test_bessel_i.hpp" // diff --git a/test/test_bessel_j.cpp b/test/test_bessel_j.cpp index 516e34c29a..31a64bc579 100644 --- a/test/test_bessel_j.cpp +++ b/test/test_bessel_j.cpp @@ -10,6 +10,14 @@ #include #endif +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wliteral-range" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-range" +#endif + #include "test_bessel_j.hpp" // diff --git a/test/test_bessel_k.cpp b/test/test_bessel_k.cpp index d4ab7721f4..84ba0830f2 100644 --- a/test/test_bessel_k.cpp +++ b/test/test_bessel_k.cpp @@ -17,6 +17,14 @@ // Constants are too big for float case, but this doesn't matter for test. #endif +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wliteral-range" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-range" +#endif + #include "test_bessel_k.hpp" // diff --git a/test/test_bessel_y.cpp b/test/test_bessel_y.cpp index 0bbefba55f..232a903963 100644 --- a/test/test_bessel_y.cpp +++ b/test/test_bessel_y.cpp @@ -10,6 +10,14 @@ #include #endif +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wliteral-range" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-range" +#endif + #include "test_bessel_y.hpp" // diff --git a/test/test_chi_squared.cpp b/test/test_chi_squared.cpp index cc7747a6c0..bfd4b5f3a2 100644 --- a/test/test_chi_squared.cpp +++ b/test/test_chi_squared.cpp @@ -16,9 +16,13 @@ # pragma warning(disable: 4127) // conditional expression is constant #endif -#include // for real_concept +#include +#include "../include_private/boost/math/tools/test.hpp" + +#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS #include // for real_concept using ::boost::math::concepts::real_concept; +#endif #include // for chi_squared_distribution #include // for chi_squared_distribution diff --git a/test/test_chi_squared_cdf_double.cu b/test/test_chi_squared_cdf_double.cu new file mode 100644 index 0000000000..1b0c34ce6b --- /dev/null +++ b/test/test_chi_squared_cdf_double.cu @@ -0,0 +1,109 @@ +// Copyright John Maddock 2016. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include +#include +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef double float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = cdf(boost::math::chi_squared_distribution(1), in1[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + try{ + + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + boost::random::mt19937 gen; + boost::random::uniform_real_distribution dist; + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = dist(gen); + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 512; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + cuda_test<<>>(input_vector1.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + std::cout << "CUDA kernal done in " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + if (err != cudaSuccess) + { + std::cerr << "Failed to launch vectorAdd kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(cdf(boost::math::chi_squared_distribution(1), input_vector1[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 100.0) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + std::cerr << "Error rate was: " << boost::math::epsilon_difference(output_vector[i], results[i]) << "eps" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED with calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/test/test_chi_squared_cdf_float.cu b/test/test_chi_squared_cdf_float.cu new file mode 100644 index 0000000000..8ca99ed2e0 --- /dev/null +++ b/test/test_chi_squared_cdf_float.cu @@ -0,0 +1,109 @@ +// Copyright John Maddock 2016. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include +#include +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef float float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = cdf(boost::math::chi_squared_distribution(1), in1[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + try{ + + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + boost::random::mt19937 gen; + boost::random::uniform_real_distribution dist; + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = dist(gen); + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 512; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + cuda_test<<>>(input_vector1.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + std::cout << "CUDA kernal done in " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + if (err != cudaSuccess) + { + std::cerr << "Failed to launch vectorAdd kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(cdf(boost::math::chi_squared_distribution(1), input_vector1[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 100.0) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + std::cerr << "Error rate was: " << boost::math::epsilon_difference(output_vector[i], results[i]) << "eps" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED with calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/test/test_chi_squared_cdf_nvrtc_double.cpp b/test/test_chi_squared_cdf_nvrtc_double.cpp new file mode 100644 index 0000000000..0ad459fa67 --- /dev/null +++ b/test/test_chi_squared_cdf_nvrtc_double.cpp @@ -0,0 +1,191 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +#include +extern "C" __global__ +void test_chi_squared_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = cdf(boost::math::chi_squared_distribution(1), in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_chi_squared_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_chi_squared_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_chi_squared_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = cdf(boost::math::chi_squared_distribution(1), h_in1[i]); + + if (boost::math::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_chi_squared_cdf_nvrtc_float.cpp b/test/test_chi_squared_cdf_nvrtc_float.cpp new file mode 100644 index 0000000000..1b26c5d6f2 --- /dev/null +++ b/test/test_chi_squared_cdf_nvrtc_float.cpp @@ -0,0 +1,191 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef float float_type; +#include +#include +extern "C" __global__ +void test_chi_squared_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = cdf(boost::math::chi_squared_distribution(1), in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_chi_squared_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_chi_squared_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_chi_squared_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = cdf(boost::math::chi_squared_distribution(1), h_in1[i]); + + if (boost::math::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_chi_squared_pdf_double.cu b/test/test_chi_squared_pdf_double.cu new file mode 100644 index 0000000000..ed45246d3c --- /dev/null +++ b/test/test_chi_squared_pdf_double.cu @@ -0,0 +1,109 @@ +// Copyright John Maddock 2016. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include +#include +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef double float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = pdf(boost::math::chi_squared_distribution(1), in1[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + try{ + + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + boost::random::mt19937 gen; + boost::random::uniform_real_distribution dist; + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = dist(gen); + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 512; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + cuda_test<<>>(input_vector1.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + std::cout << "CUDA kernal done in " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + if (err != cudaSuccess) + { + std::cerr << "Failed to launch vectorAdd kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(pdf(boost::math::chi_squared_distribution(1), input_vector1[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 100.0) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + std::cerr << "Error rate was: " << boost::math::epsilon_difference(output_vector[i], results[i]) << "eps" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED with calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/test/test_chi_squared_pdf_float.cu b/test/test_chi_squared_pdf_float.cu new file mode 100644 index 0000000000..5a0f97db93 --- /dev/null +++ b/test/test_chi_squared_pdf_float.cu @@ -0,0 +1,109 @@ +// Copyright John Maddock 2016. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include +#include +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef float float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = pdf(boost::math::chi_squared_distribution(1), in1[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + try{ + + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + boost::random::mt19937 gen; + boost::random::uniform_real_distribution dist; + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = dist(gen); + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 512; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + cuda_test<<>>(input_vector1.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + std::cout << "CUDA kernal done in " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + if (err != cudaSuccess) + { + std::cerr << "Failed to launch vectorAdd kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(pdf(boost::math::chi_squared_distribution(1), input_vector1[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 100.0) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + std::cerr << "Error rate was: " << boost::math::epsilon_difference(output_vector[i], results[i]) << "eps" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED with calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/test/test_chi_squared_pdf_nvrtc_double.cpp b/test/test_chi_squared_pdf_nvrtc_double.cpp new file mode 100644 index 0000000000..18d14a4b0e --- /dev/null +++ b/test/test_chi_squared_pdf_nvrtc_double.cpp @@ -0,0 +1,191 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +#include +extern "C" __global__ +void test_chi_squared_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = pdf(boost::math::chi_squared_distribution(1), in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_chi_squared_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_chi_squared_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_chi_squared_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = pdf(boost::math::chi_squared_distribution(1), h_in1[i]); + + if (boost::math::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_chi_squared_pdf_nvrtc_float.cpp b/test/test_chi_squared_pdf_nvrtc_float.cpp new file mode 100644 index 0000000000..754cbf7fba --- /dev/null +++ b/test/test_chi_squared_pdf_nvrtc_float.cpp @@ -0,0 +1,191 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef float float_type; +#include +#include +extern "C" __global__ +void test_chi_squared_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = pdf(boost::math::chi_squared_distribution(1), in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_chi_squared_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_chi_squared_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_chi_squared_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = pdf(boost::math::chi_squared_distribution(1), h_in1[i]); + + if (boost::math::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_chi_squared_quan_double.cu b/test/test_chi_squared_quan_double.cu new file mode 100644 index 0000000000..3b7dad972b --- /dev/null +++ b/test/test_chi_squared_quan_double.cu @@ -0,0 +1,109 @@ +// Copyright John Maddock 2016. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include +#include +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef double float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = quantile(boost::math::chi_squared_distribution(1), in1[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + try{ + + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + boost::random::mt19937 gen; + boost::random::uniform_real_distribution dist; + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = dist(gen); + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 512; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + cuda_test<<>>(input_vector1.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + std::cout << "CUDA kernal done in " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + if (err != cudaSuccess) + { + std::cerr << "Failed to launch vectorAdd kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(quantile(boost::math::chi_squared_distribution(1), input_vector1[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 100.0) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + std::cerr << "Error rate was: " << boost::math::epsilon_difference(output_vector[i], results[i]) << "eps" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED with calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/test/test_chi_squared_quan_float.cu b/test/test_chi_squared_quan_float.cu new file mode 100644 index 0000000000..3e779a090f --- /dev/null +++ b/test/test_chi_squared_quan_float.cu @@ -0,0 +1,109 @@ +// Copyright John Maddock 2016. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include +#include +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef float float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = quantile(boost::math::chi_squared_distribution(1), in1[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + try{ + + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + boost::random::mt19937 gen; + boost::random::uniform_real_distribution dist; + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = dist(gen); + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 512; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + cuda_test<<>>(input_vector1.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + std::cout << "CUDA kernal done in " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + if (err != cudaSuccess) + { + std::cerr << "Failed to launch vectorAdd kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(quantile(boost::math::chi_squared_distribution(1), input_vector1[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 100.0) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + std::cerr << "Error rate was: " << boost::math::epsilon_difference(output_vector[i], results[i]) << "eps" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED with calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/test/test_chi_squared_quan_nvrtc_double.cpp b/test/test_chi_squared_quan_nvrtc_double.cpp new file mode 100644 index 0000000000..69b15b6cfd --- /dev/null +++ b/test/test_chi_squared_quan_nvrtc_double.cpp @@ -0,0 +1,191 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +#include +extern "C" __global__ +void test_chi_squared_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = quantile(boost::math::chi_squared_distribution(1), in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_chi_squared_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_chi_squared_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_chi_squared_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = quantile(boost::math::chi_squared_distribution(1), h_in1[i]); + + if (boost::math::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_chi_squared_quan_nvrtc_float.cpp b/test/test_chi_squared_quan_nvrtc_float.cpp new file mode 100644 index 0000000000..d6e1b2a9b5 --- /dev/null +++ b/test/test_chi_squared_quan_nvrtc_float.cpp @@ -0,0 +1,191 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef float float_type; +#include +#include +extern "C" __global__ +void test_chi_squared_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = quantile(boost::math::chi_squared_distribution(1), in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_chi_squared_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_chi_squared_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_chi_squared_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = quantile(boost::math::chi_squared_distribution(1), h_in1[i]); + + if (boost::math::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_gamma_nvrtc_double.cpp b/test/test_gamma_nvrtc_double.cpp index 9302d1190e..9fe2933720 100644 --- a/test/test_gamma_nvrtc_double.cpp +++ b/test/test_gamma_nvrtc_double.cpp @@ -85,9 +85,9 @@ int main() nvrtcAddNameExpression(prog, "test_gamma_kernel"); #ifdef BOOST_MATH_NVRTC_CI_RUN - const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; #else - const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; #endif // Compile the program diff --git a/test/test_gamma_nvrtc_float.cpp b/test/test_gamma_nvrtc_float.cpp index 6e9ba72586..5d34b130ad 100644 --- a/test/test_gamma_nvrtc_float.cpp +++ b/test/test_gamma_nvrtc_float.cpp @@ -87,7 +87,7 @@ int main() #ifdef BOOST_MATH_NVRTC_CI_RUN const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/math/boost-root/libs/math/include/"}; #else - const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; #endif // Compile the program diff --git a/test/test_gamma_p_derivative_double.cu b/test/test_gamma_p_derivative_double.cu new file mode 100644 index 0000000000..566bc1657f --- /dev/null +++ b/test/test_gamma_p_derivative_double.cu @@ -0,0 +1,104 @@ + +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef double float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, const float_type *in2, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = boost::math::gamma_p_derivative(in1[i], in2[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed input vector B + cuda_managed_ptr input_vector2(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = rand()/(float_type)RAND_MAX; + input_vector2[i] = rand()/(float_type)RAND_MAX; + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 256; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + + cuda_test<<>>(input_vector1.get(), input_vector2.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + + std::cout << "CUDA kernal done in: " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + + if (err != cudaSuccess) + { + std::cerr << "Failed to launch CUDA kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(boost::math::gamma_p_derivative(input_vector1[i], input_vector2[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 10) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED, normal calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + + return 0; +} diff --git a/test/test_gamma_p_derivative_float.cu b/test/test_gamma_p_derivative_float.cu new file mode 100644 index 0000000000..f9fd52a50c --- /dev/null +++ b/test/test_gamma_p_derivative_float.cu @@ -0,0 +1,104 @@ + +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef float float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, const float_type *in2, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = boost::math::gamma_p_derivative(in1[i], in2[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed input vector B + cuda_managed_ptr input_vector2(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = rand()/(float_type)RAND_MAX; + input_vector2[i] = rand()/(float_type)RAND_MAX; + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 256; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + + cuda_test<<>>(input_vector1.get(), input_vector2.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + + std::cout << "CUDA kernal done in: " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + + if (err != cudaSuccess) + { + std::cerr << "Failed to launch CUDA kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(boost::math::gamma_p_derivative(input_vector1[i], input_vector2[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 10) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED, normal calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + + return 0; +} diff --git a/test/test_gamma_p_derivative_nvrtc_double.cpp b/test/test_gamma_p_derivative_nvrtc_double.cpp new file mode 100644 index 0000000000..53a752c2df --- /dev/null +++ b/test/test_gamma_p_derivative_nvrtc_double.cpp @@ -0,0 +1,190 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +#include +extern "C" __global__ +void test_gamma_p_derivative_kernel(const float_type *in1, const float_type *in2, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::gamma_p_derivative(in1[i], in2[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_gamma_p_derivative_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_gamma_p_derivative_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_gamma_p_derivative_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1000.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + const auto res = boost::math::gamma_p_derivative(h_in1[i], h_in2[i]); + + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_gamma_p_derivative_nvrtc_float.cpp b/test/test_gamma_p_derivative_nvrtc_float.cpp new file mode 100644 index 0000000000..da9c50855b --- /dev/null +++ b/test/test_gamma_p_derivative_nvrtc_float.cpp @@ -0,0 +1,190 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef float float_type; +#include +#include +extern "C" __global__ +void test_gamma_p_derivative_kernel(const float_type *in1, const float_type *in2, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::gamma_p_derivative(in1[i], in2[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_gamma_p_derivative_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_gamma_p_derivative_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_gamma_p_derivative_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1000.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + const auto res = boost::math::gamma_p_derivative(h_in1[i], h_in2[i]); + + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_gamma_p_inv_double.cu b/test/test_gamma_p_inv_double.cu new file mode 100644 index 0000000000..4392f37d38 --- /dev/null +++ b/test/test_gamma_p_inv_double.cu @@ -0,0 +1,108 @@ + +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef double float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, const float_type *in2, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = boost::math::gamma_p_inv(in1[i], in2[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed input vector B + cuda_managed_ptr input_vector2(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + // Initialize the input vectors + std::mt19937_64 gen(42); + std::uniform_real_distribution dist(0, 1); + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = dist(gen); + input_vector2[i] = dist(gen); + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 256; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + + cuda_test<<>>(input_vector1.get(), input_vector2.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + + std::cout << "CUDA kernal done in: " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + + if (err != cudaSuccess) + { + std::cerr << "Failed to launch CUDA kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(boost::math::gamma_p_inv(input_vector1[i], input_vector2[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 1000) + { + std::cerr << "Result verification failed at element " << i << "!\n" + << "Error found was: " << boost::math::epsilon_difference(output_vector[i], results[i]) << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED, normal calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + + return 0; +} diff --git a/test/test_gamma_p_inv_float.cu b/test/test_gamma_p_inv_float.cu new file mode 100644 index 0000000000..70033686c1 --- /dev/null +++ b/test/test_gamma_p_inv_float.cu @@ -0,0 +1,107 @@ + +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef float float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, const float_type *in2, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = boost::math::gamma_p_inv(in1[i], in2[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed input vector B + cuda_managed_ptr input_vector2(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + // Initialize the input vectors + std::mt19937_64 gen(42); + std::uniform_real_distribution dist(0, 1); + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = dist(gen); + input_vector2[i] = dist(gen); + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 256; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + + cuda_test<<>>(input_vector1.get(), input_vector2.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + + std::cout << "CUDA kernal done in: " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + + if (err != cudaSuccess) + { + std::cerr << "Failed to launch CUDA kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(boost::math::gamma_p_inv(input_vector1[i], input_vector2[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 100) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED, normal calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + + return 0; +} diff --git a/test/test_gamma_p_inv_nvrtc_double.cpp b/test/test_gamma_p_inv_nvrtc_double.cpp new file mode 100644 index 0000000000..d270dbf901 --- /dev/null +++ b/test/test_gamma_p_inv_nvrtc_double.cpp @@ -0,0 +1,190 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +#include +extern "C" __global__ +void test_gamma_p_inv_kernel(const float_type *in1, const float_type *in2, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::gamma_p_inv(in1[i], in2[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_gamma_p_inv_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_gamma_p_inv_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_gamma_p_inv_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + const auto res = boost::math::gamma_p_inv(h_in1[i], h_in2[i]); + + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_gamma_p_inv_nvrtc_float.cpp b/test/test_gamma_p_inv_nvrtc_float.cpp new file mode 100644 index 0000000000..7c844eb682 --- /dev/null +++ b/test/test_gamma_p_inv_nvrtc_float.cpp @@ -0,0 +1,190 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef float float_type; +#include +#include +extern "C" __global__ +void test_gamma_p_inv_kernel(const float_type *in1, const float_type *in2, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::gamma_p_inv(in1[i], in2[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_gamma_p_inv_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_gamma_p_inv_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_gamma_p_inv_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + const auto res = boost::math::gamma_p_inv(h_in1[i], h_in2[i]); + + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_holtsmark.cpp b/test/test_holtsmark.cpp index 6aa3577868..475f5400aa 100644 --- a/test/test_holtsmark.cpp +++ b/test/test_holtsmark.cpp @@ -16,6 +16,14 @@ # include #endif +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wliteral-range" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-range" +#endif + using boost::math::holtsmark_distribution; #ifndef BOOST_MATH_HAS_GPU_SUPPORT diff --git a/test/test_igamma.cpp b/test/test_igamma.cpp index 8e80c772c4..0ad7019963 100644 --- a/test/test_igamma.cpp +++ b/test/test_igamma.cpp @@ -3,7 +3,18 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef SYCL_LANGUAGE_VERSION #include +#endif + +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wliteral-range" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-range" +#endif + #include "test_igamma.hpp" // diff --git a/test/test_igamma.hpp b/test/test_igamma.hpp index b434f727ee..bfe386d4de 100644 --- a/test/test_igamma.hpp +++ b/test/test_igamma.hpp @@ -8,11 +8,12 @@ #include #include +#include #define BOOST_TEST_MAIN #include #include +#include "../include_private/boost/math/tools/test.hpp" #include -#include #include #include #include diff --git a/test/test_igamma_inv.cpp b/test/test_igamma_inv.cpp index eafed0e1da..a88c3666be 100644 --- a/test/test_igamma_inv.cpp +++ b/test/test_igamma_inv.cpp @@ -3,7 +3,18 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef SYCL_LANGUAGE_VERSION #include +#endif + +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wliteral-range" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-range" +#endif + #include "test_igamma_inv.hpp" #if !defined(TEST_FLOAT) && !defined(TEST_DOUBLE) && !defined(TEST_LDOUBLE) && !defined(TEST_REAL_CONCEPT) @@ -89,14 +100,22 @@ void expected_results() "linux.*", // platform largest_type, // test type(s) "[^|]*medium[^|]*", // test data group + #ifdef SYCL_LANGUAGE_VERSION + "[^|]*", 350, 50); + #else "[^|]*", 350, 5); // test function + #endif add_expected_result( "[^|]*", // compiler "[^|]*", // stdlib "linux.*", // platform largest_type, // test type(s) "[^|]*large[^|]*", // test data group + #ifdef SYCL_LANGUAGE_VERSION + "[^|]*", 150, 20); // test function + #else "[^|]*", 150, 5); // test function + #endif // diff --git a/test/test_igamma_inv.hpp b/test/test_igamma_inv.hpp index 7330e918a7..cf481537e7 100644 --- a/test/test_igamma_inv.hpp +++ b/test/test_igamma_inv.hpp @@ -6,13 +6,14 @@ #include #include +#include #define BOOST_TEST_MAIN #include #include #include #include #include -#include +#include "../include_private/boost/math/tools/test.hpp" #include #include #include diff --git a/test/test_igamma_inva.cpp b/test/test_igamma_inva.cpp index 047df11735..8d0e965962 100644 --- a/test/test_igamma_inva.cpp +++ b/test/test_igamma_inva.cpp @@ -3,7 +3,18 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef SYCL_LANGUAGE_VERSION #include +#endif + +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wliteral-range" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-range" +#endif + #include "test_igamma_inva.hpp" #if !defined(TEST_FLOAT) && !defined(TEST_DOUBLE) && !defined(TEST_LDOUBLE) && !defined(TEST_REAL_CONCEPT) diff --git a/test/test_igamma_inva.hpp b/test/test_igamma_inva.hpp index 402ea2f8bc..d9d317da15 100644 --- a/test/test_igamma_inva.hpp +++ b/test/test_igamma_inva.hpp @@ -8,13 +8,14 @@ #include #include +#include #define BOOST_TEST_MAIN #include #include #include #include #include -#include +#include "../include_private/boost/math/tools/test.hpp" #include #include #include diff --git a/test/test_landau.cpp b/test/test_landau.cpp index 297589bc09..1625b21777 100644 --- a/test/test_landau.cpp +++ b/test/test_landau.cpp @@ -15,6 +15,14 @@ # include #endif +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wliteral-range" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-range" +#endif + using boost::math::landau_distribution; #ifndef BOOST_MATH_HAS_GPU_SUPPORT diff --git a/test/test_log1p_nvrtc_double.cpp b/test/test_log1p_nvrtc_double.cpp index 722194be6a..36b0771b1b 100644 --- a/test/test_log1p_nvrtc_double.cpp +++ b/test/test_log1p_nvrtc_double.cpp @@ -85,9 +85,9 @@ int main() nvrtcAddNameExpression(prog, "test_log1p_kernel"); #ifdef BOOST_MATH_NVRTC_CI_RUN - const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; #else - const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; #endif // Compile the program diff --git a/test/test_log1p_nvrtc_float.cpp b/test/test_log1p_nvrtc_float.cpp index 772c50cd10..7194ffb56a 100644 --- a/test/test_log1p_nvrtc_float.cpp +++ b/test/test_log1p_nvrtc_float.cpp @@ -7,6 +7,11 @@ #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #define BOOST_MATH_PROMOTE_DOUBLE_POLICY false +// Must be included first +#include +#include +#include + #include #include #include @@ -14,9 +19,6 @@ #include #include #include -#include -#include -#include typedef float float_type; @@ -85,9 +87,9 @@ int main() nvrtcAddNameExpression(prog, "test_log1p_kernel"); #ifdef BOOST_MATH_NVRTC_CI_RUN - const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; #else - const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; #endif // Compile the program diff --git a/test/test_round.cpp b/test/test_round.cpp index e363efd565..e603aa510d 100644 --- a/test/test_round.cpp +++ b/test/test_round.cpp @@ -7,6 +7,11 @@ #include #endif +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wimplicit-const-int-float-conversion" +#endif + #include #define BOOST_TEST_MAIN #include diff --git a/test/test_tgamma_ratio_double.cu b/test/test_tgamma_ratio_double.cu new file mode 100644 index 0000000000..059e1c3c67 --- /dev/null +++ b/test/test_tgamma_ratio_double.cu @@ -0,0 +1,104 @@ + +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef double float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, const float_type *in2, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = boost::math::tgamma_ratio(in1[i], in2[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed input vector B + cuda_managed_ptr input_vector2(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = rand()/(float_type)RAND_MAX; + input_vector2[i] = rand()/(float_type)RAND_MAX; + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 256; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + + cuda_test<<>>(input_vector1.get(), input_vector2.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + + std::cout << "CUDA kernal done in: " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + + if (err != cudaSuccess) + { + std::cerr << "Failed to launch CUDA kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(boost::math::tgamma_ratio(input_vector1[i], input_vector2[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 10) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED, normal calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + + return 0; +} diff --git a/test/test_tgamma_ratio_float.cu b/test/test_tgamma_ratio_float.cu new file mode 100644 index 0000000000..dc669bd7fb --- /dev/null +++ b/test/test_tgamma_ratio_float.cu @@ -0,0 +1,104 @@ + +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef float float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, const float_type *in2, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = boost::math::tgamma_ratio(in1[i], in2[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed input vector B + cuda_managed_ptr input_vector2(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = rand()/(float_type)RAND_MAX; + input_vector2[i] = rand()/(float_type)RAND_MAX; + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 256; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + + cuda_test<<>>(input_vector1.get(), input_vector2.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + + std::cout << "CUDA kernal done in: " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + + if (err != cudaSuccess) + { + std::cerr << "Failed to launch CUDA kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(boost::math::tgamma_ratio(input_vector1[i], input_vector2[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 10) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED, normal calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + + return 0; +} diff --git a/test/test_tgamma_ratio_nvrtc_double.cpp b/test/test_tgamma_ratio_nvrtc_double.cpp new file mode 100644 index 0000000000..5b0c3b1e67 --- /dev/null +++ b/test/test_tgamma_ratio_nvrtc_double.cpp @@ -0,0 +1,190 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +#include +extern "C" __global__ +void test_tgamma_ratio_kernel(const float_type *in1, const float_type *in2, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::tgamma_ratio(in1[i], in2[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_tgamma_ratio_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_tgamma_ratio_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_tgamma_ratio_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1000.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + const auto res = boost::math::tgamma_ratio(h_in1[i], h_in2[i]); + + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_tgamma_ratio_nvrtc_float.cpp b/test/test_tgamma_ratio_nvrtc_float.cpp new file mode 100644 index 0000000000..ab1bf339b4 --- /dev/null +++ b/test/test_tgamma_ratio_nvrtc_float.cpp @@ -0,0 +1,190 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef float float_type; +#include +#include +extern "C" __global__ +void test_tgamma_ratio_kernel(const float_type *in1, const float_type *in2, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::tgamma_ratio(in1[i], in2[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_tgamma_ratio_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_tgamma_ratio_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_tgamma_ratio_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1000.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + const auto res = boost::math::tgamma_ratio(h_in1[i], h_in2[i]); + + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_weibull.cpp b/test/test_weibull.cpp index 4b31a7f0b7..dc509b742b 100644 --- a/test/test_weibull.cpp +++ b/test/test_weibull.cpp @@ -12,15 +12,17 @@ # pragma warning (disable : 4127) // conditional expression is constant. #endif - +#include +#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS #include // for real_concept +#endif #define BOOST_TEST_MAIN #include // Boost.Test #include #include using boost::math::weibull_distribution; -#include +#include "../include_private/boost/math/tools/test.hpp" #include "test_out_of_range.hpp" #include diff --git a/test/test_weibull_cdf_double.cu b/test/test_weibull_cdf_double.cu new file mode 100644 index 0000000000..65efbe2528 --- /dev/null +++ b/test/test_weibull_cdf_double.cu @@ -0,0 +1,109 @@ +// Copyright John Maddock 2016. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include +#include +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef double float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = cdf(boost::math::weibull_distribution(1), in1[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + try{ + + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + boost::random::mt19937 gen; + boost::random::uniform_real_distribution dist; + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = dist(gen); + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 512; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + cuda_test<<>>(input_vector1.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + std::cout << "CUDA kernal done in " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + if (err != cudaSuccess) + { + std::cerr << "Failed to launch vectorAdd kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(cdf(boost::math::weibull_distribution(1), input_vector1[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 100.0) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + std::cerr << "Error rate was: " << boost::math::epsilon_difference(output_vector[i], results[i]) << "eps" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED with calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/test/test_weibull_cdf_float.cu b/test/test_weibull_cdf_float.cu new file mode 100644 index 0000000000..65c3ce1ffc --- /dev/null +++ b/test/test_weibull_cdf_float.cu @@ -0,0 +1,109 @@ +// Copyright John Maddock 2016. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include +#include +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef float float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = cdf(boost::math::weibull_distribution(1), in1[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + try{ + + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + boost::random::mt19937 gen; + boost::random::uniform_real_distribution dist; + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = dist(gen); + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 512; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + cuda_test<<>>(input_vector1.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + std::cout << "CUDA kernal done in " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + if (err != cudaSuccess) + { + std::cerr << "Failed to launch vectorAdd kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(cdf(boost::math::weibull_distribution(1), input_vector1[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 100.0) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + std::cerr << "Error rate was: " << boost::math::epsilon_difference(output_vector[i], results[i]) << "eps" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED with calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/test/test_weibull_cdf_nvrtc_double.cpp b/test/test_weibull_cdf_nvrtc_double.cpp new file mode 100644 index 0000000000..60d5ff5afb --- /dev/null +++ b/test/test_weibull_cdf_nvrtc_double.cpp @@ -0,0 +1,191 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +#include +extern "C" __global__ +void test_weibull_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = cdf(boost::math::weibull_distribution(1), in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_weibull_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_weibull_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_weibull_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = cdf(boost::math::weibull_distribution(1), h_in1[i]); + + if (boost::math::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_weibull_cdf_nvrtc_float.cpp b/test/test_weibull_cdf_nvrtc_float.cpp new file mode 100644 index 0000000000..5085b2f7dd --- /dev/null +++ b/test/test_weibull_cdf_nvrtc_float.cpp @@ -0,0 +1,191 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef float float_type; +#include +#include +extern "C" __global__ +void test_weibull_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = cdf(boost::math::weibull_distribution(1), in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_weibull_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_weibull_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_weibull_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = cdf(boost::math::weibull_distribution(1), h_in1[i]); + + if (boost::math::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_weibull_pdf_double.cu b/test/test_weibull_pdf_double.cu new file mode 100644 index 0000000000..645df4c0ad --- /dev/null +++ b/test/test_weibull_pdf_double.cu @@ -0,0 +1,109 @@ +// Copyright John Maddock 2016. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include +#include +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef double float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = pdf(boost::math::weibull_distribution(1), in1[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + try{ + + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + boost::random::mt19937 gen; + boost::random::uniform_real_distribution dist; + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = dist(gen); + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 512; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + cuda_test<<>>(input_vector1.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + std::cout << "CUDA kernal done in " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + if (err != cudaSuccess) + { + std::cerr << "Failed to launch vectorAdd kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(pdf(boost::math::weibull_distribution(1), input_vector1[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 100.0) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + std::cerr << "Error rate was: " << boost::math::epsilon_difference(output_vector[i], results[i]) << "eps" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED with calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/test/test_weibull_pdf_float.cu b/test/test_weibull_pdf_float.cu new file mode 100644 index 0000000000..f1e6917f03 --- /dev/null +++ b/test/test_weibull_pdf_float.cu @@ -0,0 +1,109 @@ +// Copyright John Maddock 2016. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include +#include +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef float float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = pdf(boost::math::weibull_distribution(1), in1[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + try{ + + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + boost::random::mt19937 gen; + boost::random::uniform_real_distribution dist; + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = dist(gen); + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 512; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + cuda_test<<>>(input_vector1.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + std::cout << "CUDA kernal done in " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + if (err != cudaSuccess) + { + std::cerr << "Failed to launch vectorAdd kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(pdf(boost::math::weibull_distribution(1), input_vector1[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 100.0) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + std::cerr << "Error rate was: " << boost::math::epsilon_difference(output_vector[i], results[i]) << "eps" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED with calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/test/test_weibull_pdf_nvrtc_double.cpp b/test/test_weibull_pdf_nvrtc_double.cpp new file mode 100644 index 0000000000..2e5e237b20 --- /dev/null +++ b/test/test_weibull_pdf_nvrtc_double.cpp @@ -0,0 +1,191 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +#include +extern "C" __global__ +void test_weibull_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = pdf(boost::math::weibull_distribution(1), in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_weibull_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_weibull_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_weibull_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = pdf(boost::math::weibull_distribution(1), h_in1[i]); + + if (boost::math::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_weibull_pdf_nvrtc_float.cpp b/test/test_weibull_pdf_nvrtc_float.cpp new file mode 100644 index 0000000000..6c3c5202c1 --- /dev/null +++ b/test/test_weibull_pdf_nvrtc_float.cpp @@ -0,0 +1,191 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef float float_type; +#include +#include +extern "C" __global__ +void test_weibull_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = pdf(boost::math::weibull_distribution(1), in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_weibull_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_weibull_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_weibull_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = pdf(boost::math::weibull_distribution(1), h_in1[i]); + + if (boost::math::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_weibull_quan_double.cu b/test/test_weibull_quan_double.cu new file mode 100644 index 0000000000..2f05006022 --- /dev/null +++ b/test/test_weibull_quan_double.cu @@ -0,0 +1,109 @@ +// Copyright John Maddock 2016. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include +#include +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef double float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = quantile(boost::math::weibull_distribution(1), in1[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + try{ + + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + boost::random::mt19937 gen; + boost::random::uniform_real_distribution dist; + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = dist(gen); + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 512; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + cuda_test<<>>(input_vector1.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + std::cout << "CUDA kernal done in " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + if (err != cudaSuccess) + { + std::cerr << "Failed to launch vectorAdd kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(quantile(boost::math::weibull_distribution(1), input_vector1[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 100.0) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + std::cerr << "Error rate was: " << boost::math::epsilon_difference(output_vector[i], results[i]) << "eps" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED with calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/test/test_weibull_quan_float.cu b/test/test_weibull_quan_float.cu new file mode 100644 index 0000000000..3027e14dda --- /dev/null +++ b/test/test_weibull_quan_float.cu @@ -0,0 +1,109 @@ +// Copyright John Maddock 2016. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include +#include +#include +#include +#include +#include +#include "cuda_managed_ptr.hpp" +#include "stopwatch.hpp" + +// For the CUDA runtime routines (prefixed with "cuda_") +#include + +typedef float float_type; + +/** + * CUDA Kernel Device code + * + */ +__global__ void cuda_test(const float_type *in1, float_type *out, int numElements) +{ + using std::cos; + int i = blockDim.x * blockIdx.x + threadIdx.x; + + if (i < numElements) + { + out[i] = quantile(boost::math::weibull_distribution(1), in1[i]); + } +} + +/** + * Host main routine + */ +int main(void) +{ + try{ + + // Error code to check return values for CUDA calls + cudaError_t err = cudaSuccess; + + // Print the vector length to be used, and compute its size + int numElements = 50000; + std::cout << "[Vector operation on " << numElements << " elements]" << std::endl; + + // Allocate the managed input vector A + cuda_managed_ptr input_vector1(numElements); + + // Allocate the managed output vector C + cuda_managed_ptr output_vector(numElements); + + boost::random::mt19937 gen; + boost::random::uniform_real_distribution dist; + // Initialize the input vectors + for (int i = 0; i < numElements; ++i) + { + input_vector1[i] = dist(gen); + } + + // Launch the Vector Add CUDA Kernel + int threadsPerBlock = 512; + int blocksPerGrid =(numElements + threadsPerBlock - 1) / threadsPerBlock; + std::cout << "CUDA kernel launch with " << blocksPerGrid << " blocks of " << threadsPerBlock << " threads" << std::endl; + + watch w; + cuda_test<<>>(input_vector1.get(), output_vector.get(), numElements); + cudaDeviceSynchronize(); + std::cout << "CUDA kernal done in " << w.elapsed() << "s" << std::endl; + + err = cudaGetLastError(); + if (err != cudaSuccess) + { + std::cerr << "Failed to launch vectorAdd kernel (error code " << cudaGetErrorString(err) << ")!" << std::endl; + return EXIT_FAILURE; + } + + // Verify that the result vector is correct + std::vector results; + results.reserve(numElements); + w.reset(); + for(int i = 0; i < numElements; ++i) + results.push_back(quantile(boost::math::weibull_distribution(1), input_vector1[i])); + double t = w.elapsed(); + // check the results + for(int i = 0; i < numElements; ++i) + { + if (boost::math::epsilon_difference(output_vector[i], results[i]) > 100.0) + { + std::cerr << "Result verification failed at element " << i << "!" << std::endl; + std::cerr << "Error rate was: " << boost::math::epsilon_difference(output_vector[i], results[i]) << "eps" << std::endl; + return EXIT_FAILURE; + } + } + + std::cout << "Test PASSED with calculation time: " << t << "s" << std::endl; + std::cout << "Done\n"; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + } + return 0; +} \ No newline at end of file diff --git a/test/test_weibull_quan_nvrtc_double.cpp b/test/test_weibull_quan_nvrtc_double.cpp new file mode 100644 index 0000000000..aed31865e8 --- /dev/null +++ b/test/test_weibull_quan_nvrtc_double.cpp @@ -0,0 +1,191 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +#include +extern "C" __global__ +void test_weibull_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = quantile(boost::math::weibull_distribution(1), in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_weibull_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_weibull_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_weibull_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = quantile(boost::math::weibull_distribution(1), h_in1[i]); + + if (boost::math::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_weibull_quan_nvrtc_float.cpp b/test/test_weibull_quan_nvrtc_float.cpp new file mode 100644 index 0000000000..98997b354b --- /dev/null +++ b/test/test_weibull_quan_nvrtc_float.cpp @@ -0,0 +1,191 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef float float_type; +#include +#include +extern "C" __global__ +void test_weibull_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = quantile(boost::math::weibull_distribution(1), in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_weibull_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_weibull_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_weibull_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = quantile(boost::math::weibull_distribution(1), h_in1[i]); + + if (boost::math::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} From 9a305455b525481f3a3e8217d0f1c83c09af2526 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 27 Aug 2024 17:19:37 -0400 Subject: [PATCH 21/23] Fix policy macro definition for MSVC platforms --- test/test_igamma_inv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_igamma_inv.cpp b/test/test_igamma_inv.cpp index a88c3666be..17e0bfb54f 100644 --- a/test/test_igamma_inv.cpp +++ b/test/test_igamma_inv.cpp @@ -14,7 +14,7 @@ # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wliteral-range" #endif - +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include "test_igamma_inv.hpp" #if !defined(TEST_FLOAT) && !defined(TEST_DOUBLE) && !defined(TEST_LDOUBLE) && !defined(TEST_REAL_CONCEPT) From b86dc439688aa3982f260b8f80a42f83f2c54d3a Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 31 Aug 2024 00:17:57 -0500 Subject: [PATCH 22/23] Don't add quadmath lib for has_128bit_floatmax_t check. It was accidentally copy+pasted. --- test/Jamfile.v2 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 439fbfddbc..901300075e 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -99,11 +99,14 @@ cpp-pch pch_light : pch_light.hpp : /boost/test//boost_unit_test_framework lib compile_test_main : compile_test/main.cpp ; searched-lib quadmath : : shared ; -local float128_type = - [ check-target-builds ../config//has_intel_quad "Intel _Quad datatype support" : -Qoption,cpp,--extended_float_type BOOST_MATH_USE_FLOAT128 ] - [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : gcc:quadmath gcc:BOOST_MATH_TEST_FLOAT128 ] - [ check-target-builds ../config//has_128bit_floatmax_t "128-bit floatmax_t" : gcc:quadmath gcc:BOOST_MATH_TEST_FLOAT128 : no ] - ; + +local float128_type_intel_quad = + [ check-target-builds ../config//has_intel_quad "Intel _Quad datatype support" : -Qoption,cpp,--extended_float_type BOOST_MATH_USE_FLOAT128 ] ; +local float128_type_type_gcc = + [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : gcc:quadmath gcc:BOOST_MATH_TEST_FLOAT128 ] ; +local float128_type_floatmax = + [ check-target-builds ../config//has_128bit_floatmax_t "128-bit floatmax_t" : : no ] ; +local float128_type = $(float128_type_intel_quad) $(float128_type_gcc) $(float128_type_floatmax) ; test-suite special_fun : [ run test_1F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=1 : test_1F0_1 ] # hypergeometric_pFq_checked_series.hpp uses auto, the rest are from quadrature tests. From 52a639fca0b48ff7acfad5dfe9d01032002a8f56 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 31 Aug 2024 13:53:23 -0500 Subject: [PATCH 23/23] Fix incorrect name for float128 type check that caused it to not apear. --- test/Jamfile.v2 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 901300075e..e6814fd867 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -98,15 +98,18 @@ cpp-pch pch : pch.hpp : /boost/test//boost_unit_test_framework ; cpp-pch pch_light : pch_light.hpp : /boost/test//boost_unit_test_framework ; lib compile_test_main : compile_test/main.cpp ; -searched-lib quadmath : : shared ; +searched-lib quadmath ; local float128_type_intel_quad = - [ check-target-builds ../config//has_intel_quad "Intel _Quad datatype support" : -Qoption,cpp,--extended_float_type BOOST_MATH_USE_FLOAT128 ] ; -local float128_type_type_gcc = - [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : gcc:quadmath gcc:BOOST_MATH_TEST_FLOAT128 ] ; + [ check-target-builds ../config//has_intel_quad "Intel _Quad datatype support" + : -Qoption,cpp,--extended_float_type BOOST_MATH_USE_FLOAT128 ] ; +local float128_type_gcc = + [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" + : gcc:quadmath gcc:BOOST_MATH_TEST_FLOAT128 ] ; local float128_type_floatmax = [ check-target-builds ../config//has_128bit_floatmax_t "128-bit floatmax_t" : : no ] ; -local float128_type = $(float128_type_intel_quad) $(float128_type_gcc) $(float128_type_floatmax) ; +local float128_type = + $(float128_type_intel_quad) $(float128_type_gcc) $(float128_type_floatmax) ; test-suite special_fun : [ run test_1F0.cpp /boost/test//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] TEST=1 : test_1F0_1 ] # hypergeometric_pFq_checked_series.hpp uses auto, the rest are from quadrature tests.