Skip to content

Commit

Permalink
#908 nvcc- add explicit types to templates used has sendMsg handlers
Browse files Browse the repository at this point in the history
- NVCC is not able to infer these usages.

  10.1 infers more/better than 11.. the ping-pong example did not requires changes in 10.1.
  • Loading branch information
pnstickne authored and lifflander committed Jul 28, 2020
1 parent 4080c10 commit a4e67f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions tests/perf/ping_pong.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static void finishedPing(FinishedPingMsg<num_bytes>* msg) {

if (num_bytes != max_bytes) {
auto pmsg = makeMessage<PingMsg<num_bytes * 2>>();
theMsg()->sendMsg<PingMsg<num_bytes * 2>, pingPong>(
theMsg()->sendMsg<PingMsg<num_bytes * 2>, pingPong<num_bytes * 2>>(
pong_node, pmsg.get()
);
}
Expand Down Expand Up @@ -133,20 +133,20 @@ static void pingPong(PingMsg<num_bytes>* in_msg) {

if (cnt >= num_pings) {
auto msg = makeMessage<FinishedPingMsg<num_bytes>>(num_bytes);
theMsg()->sendMsg<FinishedPingMsg<num_bytes>, finishedPing>(
theMsg()->sendMsg<FinishedPingMsg<num_bytes>, finishedPing<num_bytes>>(
0, msg.get()
);
} else {
NodeType const next =
theContext()->getNode() == ping_node ? pong_node : ping_node;
#if REUSE_MESSAGE_PING_PONG
// @todo: fix this memory allocation problem
theMsg()->sendMsg<PingMsg<num_bytes>, pingPong>(
theMsg()->sendMsg<PingMsg<num_bytes>, pingPong<num_bytes>>(
next, in_msg, [=]{ /*delete in_msg;*/ }
);
#else
auto m = makeMessage<PingMsg<num_bytes>>(cnt + 1);
theMsg()->sendMsg<PingMsg<num_bytes>, pingPong>(next, m.get());
theMsg()->sendMsg<PingMsg<num_bytes>, pingPong<num_bytes>>(next, m.get());
#endif
}
}
Expand All @@ -169,7 +169,7 @@ int main(int argc, char** argv) {

if (my_node == 0) {
auto m = makeMessage<PingMsg<min_bytes>>();
theMsg()->sendMsg<PingMsg<min_bytes>, pingPong>(pong_node, m.get());
theMsg()->sendMsg<PingMsg<min_bytes>, pingPong<min_bytes>>(pong_node, m.get());
}

while (!rt->isTerminated()) {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/pool/test_pool_message_sizes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ void TestPoolMessageSizes::testPoolFun(TestMsg<num_bytes>* prev_msg) {

if (count < max_test_count) {
auto msg = makeMessage<TestMsg<num_bytes>>();
theMsg()->sendMsg<TestMsg<num_bytes>, testPoolFun>(
theMsg()->sendMsg<TestMsg<num_bytes>, testPoolFun<num_bytes>>(
next, msg.get()
);
} else {
auto msg = makeMessage<TestMsg<num_bytes * 2>>();
theMsg()->sendMsg<TestMsg<num_bytes * 2>, testPoolFun>(
theMsg()->sendMsg<TestMsg<num_bytes * 2>, testPoolFun<num_bytes * 2>>(
next, msg.get()
);
count = 0;
Expand Down

0 comments on commit a4e67f9

Please sign in to comment.