selector.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright (C) 2006 The Trustees of Indiana University.
  2. // Use, modification and distribution is subject to the Boost Software
  3. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // Authors: Douglas Gregor
  6. // Andrew Lumsdaine
  7. #ifndef BOOST_GRAPH_DISTRIBUTED_SELECTOR_HPP
  8. #define BOOST_GRAPH_DISTRIBUTED_SELECTOR_HPP
  9. #ifndef BOOST_GRAPH_USE_MPI
  10. #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
  11. #endif
  12. #include <boost/graph/detail/is_distributed_selector.hpp>
  13. namespace boost {
  14. /* The default local selector for a distributedS selector. */
  15. struct defaultS {};
  16. /**
  17. * Selector that specifies that the graph should be distributed
  18. * among different processes organized based on the given process
  19. * group.
  20. */
  21. template<typename ProcessGroup, typename LocalS = defaultS,
  22. typename DistributionS = defaultS>
  23. struct distributedS
  24. {
  25. typedef ProcessGroup process_group_type;
  26. typedef LocalS local_selector;
  27. typedef DistributionS distribution;
  28. };
  29. namespace detail {
  30. template<typename ProcessGroup, typename LocalS, typename DistributionS>
  31. struct is_distributed_selector<distributedS<ProcessGroup, LocalS, DistributionS> >: mpl::true_ {};
  32. }
  33. }
  34. #endif // BOOST_GRAPH_DISTRIBUTED_SELECTOR_HPP