Skip to content

Commit

Permalink
example to print out current cycles (#140)
Browse files Browse the repository at this point in the history
* example to print out current cycles

* make it pass ci test

* use cerr instead of cout
  • Loading branch information
ywwu928 authored Aug 23, 2024
1 parent 30140ba commit a23bb97
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions microbench/bfs/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,21 @@ void HBMainMDLCSR(pando::Vector<std::uint64_t> srcVertices, std::uint64_t numVer
PANDO_DRV_SET_STAGE_INIT();
PANDO_DRV_SET_BYPASS_FLAG();

#ifdef DEBUG_PRINTS
#ifdef PANDO_RT_USE_BACKEND_DRVX
std::cerr << "Cycle before graph construction: " << DrvAPI::cycle() << std::endl;
#endif
#endif

Graph graph = galois::initializeELDLCSR<Graph, VT, ET>(filename, numVertices);
filename.deinitialize();

#ifdef DEBUG_PRINTS
#ifdef PANDO_RT_USE_BACKEND_DRVX
std::cerr << "Cycle after graph construction: " << DrvAPI::cycle() << std::endl;
#endif
#endif

#ifdef DEBUG_PRINTS
for (std::uint64_t i = 0; i < numVertices; i++) {
std::uint64_t host = graph.getPhysicalHostID(i);
Expand Down
1 change: 1 addition & 0 deletions pando-rt/include/pando-rt/drv_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#define PANDO_RT_DRV_INFO_HPP_

#ifdef PANDO_RT_USE_BACKEND_DRVX
#include "DrvAPIInfo.hpp"

namespace DrvAPI {
void setStageInit();
Expand Down

0 comments on commit a23bb97

Please sign in to comment.