2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00
Files
math/reporting/accuracy/Jamfile.v2
René Ferdinand Rivera Morell 41f07b0794 Add support for modular build structure. (#1160)
* Make the library modular usable.

* Fix -Wundef warnings

* Switch to library requirements instead of source. As source puts extra source in install targets.

* Add missing NO_LIB usage requirements.

* Remove boost-root relative include path.

* Add missing import-search for cconfig/predef checks.

* Add requires-b2 check to top-level build file.

* Sync upstream.

* Fix typo in test framework reference.

* Bump B2 require to 5.2

* Update copyright dates.

* Move inter-lib dependencies to a project variable and into the build targets.

* Switch to /boost/test//included target for header only mode of Boost.Test.

* Adjust doc build to avoid boost-root references.

* Update build deps.

* Fix project props not applying to the no_eh.obj compile.

* Update build deps.

* Add missing import-search.

* 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.

* 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

* Fix policy macro definition for MSVC platforms

* Don't add quadmath lib for has_128bit_floatmax_t check. It was accidentally copy+pasted.

* Fix incorrect name for float128 type check that caused it to not apear.

---------

Co-authored-by: Matt Borland <matt@mattborland.com>
2024-09-06 08:45:23 -04:00

185 lines
8.8 KiB
Plaintext

# Copyright Daryle Walker, Hubert Holin, John Maddock 2006 - 2007
# copyright Paul A. Bristow 2006 - 2010
# 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,
# and build math examples.
# bring in the rules for testing
import testing ;
import modules ;
import path ;
import pch ;
import-search /boost/config/checks ;
import config : requires ;
using quickbook ;
using auto-index ;
project
: requirements
<include>../../include_private
;
if $(is_unix)
{
local osname = [ SHELL uname ] ;
switch $(osname)
{
case "Sun*" : OTHERFLAGS = "-lpthread -lrt" ;
case "*BSD*" : OTHERFLAGS = "-lpthread" ;
}
}
#
# Configuration first:
#
lib gsl ;
lib gslcblas ;
lib Rmath ;
obj has_cxx17_cmath : has_cxx17_cmath.cpp ;
explicit has_cxx17_cmath ;
obj has_c99_cmath : has_c99_cmath.cpp ;
explicit has_c99_cmath ;
exe has_gsl : has_gsl.cpp gsl gslcblas ;
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
sqrt.c floor.c setprec.c mtherr.c ;
path-constant here : . ;
make $(here)/third_party/cephes_double/acosh.c : : @check_exists ;
actions check_exists
{
stat $(<)
}
explicit $(here)/third_party/cephes_double/acosh.c ;
lib cephes_double : $(here)/third_party/cephes_double/$(CEPHES_SOURCE)
:
release
<link>static
[ check-target-builds $(here)/third_party/cephes_double/acosh.c : : <build>no ]
;
explicit cephes_double ;
rule all-tests {
local result ;
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 : <define>ALWAYS_TEST_DOUBLE : ]
<target-os>linux:<linkflags>-lpthread
<target-os>linux:<linkflags>-lrt
<toolset>gcc:<linkflags>$(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 : <define>TEST_CXX17_CMATH : <build>no ]
<target-os>linux:<linkflags>-lpthread
<target-os>linux:<linkflags>-lrt
<toolset>gcc:<linkflags>$(OTHERFLAGS)
: $(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 : <define>TEST_C99 : <build>no ]
<target-os>linux:<linkflags>-lpthread
<target-os>linux:<linkflags>-lrt
<toolset>gcc:<linkflags>$(OTHERFLAGS)
: $(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 : <define>TEST_GSL : <build>no ]
<target-os>linux:<linkflags>-lpthread
<target-os>linux:<linkflags>-lrt
<toolset>gcc:<linkflags>$(OTHERFLAGS)
: $(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 : <define>TEST_RMATH : <build>no ]
<target-os>linux:<linkflags>-lpthread
<target-os>linux:<linkflags>-lrt
<toolset>gcc:<linkflags>$(OTHERFLAGS)
: $(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 : <define>TEST_CEPHES <source>cephes_double : <build>no ]
<target-os>linux:<linkflags>-lpthread
<target-os>linux:<linkflags>-lrt
<toolset>gcc:<linkflags>$(OTHERFLAGS)
: $(source:B)_cephes ]
;
}
return $(result) ;
}
test-suite report_gen : [ all-tests ] ;
path-constant images_location : html ;
path-constant here : . ;
xml report : doc/report.qbk : <dependency>report_gen ;
boostbook standalone
:
report
:
# Path for links to Boost:
<xsl:param>boost.root=../../../../..
# Some general style settings:
<xsl:param>table.footnote.number.format=1
<xsl:param>footnote.number.format=1
<xsl:param>html.stylesheet=http://www.boost.org/doc/libs/1_58_0/doc/src/boostbook.css
# HTML options first:
# Use graphics not text for navigation:
<xsl:param>navig.graphics=1
# How far down we chunk nested sections, basically all of them:
<xsl:param>chunk.section.depth=0
# Don't put the first section on the same page as the TOC:
<xsl:param>chunk.first.sections=0
# How far down sections get TOC's
<xsl:param>toc.section.depth=2
# Max depth in each TOC:
<xsl:param>toc.max.depth=4
# How far down we go with TOC's
<xsl:param>generate.section.toc.level=10
;
searched-lib gmp : : <link>shared ;
searched-lib mpfr : : <link>shared ;
searched-lib quadmath : : <link>shared ;
#
# Some manual tests that are expensive to run:
#
run erf_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp : : : release <cxxstd>17 [ check-target-builds ../../config//has_mpfr : : <build>no ] : erf_error_plot_double ;
explicit erf_error_plot_double ;
run erf_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp : : : release <cxxstd>17 <define>TEST_TYPE="\"long double\"" [ check-target-builds ../../config//has_mpfr : : <build>no ] : erf_error_plot_long_double ;
explicit erf_error_plot_long_double ;
run erf_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp : : : release <cxxstd>17 <define>TEST_TYPE=cpp_bin_float_50 [ check-target-builds ../../config//has_mpfr : : <build>no ] : erf_error_plot_cpp_bin_float_50 ;
explicit erf_error_plot_cpp_bin_float_50 ;
run erf_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp quadmath : : : release <cxxstd>17 <cxxstd-dialect>gnu <define>TEST_TYPE=float128 [ check-target-builds ../../config//has_mpfr : : <build>no ] : erf_error_plot_float128 ;
explicit erf_error_plot_cpp_bin_float_50 ;
run erfc_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp : : : release <cxxstd>17 [ check-target-builds ../../config//has_mpfr : : <build>no ] : erfc_error_plot_double ;
explicit erfc_error_plot_double ;
run erfc_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp : : : release <cxxstd>17 <define>TEST_TYPE="\"long double\"" [ check-target-builds ../../config//has_mpfr : : <build>no ] : erfc_error_plot_long_double ;
explicit erfc_error_plot_long_double ;
run erfc_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp : : : release <cxxstd>17 <define>TEST_TYPE=cpp_bin_float_50 [ check-target-builds ../../config//has_mpfr : : <build>no ] : erfc_error_plot_cpp_bin_float_50 ;
explicit erfc_error_plot_cpp_bin_float_50 ;
run erfc_error_plot.cpp /boost/multiprecision//boost_multiprecision mpfr gmp quadmath : : : release <cxxstd>17 <cxxstd-dialect>gnu <define>TEST_TYPE=float128 [ check-target-builds ../../config//has_mpfr : : <build>no ] : erfc_error_plot_float128 ;
explicit erfc_error_plot_cpp_bin_float_50 ;