7#define TIMPI_UNIT_ASSERT(expr) \
23 for (
int d=0;
d !=
M; ++
d)
43 for (
int d=0;
d !=
M; ++
d)
49 std::vector<unsigned int>
v;
69 for (
int d=0;
d !=
M; ++
d)
94 for (
int d=0;
d !=
M; ++
d)
100 std::vector<std::vector<unsigned int>>
vv(2);
125 const typename std::vector<unsigned int> &
vec_received)
136 for (
int p=rank;
p <
M;
p += size)
191 vec.emplace_back(std::move(val));
199 for (
int p=rank;
p <
M;
p += size)
243 const std::vector<unsigned int> &
query,
244 std::vector<unsigned int> &
response)
256 const std::vector<unsigned int> &
query,
257 const std::vector<unsigned int> &
response)
269 unsigned int *
ex =
nullptr;
274 for (
int p=0;
p !=
M; ++
p)
277 for (std::size_t
i = 0;
i !=
data[
p].size(); ++
i)
300 std::map<processor_id_type, std::vector<std::vector<unsigned int>>>
data;
301 std::map<processor_id_type, std::vector<unsigned int>>
received_data;
308 const typename std::vector<std::vector<unsigned int>> &
vecvec_received)
322 for (
int p=rank;
p <
M;
p += size)
371 std::map<processor_id_type, std::vector<std::vector<unsigned int>>>
data;
372 std::map<processor_id_type, std::vector<std::vector<unsigned int>>>
received_data;
379 const std::vector<std::vector<unsigned int>> &
query,
380 std::vector<std::vector<unsigned int>> &
response)
397 const std::vector<std::vector<unsigned int>> &
query,
398 const std::vector<std::vector<unsigned int>> &
response)
417 std::vector<unsigned int> *
ex =
nullptr;
422 for (
int p=0;
p !=
M; ++
p)
425 for (std::size_t
i = 0;
i !=
data[
p].size(); ++
i)
426 for (std::size_t
j = 0;
j !=
data[
p][
i].size(); ++
j)
457 std::multimap<processor_id_type, std::vector<unsigned int> >
data,
received_data;
464 const typename std::vector<unsigned int> &
vec_received)
474 for (
int p=rank;
p <
M;
p += size)
492 std::ptrdiff_t
cnt = std::count(
pv_it->second.begin(),
pv_it->second.end(),
p);
498 std::ptrdiff_t
cnt2 = std::count(
pv_it2->second.begin(),
pv_it2->second.end(),
p);
542 std::multimap<processor_id_type, std::vector<std::vector<unsigned int>>>
data,
received_data;
549 const typename std::vector<std::vector<unsigned int>> &
vecvec_received)
559 for (
int p=rank;
p <
M;
p += size)
569 for (
auto &
v :
pvv->second)
578 if(
pvv_it->second.size() != std::size_t(2))
581 std::ptrdiff_t
cnt = std::count(
pvv_it->second[0].begin(),
pvv_it->second[0].end(),
p);
585 std::ptrdiff_t
cnt2 = std::count(
pvv_it->second[1].begin(),
pvv_it->second[1].end(),
p);
605 for (
auto &
v :
pvv->second)
637 for (
int i=0;
i !=
M; ++
i)
644 const typename std::vector<unsigned int> &
vec_received)
660 catch (std::logic_error &
e) {
674 for (
int p=rank;
p <
M;
p += size)
Encapsulates the MPI_Comm object.
processor_id_type size() const
processor_id_type rank() const
void duplicate(const Communicator &comm)
void sync_type(const SyncType st)
Explicitly sets the SyncType used for sync operations.
The TIMPIInit class, when constructed, initializes any dependent libraries (e.g.
void pull_parallel_vector_data(const Communicator &comm, const MapToVectors &queries, GatherFunctor &gather_data, const ActionFunctor &act_on_data, const datum *example)
Send query vectors, receive and answer them with vectors of data, then act on those answers.
uint8_t processor_id_type
void push_parallel_vector_data(const Communicator &comm, MapToVectors &&data, const ActionFunctor &act_on_data)
Send and receive and act on vectors of data.
Tnew cast_int(Told oldvar)
void fill_vector_data(std::map< processor_id_type, std::vector< std::vector< unsigned int > > > &data, int M)
void testPushMultimapVecVecImpl(int M)
Communicator * TestCommWorld
void fill_scalar_data(std::map< processor_id_type, std::vector< unsigned int > > &data, int M)
void testPullVecVecOversized()
void testPushVecVecOversized()
void testPushMultimapOversized()
void testPushMultimapVecVec()
void testPushMultimapImpl(int M)
void testPullVecVecImpl(int M)
void testPushVecVecImpl(int M)
void testPushMultimapVecVecOversized()
void testStringSyncType()