File indexing completed on 2025-01-30 09:58:06
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_PROPERTY_MAP_PARALLEL_PROCESS_GROUP_HPP
0010 #define BOOST_PROPERTY_MAP_PARALLEL_PROCESS_GROUP_HPP
0011
0012 #include <cstdlib>
0013 #include <utility>
0014
0015 namespace boost { namespace parallel {
0016
0017
0018
0019
0020
0021
0022 struct attach_distributed_object { };
0023
0024
0025
0026
0027
0028 enum trigger_receive_context {
0029
0030 trc_none,
0031
0032
0033 trc_in_synchronization,
0034
0035
0036
0037
0038 trc_early_receive,
0039
0040
0041 trc_out_of_band,
0042
0043
0044
0045 trc_irecv_out_of_band
0046 };
0047
0048
0049 struct process_group_tag {};
0050 struct linear_process_group_tag : virtual process_group_tag {};
0051 struct messaging_process_group_tag : virtual process_group_tag {};
0052 struct immediate_process_group_tag : virtual messaging_process_group_tag {};
0053 struct bsp_process_group_tag : virtual messaging_process_group_tag {};
0054 struct batch_process_group_tag : virtual messaging_process_group_tag {};
0055 struct locking_process_group_tag : virtual process_group_tag {};
0056 struct spawning_process_group_tag : virtual process_group_tag {};
0057
0058 struct process_group_archetype
0059 {
0060 typedef int process_id_type;
0061 };
0062
0063 void wait(process_group_archetype&);
0064 void synchronize(process_group_archetype&);
0065 int process_id(const process_group_archetype&);
0066 int num_processes(const process_group_archetype&);
0067
0068 template<typename T> void send(process_group_archetype&, int, int, const T&);
0069
0070 template<typename T>
0071 process_group_archetype::process_id_type
0072 receive(const process_group_archetype& pg,
0073 process_group_archetype::process_id_type source, int tag, T& value);
0074
0075 template<typename T>
0076 std::pair<process_group_archetype::process_id_type, std::size_t>
0077 receive(const process_group_archetype& pg, int tag, T values[], std::size_t n);
0078
0079 template<typename T>
0080 std::pair<process_group_archetype::process_id_type, std::size_t>
0081 receive(const process_group_archetype& pg,
0082 process_group_archetype::process_id_type source, int tag, T values[],
0083 std::size_t n);
0084
0085 } }
0086
0087 namespace boost { namespace graph { namespace distributed {
0088 using boost::parallel::trigger_receive_context;
0089 using boost::parallel::trc_early_receive;
0090 using boost::parallel::trc_out_of_band;
0091 using boost::parallel::trc_irecv_out_of_band;
0092 using boost::parallel::trc_in_synchronization;
0093 using boost::parallel::trc_none;
0094 using boost::parallel::attach_distributed_object;
0095 } } }
0096
0097 #endif