Skip to content

Commit

Permalink
add triangle counting to edit scalability (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
meyerzinn authored Mar 28, 2024
1 parent 92f55da commit cfc7228
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion microbench/edit_scalability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@

#include "scea/algo/bfs.hpp"
#include "scea/algo/nop.hpp"
#include "scea/algo/tc.hpp"
#include "scea/graph/lscsr.hpp"
#include "scea/graph/morph.hpp"
#include "scea/graph/adj.hpp"
#include "scea/graph/csr.hpp"
#include "scea/stats.hpp"

enum GraphType { lscsr, morph, adj, lccsr };
enum AlgoName { nop, sssp_bfs };
enum AlgoName { nop, sssp_bfs, tc };

std::istream& operator>>(std::istream& in, GraphType& type) {
std::string name;
Expand Down Expand Up @@ -50,6 +51,8 @@ std::istream& operator>>(std::istream& in, AlgoName& name) {
name = nop;
} else if (type == "bfs") {
name = sssp_bfs;
} else if (type == "tc") {
name = tc;
} else {
// Handle invalid input (throw exception, print error message, etc.)
in.setstate(std::ios_base::failbit);
Expand Down Expand Up @@ -141,6 +144,10 @@ int main(int argc, char const* argv[]) {
algo = std::make_unique<scea::algo::SSSP_BFS>(vm["bfs-src"].as<uint64_t>());
break;
}
case AlgoName::tc: {
algo = std::make_unique<scea::algo::TriangleCounting>();
break;
}
default:
throw std::runtime_error("unknown algorithm");
}
Expand Down

0 comments on commit cfc7228

Please sign in to comment.