diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/boost/libs/math/config | |
parent | Initial commit. (diff) | |
download | ceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/math/config')
-rw-r--r-- | src/boost/libs/math/config/Jamfile.v2 | 54 | ||||
-rw-r--r-- | src/boost/libs/math/config/has_128bit_floatmax_t.cpp | 18 | ||||
-rw-r--r-- | src/boost/libs/math/config/has_fftw3.cpp | 19 | ||||
-rw-r--r-- | src/boost/libs/math/config/has_float128.cpp | 17 | ||||
-rw-r--r-- | src/boost/libs/math/config/has_gcc_visibility.cpp | 13 | ||||
-rw-r--r-- | src/boost/libs/math/config/has_gmp.cpp | 33 | ||||
-rw-r--r-- | src/boost/libs/math/config/has_gmpxx.cpp | 7 | ||||
-rw-r--r-- | src/boost/libs/math/config/has_intel_quad.cpp | 16 | ||||
-rw-r--r-- | src/boost/libs/math/config/has_long_double_support.cpp | 10 | ||||
-rw-r--r-- | src/boost/libs/math/config/has_mpfr.cpp | 47 | ||||
-rw-r--r-- | src/boost/libs/math/config/has_mpfr_class.cpp | 15 | ||||
-rw-r--r-- | src/boost/libs/math/config/has_mpreal.cpp | 14 | ||||
-rw-r--r-- | src/boost/libs/math/config/has_ntl_rr.cpp | 12 | ||||
-rw-r--r-- | src/boost/libs/math/config/is_ci_sanitizer_run.cpp | 13 | ||||
-rw-r--r-- | src/boost/libs/math/config/is_ci_standalone_run.cpp | 13 | ||||
-rw-r--r-- | src/boost/libs/math/config/is_cygwin_run.cpp | 13 |
16 files changed, 314 insertions, 0 deletions
diff --git a/src/boost/libs/math/config/Jamfile.v2 b/src/boost/libs/math/config/Jamfile.v2 new file mode 100644 index 000000000..77aca7c2e --- /dev/null +++ b/src/boost/libs/math/config/Jamfile.v2 @@ -0,0 +1,54 @@ +# copyright John Maddock 2008 +# 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 modules ; +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 ; + +obj has_long_double_support : has_long_double_support.cpp ; +obj has_mpfr_class : has_mpfr_class.cpp : + <include>$(gmp_path) <include>$(gmp_path)/mpfr <include>$(gmp_path)/gmpfrxx ; +obj has_mpreal : has_mpreal.cpp : + <include>$(gmp_path) <include>$(gmp_path)/mpfr <include>$(gmp_path)/mpfrc++ ; +obj has_ntl_rr : has_ntl_rr.cpp : <include>$(ntl-path)/include ; +obj has_gmpxx : has_gmpxx.cpp : + <include>$(gmp_path) <include>$(gmp_path)/mpfr <include>$(gmp_path)/gmpfrxx ; +obj has_gcc_visibility : has_gcc_visibility.cpp : + <toolset>gcc:<cxxflags>-fvisibility=hidden <toolset>gcc:<cxxflags>-Werror ; +exe has_float128 : has_float128.cpp quadmath ; +exe has_fftw3 : has_fftw3.cpp fftw3 fftw3f fftw3l ; +exe has_intel_quad : has_intel_quad.cpp : <cxxflags>-Qoption,cpp,--extended_float_type ; +obj has_128bit_floatmax_t : has_128bit_floatmax_t.cpp ; +obj has_mpfr : has_mpfr.cpp : + <include>$(gmp_path) <include>$(gmp_path)/mpfr <include>$(gmp_path)/gmpfrxx ; +obj has_gmp : has_gmp.cpp : + <include>$(gmp_path) <include>$(gmp_path)/mpfr <include>$(gmp_path)/gmpfrxx ; +obj is_ci_sanitizer_run : is_ci_sanitizer_run.cpp ; +obj is_ci_standalone_run : is_ci_standalone_run.cpp ; +obj is_cygwin_run : is_cygwin_run.cpp ; + +explicit has_long_double_support ; +explicit has_mpfr_class ; +explicit has_mpfr ; +explicit has_gmp ; +explicit has_mpreal ; +explicit has_ntl_rr ; +explicit has_gmpxx ; +explicit has_gcc_visibility ; +explicit has_float128 ; +explicit has_intel_quad ; +explicit has_128bit_floatmax_t ; +explicit has_fftw3 ; +explicit is_ci_sanitizer_run ; +explicit is_ci_standalone_run ; +explicit is_cygwin_run ; diff --git a/src/boost/libs/math/config/has_128bit_floatmax_t.cpp b/src/boost/libs/math/config/has_128bit_floatmax_t.cpp new file mode 100644 index 000000000..e11b84c25 --- /dev/null +++ b/src/boost/libs/math/config/has_128bit_floatmax_t.cpp @@ -0,0 +1,18 @@ +// Copyright John Maddock 2014. +// 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 <boost/cstdfloat.hpp> + +#ifndef BOOST_FLOAT128_C +#error "There is no 128 bit floating point type" +#endif + +static_assert(sizeof(boost::floatmax_t) * CHAR_BIT == 128, "floatmax_t is not a 128-bit floating point type"); + +int main() +{ + return 0; +} + diff --git a/src/boost/libs/math/config/has_fftw3.cpp b/src/boost/libs/math/config/has_fftw3.cpp new file mode 100644 index 000000000..804568570 --- /dev/null +++ b/src/boost/libs/math/config/has_fftw3.cpp @@ -0,0 +1,19 @@ +// Copyright John Maddock 2017. +// 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 <fftw3.h> + +int main() +{ + fftwq_plan plan; // early versions don't have this it seems. + + fftw_cleanup(); + fftwf_cleanup(); + fftwl_cleanup(); + + + return 0; +} + diff --git a/src/boost/libs/math/config/has_float128.cpp b/src/boost/libs/math/config/has_float128.cpp new file mode 100644 index 000000000..60a2e2e48 --- /dev/null +++ b/src/boost/libs/math/config/has_float128.cpp @@ -0,0 +1,17 @@ +// Copyright John Maddock 2013. +// 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) + +extern "C" { +#include <quadmath.h> +} + +int main() +{ + __float128 f = -2.0Q; + f = fabsq(f); + + return 0; +} + diff --git a/src/boost/libs/math/config/has_gcc_visibility.cpp b/src/boost/libs/math/config/has_gcc_visibility.cpp new file mode 100644 index 000000000..6c7d6f915 --- /dev/null +++ b/src/boost/libs/math/config/has_gcc_visibility.cpp @@ -0,0 +1,13 @@ +// Copyright John Maddock 20010. +// 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) + +#ifndef __GNUC__ +# error "This is a GCC specific test case". +#endif + +int main() +{ + return 0; +} diff --git a/src/boost/libs/math/config/has_gmp.cpp b/src/boost/libs/math/config/has_gmp.cpp new file mode 100644 index 000000000..196b6e2f3 --- /dev/null +++ b/src/boost/libs/math/config/has_gmp.cpp @@ -0,0 +1,33 @@ +// Copyright John Maddock 2008. +// 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 <cstddef> // See https://gcc.gnu.org/gcc-4.9/porting_to.html +#include <gmp.h> +#include <boost/config.hpp> + +#ifdef __GNUC__ +#pragma message "__GNU_MP_VERSION=" BOOST_STRINGIZE(__GNU_MP_VERSION) +#pragma message "__GNU_MP_VERSION_MINOR=" BOOST_STRINGIZE(__GNU_MP_VERSION_MINOR) +#endif + +#if (__GNU_MP_VERSION < 4) || ((__GNU_MP_VERSION == 4) && (__GNU_MP_VERSION_MINOR < 2)) +#error "Incompatible GMP version" +#endif + +int main() +{ + void* (*alloc_func_ptr)(size_t); + void* (*realloc_func_ptr)(void*, size_t, size_t); + void (*free_func_ptr)(void*, size_t); + + mp_get_memory_functions(&alloc_func_ptr, &realloc_func_ptr, &free_func_ptr); + + mpz_t integ; + mpz_init(integ); + if (integ[0]._mp_d) + mpz_clear(integ); + + return 0; +} diff --git a/src/boost/libs/math/config/has_gmpxx.cpp b/src/boost/libs/math/config/has_gmpxx.cpp new file mode 100644 index 000000000..edf62d8c7 --- /dev/null +++ b/src/boost/libs/math/config/has_gmpxx.cpp @@ -0,0 +1,7 @@ +// Copyright John Maddock 2008. +// 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 <gmpxx.h> + diff --git a/src/boost/libs/math/config/has_intel_quad.cpp b/src/boost/libs/math/config/has_intel_quad.cpp new file mode 100644 index 000000000..a2db80cc5 --- /dev/null +++ b/src/boost/libs/math/config/has_intel_quad.cpp @@ -0,0 +1,16 @@ +// Copyright John Maddock 2013. +// 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) + +extern "C" _Quad __fabs(_Quad); + +int main() +{ + _Quad f = -2.0Q; + f = __fabsq(f); + + return 0; +} + + diff --git a/src/boost/libs/math/config/has_long_double_support.cpp b/src/boost/libs/math/config/has_long_double_support.cpp new file mode 100644 index 000000000..9cbf235f7 --- /dev/null +++ b/src/boost/libs/math/config/has_long_double_support.cpp @@ -0,0 +1,10 @@ +// Copyright John Maddock 2008. +// 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 <boost/math/tools/config.hpp> + +#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +#error "long double support is not supported by Boost.Math on this Platform: the long double version of the TR1 library will not be built." +#endif diff --git a/src/boost/libs/math/config/has_mpfr.cpp b/src/boost/libs/math/config/has_mpfr.cpp new file mode 100644 index 000000000..c82f28d7d --- /dev/null +++ b/src/boost/libs/math/config/has_mpfr.cpp @@ -0,0 +1,47 @@ +// Copyright John Maddock 2012. +// 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 <cstddef> // See https://gcc.gnu.org/gcc-4.9/porting_to.html +#include <mpfr.h> +#include <boost/config.hpp> + +#ifdef __GNUC__ +#pragma message "MPFR_VERSION_STRING=" MPFR_VERSION_STRING +#endif + +#if (__GNU_MP_VERSION < 4) || ((__GNU_MP_VERSION == 4) && (__GNU_MP_VERSION_MINOR < 2)) +#error "Incompatible GMP version" +#endif + +#if (MPFR_VERSION < 3) +#error "Incompatible MPFR version" +#endif + +#ifdef __GNUC__ +#pragma message "__GNU_MP_VERSION=" BOOST_STRINGIZE(__GNU_MP_VERSION) +#pragma message "__GNU_MP_VERSION_MINOR=" BOOST_STRINGIZE(__GNU_MP_VERSION_MINOR) +#endif + +#if (__GNU_MP_VERSION < 4) || ((__GNU_MP_VERSION == 4) && (__GNU_MP_VERSION_MINOR < 2)) +#error "Incompatible GMP version" +#endif + +int main() +{ + void* (*alloc_func_ptr)(size_t); + void* (*realloc_func_ptr)(void*, size_t, size_t); + void (*free_func_ptr)(void*, size_t); + + mp_get_memory_functions(&alloc_func_ptr, &realloc_func_ptr, &free_func_ptr); + + mpfr_buildopt_tls_p(); + + mpfr_t t; + mpfr_init2(t, 128); + if (t[0]._mpfr_d) + mpfr_clear(t); + + return 0; +} diff --git a/src/boost/libs/math/config/has_mpfr_class.cpp b/src/boost/libs/math/config/has_mpfr_class.cpp new file mode 100644 index 000000000..15a6644f0 --- /dev/null +++ b/src/boost/libs/math/config/has_mpfr_class.cpp @@ -0,0 +1,15 @@ +// Copyright John Maddock 2008. +// Copyright Paul A. Bristow 2009 +// 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) + +#ifdef _MSC_VER +# pragma warning (disable : 4127) // conditional expression is constant +# pragma warning (disable : 4800) // 'int' : forcing value to bool 'true' or 'false' (performance warning) +# pragma warning (disable : 4512) // assignment operator could not be generated +#endif + +#include <cstddef> +#include <gmpfrxx.h> + diff --git a/src/boost/libs/math/config/has_mpreal.cpp b/src/boost/libs/math/config/has_mpreal.cpp new file mode 100644 index 000000000..f0d562a77 --- /dev/null +++ b/src/boost/libs/math/config/has_mpreal.cpp @@ -0,0 +1,14 @@ +// Copyright John Maddock 2008. +// Copyright Paul A. Bristow 2009 +// 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) + +#ifdef _MSC_VER +# pragma warning (disable : 4127) // conditional expression is constant +# pragma warning (disable : 4800) // 'int' : forcing value to bool 'true' or 'false' (performance warning) +# pragma warning (disable : 4512) // assignment operator could not be generated +#endif + +#include <mpreal.h> + diff --git a/src/boost/libs/math/config/has_ntl_rr.cpp b/src/boost/libs/math/config/has_ntl_rr.cpp new file mode 100644 index 000000000..f3844217e --- /dev/null +++ b/src/boost/libs/math/config/has_ntl_rr.cpp @@ -0,0 +1,12 @@ +// Copyright John Maddock 2008. +// 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) + + +#ifdef _MSC_VER +# pragma warning (disable : 4100) // unreferenced formal parameter +#endif + +#include <NTL/RR.h> + diff --git a/src/boost/libs/math/config/is_ci_sanitizer_run.cpp b/src/boost/libs/math/config/is_ci_sanitizer_run.cpp new file mode 100644 index 000000000..68eedfe67 --- /dev/null +++ b/src/boost/libs/math/config/is_ci_sanitizer_run.cpp @@ -0,0 +1,13 @@ +// Copyright John Maddock 20021. +// 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) + +#if !defined(BOOST_CI_SANITIZER_BUILD) +# error "Sanitizer is NOT in effect". +#endif + +int main() +{ + return 0; +} diff --git a/src/boost/libs/math/config/is_ci_standalone_run.cpp b/src/boost/libs/math/config/is_ci_standalone_run.cpp new file mode 100644 index 000000000..b44591136 --- /dev/null +++ b/src/boost/libs/math/config/is_ci_standalone_run.cpp @@ -0,0 +1,13 @@ +// Copyright Matt Borland 2022. +// 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) + +#ifndef BOOST_MATH_STANDALONE +# error "Standalone is NOT in effect". +#endif + +int main() +{ + return 0; +} diff --git a/src/boost/libs/math/config/is_cygwin_run.cpp b/src/boost/libs/math/config/is_cygwin_run.cpp new file mode 100644 index 000000000..d314ac327 --- /dev/null +++ b/src/boost/libs/math/config/is_cygwin_run.cpp @@ -0,0 +1,13 @@ +// Copyright Matt Borland 2022. +// 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) + +#ifndef __CYGWIN__ +# error "Cygwin run is NOT in effect". +#endif + +int main() +{ + return 0; +} |