mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Merge remote-tracking branch 'origin/MSVC2022' into MSVC2022
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -232,7 +232,7 @@ jobs:
|
||||
- name: Test
|
||||
run: ..\..\..\b2 --hash %ARGS% define=CI_SUPPRESS_KNOWN_ISSUES ${{ matrix.suite }}
|
||||
working-directory: ../boost-root/libs/math/test
|
||||
MSVC2022-BETA:
|
||||
MSVC2022:
|
||||
runs-on: windows-2022
|
||||
defaults:
|
||||
run:
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
#include <vector>
|
||||
#include <type_traits>
|
||||
|
||||
#ifdef BOOST_HAS_THREADS
|
||||
#if defined(BOOST_HAS_THREADS) && !defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_MATH_NO_ATOMIC_INT)
|
||||
#include <mutex>
|
||||
#else
|
||||
# define BOOST_MATH_BERNOULLI_NOTHREADS
|
||||
#endif
|
||||
|
||||
namespace boost{ namespace math{ namespace detail{
|
||||
@@ -360,7 +362,10 @@ public:
|
||||
return out;
|
||||
}
|
||||
|
||||
#if !defined(BOOST_HAS_THREADS) || defined(BOOST_MATH_BERNOULLI_UNTHREADED)
|
||||
#if defined(BOOST_HAS_THREADS) && defined(BOOST_MATH_BERNOULLI_NOTHREADS) && !defined(BOOST_MATH_BERNOULLI_UNTHREADED)
|
||||
// Add a static_assert on instantiation if we have threads, but no C++11 threading support.
|
||||
static_assert(sizeof(T) == 1, "Unsupported configuration: your platform appears to have either no atomic integers, or no std::mutex. If you are happy with thread-unsafe code, then you may define BOOST_MATH_BERNOULLI_UNTHREADED to suppress this error.");
|
||||
#elif defined(BOOST_MATH_BERNOULLI_NOTHREADS)
|
||||
//
|
||||
// Single threaded code, very simple:
|
||||
//
|
||||
@@ -382,8 +387,6 @@ public:
|
||||
*out = (i >= m_overflow_limit) ? policies::raise_overflow_error<T>("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(i), pol) : bn[i];
|
||||
++out;
|
||||
}
|
||||
#elif defined(BOOST_MATH_NO_ATOMIC_INT)
|
||||
static_assert(sizeof(T) == 1, "Unsupported configuration: your platform appears to have no atomic integers. If you are happy with thread-unsafe code, then you may define BOOST_MATH_BERNOULLI_UNTHREADED to suppress this error.");
|
||||
#else
|
||||
//
|
||||
// Double-checked locking pattern, lets us access cached already cached values
|
||||
@@ -466,7 +469,7 @@ public:
|
||||
return out;
|
||||
}
|
||||
|
||||
#if !defined(BOOST_HAS_THREADS) || defined(BOOST_MATH_BERNOULLI_UNTHREADED)
|
||||
#if defined(BOOST_MATH_BERNOULLI_NOTHREADS)
|
||||
//
|
||||
// Single threaded code, very simple:
|
||||
//
|
||||
@@ -559,7 +562,7 @@ private:
|
||||
// The value at which we know overflow has already occurred for the Bn:
|
||||
std::size_t m_overflow_limit;
|
||||
|
||||
#if defined(BOOST_HAS_THREADS) && !defined(BOOST_MATH_NO_ATOMIC_INT)
|
||||
#if !defined(BOOST_MATH_BERNOULLI_NOTHREADS)
|
||||
std::mutex m_mutex;
|
||||
atomic_counter_type m_counter, m_current_precision;
|
||||
#else
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
#if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__EMSCRIPTEN__)\
|
||||
|| (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \
|
||||
&& !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
|
||||
# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
//# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
#endif
|
||||
|
||||
#ifdef __IBMCPP__
|
||||
|
||||
Reference in New Issue
Block a user