diff options
author | Tobias Markmann <tm@ayena.de> | 2014-10-19 20:22:58 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2014-10-20 13:49:33 (GMT) |
commit | 6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch) | |
tree | 2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/math/tools | |
parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
download | swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2 |
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0.
Updated our update.sh script to stop on error.
Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to
missing include of <iostream> with newer Boost.
Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/math/tools')
-rw-r--r-- | 3rdParty/Boost/src/boost/math/tools/config.hpp | 107 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/math/tools/promotion.hpp | 27 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/math/tools/user.hpp | 8 |
3 files changed, 121 insertions, 21 deletions
diff --git a/3rdParty/Boost/src/boost/math/tools/config.hpp b/3rdParty/Boost/src/boost/math/tools/config.hpp index b1fcd13..4ec5768 100644 --- a/3rdParty/Boost/src/boost/math/tools/config.hpp +++ b/3rdParty/Boost/src/boost/math/tools/config.hpp @@ -13,6 +13,7 @@ #include <boost/config.hpp> #include <boost/cstdint.hpp> // for boost::uintmax_t #include <boost/detail/workaround.hpp> +#include <boost/type_traits/is_integral.hpp> #include <algorithm> // for min and max #include <boost/config/no_tr1/cmath.hpp> #include <climits> @@ -20,9 +21,11 @@ #if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) # include <math.h> #endif +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# include <limits> +#endif #include <boost/math/tools/user.hpp> -#include <boost/math/special_functions/detail/round_fwd.hpp> #if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \ || (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \ @@ -99,13 +102,18 @@ # define BOOST_MATH_USE_C99 #endif +#if defined(_LIBCPP_VERSION) && !defined(_MSC_VER) +# define BOOST_MATH_USE_C99 +#endif + #if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \ || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \ - || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99)) + || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))\ + || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) # define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY #endif -#if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) +#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) # include "boost/type.hpp" # include "boost/non_type.hpp" @@ -139,12 +147,12 @@ # define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) -#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +#endif // __SUNPRO_CC #if (defined(__SUNPRO_CC) || defined(__hppa) || defined(__GNUC__)) && !defined(BOOST_MATH_SMALL_CONSTANT) // Sun's compiler emits a hard error if a constant underflows, // as does aCC on PA-RISC, while gcc issues a large number of warnings: -# define BOOST_MATH_SMALL_CONSTANT(x) 0 +# define BOOST_MATH_SMALL_CONSTANT(x) 0.0 #else # define BOOST_MATH_SMALL_CONSTANT(x) x #endif @@ -203,6 +211,37 @@ #ifndef BOOST_MATH_INT_VALUE_SUFFIX # define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF #endif +// +// Test whether to support __float128: +// +#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__) \ + && !defined(BOOST_MATH_DISABLE_FLOAT128) || defined(BOOST_MATH_USE_FLOAT128) +// +// Only enable this when the compiler really is GCC as clang and probably +// intel too don't support __float128 yet :-( +// +#ifndef BOOST_MATH_USE_FLOAT128 +# define BOOST_MATH_USE_FLOAT128 +#endif + +# if defined(BOOST_INTEL) && defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION >= 1310) && defined(__GNUC__) +# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) +# define BOOST_MATH_FLOAT128_TYPE __float128 +# endif +# elif defined(__GNUC__) +# define BOOST_MATH_FLOAT128_TYPE __float128 +# endif + +# ifndef BOOST_MATH_FLOAT128_TYPE +# define BOOST_MATH_FLOAT128_TYPE _Quad +# endif +#endif +// +// Check for WinCE with no iostream support: +// +#if defined(_WIN32_WCE) && !defined(__SGI_STL_PORT) +# define BOOST_MATH_NO_LEXICAL_CAST +#endif // // Helper macro for controlling the FP behaviour: @@ -213,7 +252,7 @@ // // Helper macro for using statements: // -#define BOOST_MATH_STD_USING \ +#define BOOST_MATH_STD_USING_CORE \ using std::abs;\ using std::acos;\ using std::cos;\ @@ -236,15 +275,9 @@ using std::ceil;\ using std::floor;\ using std::log10;\ - using std::sqrt;\ - using boost::math::round;\ - using boost::math::iround;\ - using boost::math::lround;\ - using boost::math::trunc;\ - using boost::math::itrunc;\ - using boost::math::ltrunc;\ - using boost::math::modf; + using std::sqrt; +#define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE namespace boost{ namespace math{ namespace tools @@ -269,9 +302,35 @@ void suppress_unused_variable_warning(const T&) { } +namespace detail{ + +template <class T> +struct is_integer_for_rounding +{ + static const bool value = boost::is_integral<T>::value +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + || (std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer) +#endif + ; +}; + +} + }} // namespace boost namespace math -#if ((defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H) +#ifdef __GLIBC_PREREQ +# if __GLIBC_PREREQ(2,14) +# define BOOST_MATH_HAVE_FIXED_GLIBC +# endif +#endif + +#if ((defined(__linux__) && !defined(__UCLIBC__) && !defined(BOOST_MATH_HAVE_FIXED_GLIBC)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H) +// +// This code was introduced in response to this glibc bug: http://sourceware.org/bugzilla/show_bug.cgi?id=2445 +// Basically powl and expl can return garbage when the result is small and certain exception flags are set +// on entrance to these functions. This appears to have been fixed in Glibc 2.14 (May 2011). +// Much more information in this message thread: https://groups.google.com/forum/#!topic/boost-list/ZT99wtIFlb4 +// #include <boost/detail/fenv.hpp> @@ -314,12 +373,20 @@ namespace boost{ namespace math{ #endif #ifdef BOOST_MATH_INSTRUMENT -#define BOOST_MATH_INSTRUMENT_CODE(x) \ - std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl; -#define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name) + +# include <iostream> +# include <iomanip> +# include <typeinfo> + +# define BOOST_MATH_INSTRUMENT_CODE(x) \ + std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl; +# define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name) + #else -#define BOOST_MATH_INSTRUMENT_CODE(x) -#define BOOST_MATH_INSTRUMENT_VARIABLE(name) + +# define BOOST_MATH_INSTRUMENT_CODE(x) +# define BOOST_MATH_INSTRUMENT_VARIABLE(name) + #endif #endif // BOOST_MATH_TOOLS_CONFIG_HPP diff --git a/3rdParty/Boost/src/boost/math/tools/promotion.hpp b/3rdParty/Boost/src/boost/math/tools/promotion.hpp index 728aaf1..b3ad204 100644 --- a/3rdParty/Boost/src/boost/math/tools/promotion.hpp +++ b/3rdParty/Boost/src/boost/math/tools/promotion.hpp @@ -138,10 +138,35 @@ namespace boost // // Guard against use of long double if it's not supported: // - BOOST_STATIC_ASSERT((0 == ::boost::is_same<type, long double>::value)); + BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long double>::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented."); #endif }; + // + // This struct is the same as above, but has no static assert on long double usage, + // it should be used only on functions that can be implemented for long double + // even when std lib support is missing or broken for that type. + // + template <class T1, class T2=float, class T3=float, class T4=float, class T5=float, class T6=float> + struct promote_args_permissive + { + typedef typename promote_args_2< + typename remove_cv<T1>::type, + typename promote_args_2< + typename remove_cv<T2>::type, + typename promote_args_2< + typename remove_cv<T3>::type, + typename promote_args_2< + typename remove_cv<T4>::type, + typename promote_args_2< + typename remove_cv<T5>::type, typename remove_cv<T6>::type + >::type + >::type + >::type + >::type + >::type type; + }; + } // namespace tools } // namespace math } // namespace boost diff --git a/3rdParty/Boost/src/boost/math/tools/user.hpp b/3rdParty/Boost/src/boost/math/tools/user.hpp index c1bdaf7..08a7e53 100644 --- a/3rdParty/Boost/src/boost/math/tools/user.hpp +++ b/3rdParty/Boost/src/boost/math/tools/user.hpp @@ -91,6 +91,14 @@ // Maximum root finding steps permitted: // // define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200 +// +// Enable use of __float128 in numeric constants: +// +// #define BOOST_MATH_USE_FLOAT128 +// +// Disable use of __float128 in numeric_constants even if the compiler looks to support it: +// +// #define BOOST_MATH_DISABLE_FLOAT128 #endif // BOOST_MATH_TOOLS_USER_HPP |