1 // Copyright (C) 2004-2006 The Trustees of Indiana University.
2 
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)
6 
7 //  Authors: Douglas Gregor
8 //           Andrew Lumsdaine
9 
10 //
11 // This file contains traits that describe
12 //
13 #ifndef BOOST_GRAPH_PARALLEL_CONTAINER_TRAITS_HPP
14 #define BOOST_GRAPH_PARALLEL_CONTAINER_TRAITS_HPP
15 
16 #ifndef BOOST_GRAPH_USE_MPI
17 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
18 #endif
19 
20 namespace boost { namespace graph { namespace parallel {
21 
22 template<typename T>
23 struct process_group_type
24 {
25   typedef typename T::process_group_type type;
26 };
27 
28 template<typename T>
29 inline typename process_group_type<T>::type
process_group(const T & x)30 process_group(const T& x)
31 { return x.process_group(); }
32 
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
process_group_adl(const Container & container)37 process_group_adl(const Container& container)
38 {
39   return process_group(container);
40 }
41 
42 
43 } } } // end namespace boost::graph::parallel
44 
45 #endif // BOOST_GRAPH_PARALLEL_CONTAINER_TRAITS_HPP
46