Skip to content

Commit

Permalink
Updates for Explicit policy in capturing benchmark information
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaAtulTewari committed Jul 23, 2024
1 parent 2ffe91b commit d2b5c68
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions include/pando-lib-galois/loops/do_all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,18 @@ template <typename State, typename R, typename F>
pando::Status doAll(WaitGroup::HandleType wgh, State s, R range, const F& func) {
return DoAll::doAll<State, R, F>(wgh, s, range, func);
}
template <SchedulerPolicy POLICY, typename State, typename R, typename F>
pando::Status doAllExplicitPolicy(WaitGroup::HandleType wgh, State s, R range, const F& func) {
return DoAll::doAllExplicitPolicy<POLICY, State, R, F>(wgh, s, range, func);
}
template <typename R, typename F>
pando::Status doAll(WaitGroup::HandleType wgh, R range, const F& func) {
return DoAll::doAll<R, F>(wgh, range, func);
}
template <SchedulerPolicy POLICY, typename R, typename F>
pando::Status doAllExplicitPolicy(WaitGroup::HandleType wgh, R range, const F& func) {
return DoAll::doAllExplicitPolicy<POLICY, R, F>(wgh, range, func);
}
template <typename State, typename R, typename F, typename L>
pando::Status doAll(State s, R range, const F& func, const L& localityFunc) {
return DoAll::doAll<State, R, F, L>(s, range, func, localityFunc);
Expand Down
8 changes: 4 additions & 4 deletions microbench/bfs/include/pando-bfs-galois/sssp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ pando::Status SSSP_DLCSR(
state.dist = 0;

#ifdef PANDO_STAT_TRACE_ENABLE
PANDO_CHECK(galois::doAll(
PANDO_CHECK(galois::doAllExplicitPolicy<SchedulerPolicy::RANDOM>(
wgh, phbfs, +[](pando::Vector<typename G::VertexTopologyID>) {
PANDO_MEM_STAT_NEW_KERNEL("BFS Start");
}));
Expand Down Expand Up @@ -168,7 +168,7 @@ pando::Status SSSP_DLCSR(
}

#ifdef PANDO_STAT_TRACE_ENABLE
PANDO_CHECK(galois::doAll(
PANDO_CHECK(galois::doAllExplicitPolicy<SchedulerPolicy::RANDOM>(
wgh, phbfs, +[](pando::Vector<typename G::VertexTopologyID>) {
PANDO_MEM_STAT_NEW_KERNEL("BFS END");
}));
Expand Down Expand Up @@ -311,7 +311,7 @@ pando::Status SSSPMDLCSR(G& graph, std::uint64_t src, HostLocalStorage<MDWorkLis
#endif

#ifdef PANDO_STAT_TRACE_ENABLE
PANDO_CHECK(galois::doAll(
PANDO_CHECK(galois::doAllExplicitPolicy<SchedulerPolicy::RANDOM>(
wgh, toRead, +[](MDWorkList<G>) {
PANDO_MEM_STAT_NEW_KERNEL("BFS Start");
}));
Expand Down Expand Up @@ -360,7 +360,7 @@ pando::Status SSSPMDLCSR(G& graph, std::uint64_t src, HostLocalStorage<MDWorkLis
}

#ifdef PANDO_STAT_TRACE_ENABLE
PANDO_CHECK(galois::doAll(
PANDO_CHECK(galois::doAllExplicitPolicy<SchedulerPolicy::RANDOM>(
wgh, toRead, +[](MDWorkList<G>) {
PANDO_MEM_STAT_NEW_KERNEL("BFS END");
}));
Expand Down

0 comments on commit d2b5c68

Please sign in to comment.