annotate DEPENDENCIES/generic/include/boost/property_map/parallel/basic_reduce.hpp @ 125:34e428693f5d vext

Vext -> Repoint
author Chris Cannam
date Thu, 14 Jun 2018 11:15:39 +0100
parents f46d142149f5
children
rev   line source
Chris@102 1 // Copyright 2005 The Trustees of Indiana University.
Chris@102 2
Chris@102 3 // Use, modification and distribution is subject to the Boost Software
Chris@102 4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
Chris@102 5 // http://www.boost.org/LICENSE_1_0.txt)
Chris@102 6
Chris@102 7 // Authors: Douglas Gregor
Chris@102 8 // Andrew Lumsdaine
Chris@102 9
Chris@102 10 #ifndef BOOST_PARALLEL_BASIC_REDUCE_HPP
Chris@102 11 #define BOOST_PARALLEL_BASIC_REDUCE_HPP
Chris@102 12
Chris@102 13 namespace boost { namespace parallel {
Chris@102 14
Chris@102 15 /** Reduction operation used to reconcile differences between local
Chris@102 16 * and remote values for a particular key in a property map. The
Chris@102 17 * type @c T is typically the @c value_type of the property
Chris@102 18 * map. This basic reduction returns a default-constructed @c T as
Chris@102 19 * the default value and always resolves to the remote value.
Chris@102 20 */
Chris@102 21 template<typename T>
Chris@102 22 struct basic_reduce
Chris@102 23 {
Chris@102 24 BOOST_STATIC_CONSTANT(bool, non_default_resolver = false);
Chris@102 25
Chris@102 26 /// Returns a default-constructed T object
Chris@102 27 template<typename Key>
Chris@102 28 T operator()(const Key&) const { return T(); }
Chris@102 29
Chris@102 30 /// Returns the remote value
Chris@102 31 template<typename Key>
Chris@102 32 const T& operator()(const Key&, const T&, const T& remote) const
Chris@102 33 { return remote; }
Chris@102 34 };
Chris@102 35
Chris@102 36 } } // end namespace boost::parallel
Chris@102 37
Chris@102 38 #endif // BOOST_PARALLEL_BASIC_REDUCE_HPP