Skip to content

Commit

Permalink
#276: perf: use new interface for performance test
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Jun 13, 2023
1 parent 4b056b0 commit c376d16
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/perf/reduce.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,13 @@ static constexpr int num_iters = 100;
struct MyTest : PerfTestHarness { };

struct NodeObj {
struct ReduceMsg : vt::collective::ReduceNoneMsg { };

explicit NodeObj(MyTest* test_obj) : test_obj_(test_obj) { }

void initialize() { proxy_ = vt::theObjGroup()->getProxy<NodeObj>(this); }

struct MyMsg : vt::Message {};

void reduceComplete(ReduceMsg* msg) {
void reduceComplete() {
reduce_counter_++;
test_obj_->StopTimer(fmt::format("{} reduce", i));
test_obj_->GetMemoryUsage();
Expand All @@ -78,9 +76,7 @@ struct NodeObj {

void perfReduce(MyMsg* in_msg) {
test_obj_->StartTimer(fmt::format("{} reduce", i));
auto cb = theCB()->makeBcast<&NodeObj::reduceComplete>(proxy_);
auto msg = makeMessage<ReduceMsg>();
proxy_.reduce(msg.get(), cb);
proxy_.allreduce<&NodeObj::reduceComplete>();
}

private:
Expand Down

0 comments on commit c376d16

Please sign in to comment.