1 // Copyright 2005 The Trustees of Indiana University.
3 // Use, modification and distribution is subject to the Boost Software
4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
7 // Authors: Douglas Gregor
10 #ifndef BOOST_PARALLEL_BASIC_REDUCE_HPP
11 #define BOOST_PARALLEL_BASIC_REDUCE_HPP
13 namespace boost { namespace parallel {
15 /** Reduction operation used to reconcile differences between local
16 * and remote values for a particular key in a property map. The
17 * type @c T is typically the @c value_type of the property
18 * map. This basic reduction returns a default-constructed @c T as
19 * the default value and always resolves to the remote value.
24 BOOST_STATIC_CONSTANT(bool, non_default_resolver = false);
26 /// Returns a default-constructed T object
27 template<typename Key>
28 T operator()(const Key&) const { return T(); }
30 /// Returns the remote value
31 template<typename Key>
32 const T& operator()(const Key&, const T&, const T& remote) const
36 } } // end namespace boost::parallel
38 #endif // BOOST_PARALLEL_BASIC_REDUCE_HPP