|
Boost-Commit : |
From: eric_at_[hidden]
Date: 2008-05-27 19:43:20
Author: eric_niebler
Date: 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
New Revision: 45842
URL: http://svn.boost.org/trac/boost/changeset/45842
Log:
merged from trunk
Properties modified:
branches/proto/v4/ (props changed)
Text files modified:
branches/proto/v4/boost/accumulators/statistics/moment.hpp | 1 +
branches/proto/v4/boost/detail/lwm_win32_cs.hpp | 16 ++++++++++------
branches/proto/v4/boost/intrusive/slist.hpp | 7 +++++--
branches/proto/v4/boost/math/tr1.hpp | 36 +++++++++++++++++++++++++++---------
branches/proto/v4/boost/mpl/aux_/preprocessed/plain/and.hpp | 4 ++--
branches/proto/v4/libs/math/src/tr1/expm1.cpp | 2 +-
branches/proto/v4/libs/math/src/tr1/expm1f.cpp | 2 +-
branches/proto/v4/libs/math/src/tr1/expm1l.cpp | 2 +-
branches/proto/v4/libs/math/src/tr1/log1p.cpp | 2 +-
branches/proto/v4/libs/math/src/tr1/log1pf.cpp | 2 +-
branches/proto/v4/libs/math/src/tr1/log1pl.cpp | 2 +-
branches/proto/v4/libs/math/src/tr1/nextafter.cpp | 2 +-
branches/proto/v4/libs/math/src/tr1/nextafterf.cpp | 2 +-
branches/proto/v4/libs/math/src/tr1/nextafterl.cpp | 2 +-
branches/proto/v4/libs/math/test/test_next.cpp | 2 ++
branches/proto/v4/libs/math/test/test_tr1.cpp | 4 ++++
16 files changed, 60 insertions(+), 28 deletions(-)
Modified: branches/proto/v4/boost/accumulators/statistics/moment.hpp
==============================================================================
--- branches/proto/v4/boost/accumulators/statistics/moment.hpp (original)
+++ branches/proto/v4/boost/accumulators/statistics/moment.hpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -35,6 +35,7 @@
template<typename T, int N>
T pow(T const &x, mpl::int_<N>)
{
+ using namespace operators;
T y = numeric::pow(x, mpl::int_<N/2>());
T z = y * y;
return (N % 2) ? (z * x) : z;
Modified: branches/proto/v4/boost/detail/lwm_win32_cs.hpp
==============================================================================
--- branches/proto/v4/boost/detail/lwm_win32_cs.hpp (original)
+++ branches/proto/v4/boost/detail/lwm_win32_cs.hpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -29,7 +29,7 @@
#ifndef BOOST_USE_WINDOWS_H
-struct CRITICAL_SECTION
+struct critical_section
{
struct critical_section_debug * DebugInfo;
long LockCount;
@@ -43,10 +43,14 @@
#endif
};
-extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(CRITICAL_SECTION *);
-extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(CRITICAL_SECTION *);
-extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(CRITICAL_SECTION *);
-extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(CRITICAL_SECTION *);
+extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(critical_section *);
+extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(critical_section *);
+extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(critical_section *);
+extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(critical_section *);
+
+#else
+
+typedef ::CRITICAL_SECTION critical_section;
#endif // #ifndef BOOST_USE_WINDOWS_H
@@ -54,7 +58,7 @@
{
private:
- CRITICAL_SECTION cs_;
+ critical_section cs_;
lightweight_mutex(lightweight_mutex const &);
lightweight_mutex & operator=(lightweight_mutex const &);
Modified: branches/proto/v4/boost/intrusive/slist.hpp
==============================================================================
--- branches/proto/v4/boost/intrusive/slist.hpp (original)
+++ branches/proto/v4/boost/intrusive/slist.hpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -1015,8 +1015,11 @@
iterator last_x(x.previous(x.end())); //<- constant time if cache_last is active
node_ptr prev_n(prev.pointed_node());
node_ptr last_x_n(last_x.pointed_node());
- if(cache_last && node_traits::get_next(prev_n) == this->get_end_node()){
- this->set_last_node(last_x_n);
+ if(cache_last){
+ x.set_last_node(x.get_root_node());
+ if(node_traits::get_next(prev_n) == this->get_end_node()){
+ this->set_last_node(last_x_n);
+ }
}
node_algorithms::transfer_after( prev_n, x.before_begin().pointed_node(), last_x_n);
this->priv_size_traits().set_size(this->priv_size_traits().get_size() + x.priv_size_traits().get_size());
Modified: branches/proto/v4/boost/math/tr1.hpp
==============================================================================
--- branches/proto/v4/boost/math/tr1.hpp (original)
+++ branches/proto/v4/boost/math/tr1.hpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -140,9 +140,9 @@
float BOOST_MATH_TR1_DECL exp2f(float x);
long double BOOST_MATH_TR1_DECL exp2l(long double x);
#endif
-double BOOST_MATH_TR1_DECL expm1(double x);
-float BOOST_MATH_TR1_DECL expm1f(float x);
-long double BOOST_MATH_TR1_DECL expm1l(long double x);
+double BOOST_MATH_TR1_DECL boost_expm1(double x);
+float BOOST_MATH_TR1_DECL boost_expm1f(float x);
+long double BOOST_MATH_TR1_DECL boost_expm1l(long double x);
#if 0
double BOOST_MATH_TR1_DECL fdim(double x, double y);
float BOOST_MATH_TR1_DECL fdimf(float x, float y);
@@ -179,9 +179,9 @@
long long BOOST_MATH_TR1_DECL llroundf(float x);
long long BOOST_MATH_TR1_DECL llroundl(long double x);
-double BOOST_MATH_TR1_DECL log1p(double x);
-float BOOST_MATH_TR1_DECL log1pf(float x);
-long double BOOST_MATH_TR1_DECL log1pl(long double x);
+double BOOST_MATH_TR1_DECL boost_log1p(double x);
+float BOOST_MATH_TR1_DECL boost_log1pf(float x);
+long double BOOST_MATH_TR1_DECL boost_log1pl(long double x);
#if 0
double BOOST_MATH_TR1_DECL log2(double x);
float BOOST_MATH_TR1_DECL log2f(float x);
@@ -205,9 +205,9 @@
float BOOST_MATH_TR1_DECL nearbyintf(float x);
long double BOOST_MATH_TR1_DECL nearbyintl(long double x);
#endif
-double BOOST_MATH_TR1_DECL nextafter(double x, double y);
-float BOOST_MATH_TR1_DECL nextafterf(float x, float y);
-long double BOOST_MATH_TR1_DECL nextafterl(long double x, long double y);
+double BOOST_MATH_TR1_DECL boost_nextafter(double x, double y);
+float BOOST_MATH_TR1_DECL boost_nextafterf(float x, float y);
+long double BOOST_MATH_TR1_DECL boost_nextafterl(long double x, long double y);
double BOOST_MATH_TR1_DECL nexttoward(double x, long double y);
float BOOST_MATH_TR1_DECL nexttowardf(float x, long double y);
@@ -430,6 +430,12 @@
float exp2f(float x);
long double exp2l(long double x);
#endif
+inline float expm1f(float x)
+{ return boost::math::tr1::boost_expm1f(x); }
+inline double expm1(double x)
+{ return boost::math::tr1::boost_expm1(x); }
+inline long double expm1l(long double x)
+{ return boost::math::tr1::boost_expm1l(x); }
inline float expm1(float x)
{ return boost::math::tr1::expm1f(x); }
inline long double expm1(long double x)
@@ -493,6 +499,12 @@
inline long long llround(T x)
{ return llround(static_cast<double>(x)); }
+inline float log1pf(float x)
+{ return boost::math::tr1::boost_log1pf(x); }
+inline double log1p(double x)
+{ return boost::math::tr1::boost_log1p(x); }
+inline long double log1pl(long double x)
+{ return boost::math::tr1::boost_log1pl(x); }
inline float log1p(float x)
{ return boost::math::tr1::log1pf(x); }
inline long double log1p(long double x)
@@ -527,6 +539,12 @@
float nearbyintf(float x);
long double nearbyintl(long double x);
#endif
+inline float nextafterf(float x, float y)
+{ return boost::math::tr1::boost_nextafterf(x, y); }
+inline double nextafter(double x, double y)
+{ return boost::math::tr1::boost_nextafter(x, y); }
+inline long double nextafterl(long double x, long double y)
+{ return boost::math::tr1::boost_nextafterl(x, y); }
inline float nextafter(float x, float y)
{ return boost::math::tr1::nextafterf(x, y); }
inline long double nextafter(long double x, long double y)
Modified: branches/proto/v4/boost/mpl/aux_/preprocessed/plain/and.hpp
==============================================================================
--- branches/proto/v4/boost/mpl/aux_/preprocessed/plain/and.hpp (original)
+++ branches/proto/v4/boost/mpl/aux_/preprocessed/plain/and.hpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -1,8 +1,8 @@
// Copyright Aleksey Gurtovoy 2000-2004
//
-// 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)
//
Modified: branches/proto/v4/libs/math/src/tr1/expm1.cpp
==============================================================================
--- branches/proto/v4/libs/math/src/tr1/expm1.cpp (original)
+++ branches/proto/v4/libs/math/src/tr1/expm1.cpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -8,7 +8,7 @@
#include <boost/math/special_functions/expm1.hpp>
#include "c_policy.hpp"
-extern "C" double BOOST_MATH_TR1_DECL expm1(double x)
+extern "C" double BOOST_MATH_TR1_DECL boost_expm1(double x)
{
return c_policies::expm1(x);
}
Modified: branches/proto/v4/libs/math/src/tr1/expm1f.cpp
==============================================================================
--- branches/proto/v4/libs/math/src/tr1/expm1f.cpp (original)
+++ branches/proto/v4/libs/math/src/tr1/expm1f.cpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -8,7 +8,7 @@
#include <boost/math/special_functions/expm1.hpp>
#include "c_policy.hpp"
-extern "C" float BOOST_MATH_TR1_DECL expm1f(float x)
+extern "C" float BOOST_MATH_TR1_DECL boost_expm1f(float x)
{
return c_policies::expm1(x);
}
Modified: branches/proto/v4/libs/math/src/tr1/expm1l.cpp
==============================================================================
--- branches/proto/v4/libs/math/src/tr1/expm1l.cpp (original)
+++ branches/proto/v4/libs/math/src/tr1/expm1l.cpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -8,7 +8,7 @@
#include <boost/math/special_functions/expm1.hpp>
#include "c_policy.hpp"
-extern "C" long double BOOST_MATH_TR1_DECL expm1l(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL boost_expm1l(long double x)
{
return c_policies::expm1(x);
}
Modified: branches/proto/v4/libs/math/src/tr1/log1p.cpp
==============================================================================
--- branches/proto/v4/libs/math/src/tr1/log1p.cpp (original)
+++ branches/proto/v4/libs/math/src/tr1/log1p.cpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -10,7 +10,7 @@
namespace boost{ namespace math{ namespace tr1{
-extern "C" double BOOST_MATH_TR1_DECL log1p(double x)
+extern "C" double BOOST_MATH_TR1_DECL boost_log1p(double x)
{
return c_policies::log1p(x);
}
Modified: branches/proto/v4/libs/math/src/tr1/log1pf.cpp
==============================================================================
--- branches/proto/v4/libs/math/src/tr1/log1pf.cpp (original)
+++ branches/proto/v4/libs/math/src/tr1/log1pf.cpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -10,7 +10,7 @@
namespace boost{ namespace math{ namespace tr1{
-extern "C" float BOOST_MATH_TR1_DECL log1pf(float x)
+extern "C" float BOOST_MATH_TR1_DECL boost_log1pf(float x)
{
return c_policies::log1p(x);
}
Modified: branches/proto/v4/libs/math/src/tr1/log1pl.cpp
==============================================================================
--- branches/proto/v4/libs/math/src/tr1/log1pl.cpp (original)
+++ branches/proto/v4/libs/math/src/tr1/log1pl.cpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -10,7 +10,7 @@
namespace boost{ namespace math{ namespace tr1{
-extern "C" long double BOOST_MATH_TR1_DECL log1pl(long double x)
+extern "C" long double BOOST_MATH_TR1_DECL boost_log1pl(long double x)
{
return c_policies::log1p(x);
}
Modified: branches/proto/v4/libs/math/src/tr1/nextafter.cpp
==============================================================================
--- branches/proto/v4/libs/math/src/tr1/nextafter.cpp (original)
+++ branches/proto/v4/libs/math/src/tr1/nextafter.cpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -10,7 +10,7 @@
namespace boost{ namespace math{ namespace tr1{
-extern "C" double BOOST_MATH_TR1_DECL nextafter(double x, double y)
+extern "C" double BOOST_MATH_TR1_DECL boost_nextafter(double x, double y)
{
return c_policies::nextafter(x, y);
}
Modified: branches/proto/v4/libs/math/src/tr1/nextafterf.cpp
==============================================================================
--- branches/proto/v4/libs/math/src/tr1/nextafterf.cpp (original)
+++ branches/proto/v4/libs/math/src/tr1/nextafterf.cpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -10,7 +10,7 @@
namespace boost{ namespace math{ namespace tr1{
-extern "C" float BOOST_MATH_TR1_DECL nextafterf(float x, float y)
+extern "C" float BOOST_MATH_TR1_DECL boost_nextafterf(float x, float y)
{
return c_policies::nextafter(x, y);
}
Modified: branches/proto/v4/libs/math/src/tr1/nextafterl.cpp
==============================================================================
--- branches/proto/v4/libs/math/src/tr1/nextafterl.cpp (original)
+++ branches/proto/v4/libs/math/src/tr1/nextafterl.cpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -10,7 +10,7 @@
namespace boost{ namespace math{ namespace tr1{
-extern "C" long double BOOST_MATH_TR1_DECL nextafterl(long double x, long double y)
+extern "C" long double BOOST_MATH_TR1_DECL boost_nextafterl(long double x, long double y)
{
return c_policies::nextafter(x, y);
}
Modified: branches/proto/v4/libs/math/test/test_next.cpp
==============================================================================
--- branches/proto/v4/libs/math/test/test_next.cpp (original)
+++ branches/proto/v4/libs/math/test/test_next.cpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -109,8 +109,10 @@
{
test_values(1.0f, "float");
test_values(1.0, "double");
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_values(1.0L, "long double");
test_values(boost::math::concepts::real_concept(0), "real_concept");
+#endif
return 0;
}
Modified: branches/proto/v4/libs/math/test/test_tr1.cpp
==============================================================================
--- branches/proto/v4/libs/math/test/test_tr1.cpp (original)
+++ branches/proto/v4/libs/math/test/test_tr1.cpp 2008-05-27 19:43:18 EDT (Tue, 27 May 2008)
@@ -967,6 +967,7 @@
void test_values(long double, const char* name)
{
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
std::cout << "Testing type " << name << std::endl;
long double eps = boost::math::tools::epsilon<long double>();
@@ -1593,13 +1594,16 @@
BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendre(3L, 2L, static_cast<long double>(0.5L)), static_cast<long double>(0.2061460599687871330692286791802688341213L), eps * 5000L);
BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendre(40L, 15L, static_cast<long double>(0.75L)), static_cast<long double>(-0.406036847302819452666908966769096223205057182668333862900509L), eps * 5000L);
+#endif
}
int test_main(int, char* [])
{
test_values(1.0f, "float");
test_values(1.0, "double");
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_values(1.0L, "long double");
+#endif
return 0;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk