Skip to content

Commit

Permalink
#1186: backport: add explicit types to templates
Browse files Browse the repository at this point in the history
Cherry-pick 8f27e08 from #908.
  • Loading branch information
cz4rs committed Dec 22, 2020
1 parent beb8e72 commit 95ff3ea
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 = makeSharedMessage<PingMsg<num_bytes * 2>>();
theMsg()->sendMsg<PingMsg<num_bytes * 2>, pingPong>(
theMsg()->sendMsg<PingMsg<num_bytes * 2>, pingPong<num_bytes * 2>>(
pong_node, pmsg
);
}
Expand Down Expand Up @@ -133,20 +133,20 @@ static void pingPong(PingMsg<num_bytes>* in_msg) {

if (cnt >= num_pings) {
auto msg = makeSharedMessage<FinishedPingMsg<num_bytes>>(num_bytes);
theMsg()->sendMsg<FinishedPingMsg<num_bytes>, finishedPing>(
theMsg()->sendMsg<FinishedPingMsg<num_bytes>, finishedPing<num_bytes>>(
0, msg
);
} 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 = makeSharedMessage<PingMsg<num_bytes>>(cnt + 1);
theMsg()->sendMsg<PingMsg<num_bytes>, pingPong>(next, m);
theMsg()->sendMsg<PingMsg<num_bytes>, pingPong<num_bytes>>(next, m);
#endif
}
}
Expand All @@ -169,7 +169,7 @@ int main(int argc, char** argv) {

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

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 = makeSharedMessage<TestMsg<num_bytes>>();
theMsg()->sendMsg<TestMsg<num_bytes>, testPoolFun>(
theMsg()->sendMsg<TestMsg<num_bytes>, testPoolFun<num_bytes>>(
next, msg
);
} else {
auto msg = makeSharedMessage<TestMsg<num_bytes * 2>>();
theMsg()->sendMsg<TestMsg<num_bytes * 2>, testPoolFun>(
theMsg()->sendMsg<TestMsg<num_bytes * 2>, testPoolFun<num_bytes * 2>>(
next, msg
);
count = 0;
Expand Down

0 comments on commit 95ff3ea

Please sign in to comment.