1 // Copyright (C) 2004-2006 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
11 // This file contains traits that describe
13 #ifndef BOOST_GRAPH_PARALLEL_CONTAINER_TRAITS_HPP
14 #define BOOST_GRAPH_PARALLEL_CONTAINER_TRAITS_HPP
16 #ifndef BOOST_GRAPH_USE_MPI
17 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
20 namespace boost { namespace graph { namespace parallel {
23 struct process_group_type
25 typedef typename T::process_group_type type;
29 inline typename process_group_type<T>::type
30 process_group(const T& x)
31 { return x.process_group(); }
33 // Helper function that algorithms should use to get the process group
34 // out of a container.
35 template<typename Container>
36 inline typename process_group_type<Container>::type
37 process_group_adl(const Container& container)
39 return process_group(container);
43 } } } // end namespace boost::graph::parallel
45 #endif // BOOST_GRAPH_PARALLEL_CONTAINER_TRAITS_HPP