update boost
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/config.hpp> // for BOOST_STATIC_CONSTANT
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
|
||||
namespace boost { namespace parallel {
|
||||
template<typename BinaryOp>
|
||||
@@ -26,20 +25,29 @@ namespace boost { namespace parallel {
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct minimum : std::binary_function<T, T, T>
|
||||
struct minimum
|
||||
{
|
||||
typedef T first_argument_type;
|
||||
typedef T second_argument_type;
|
||||
typedef T result_type;
|
||||
const T& operator()(const T& x, const T& y) const { return x < y? x : y; }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct maximum : std::binary_function<T, T, T>
|
||||
struct maximum
|
||||
{
|
||||
typedef T first_argument_type;
|
||||
typedef T second_argument_type;
|
||||
typedef T result_type;
|
||||
const T& operator()(const T& x, const T& y) const { return x < y? y : x; }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct sum : std::binary_function<T, T, T>
|
||||
struct sum
|
||||
{
|
||||
typedef T first_argument_type;
|
||||
typedef T second_argument_type;
|
||||
typedef T result_type;
|
||||
const T operator()(const T& x, const T& y) const { return x + y; }
|
||||
};
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include <boost/mpi/datatype.hpp>
|
||||
#include <boost/property_map/property_map.hpp>
|
||||
#include <boost/property_map/parallel/parallel_property_maps.hpp>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/graph/parallel/detail/untracked_pair.hpp>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <boost/iterator/counting_iterator.hpp>
|
||||
#include <boost/random/uniform_int.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <typeinfo>
|
||||
|
||||
namespace boost { namespace parallel {
|
||||
@@ -461,8 +462,12 @@ class twod_random
|
||||
make_counting_iterator(global_to_local.size()),
|
||||
global_to_local.begin());
|
||||
|
||||
#if defined(BOOST_NO_CXX98_RANDOM_SHUFFLE)
|
||||
std::shuffle(global_to_local.begin(), global_to_local.end(), gen);
|
||||
#else
|
||||
random_int<RandomNumberGen> rand(gen);
|
||||
std::random_shuffle(global_to_local.begin(), global_to_local.end(), rand);
|
||||
#endif
|
||||
}
|
||||
|
||||
template<typename SizeType>
|
||||
@@ -563,9 +568,12 @@ class random_distribution
|
||||
make_counting_iterator(n),
|
||||
local_to_global.begin());
|
||||
|
||||
#if defined(BOOST_NO_CXX98_RANDOM_SHUFFLE)
|
||||
std::shuffle(local_to_global.begin(), local_to_global.end(), gen);
|
||||
#else
|
||||
random_int<RandomNumberGen> rand(gen);
|
||||
std::random_shuffle(local_to_global.begin(), local_to_global.end(), rand);
|
||||
|
||||
#endif
|
||||
|
||||
for (std::vector<std::size_t>::size_type i = 0; i < n; ++i)
|
||||
global_to_local[local_to_global[i]] = i;
|
||||
|
||||
Reference in New Issue
Block a user