Skip to content

Commit

Permalink
improvements from gts repo
Browse files Browse the repository at this point in the history
  • Loading branch information
etwest committed Sep 24, 2024
1 parent f68d883 commit 1408005
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ FetchContent_Declare(
GutterTree

GIT_REPOSITORY https://github.com/GraphStreamingProject/GutterTree.git
GIT_TAG main
GIT_TAG better_pht
)

# Get StreamingUtilities
Expand Down
12 changes: 8 additions & 4 deletions include/graph_sketch_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ class GraphSketchDriver {

auto task = [&](int thr_id) {
GraphStreamUpdate update_array[update_array_size];

// buffer of updates for gts
update_t gts_buffer[2 * update_array_size];
#ifdef VERIFY_SAMPLES_F
GraphVerifier local_verifier(sketching_alg->get_num_vertices());
#endif
Expand All @@ -159,6 +162,7 @@ class GraphSketchDriver {
upd.type = static_cast<UpdateType>(update_array[i].type);
if (upd.type == BREAKPOINT) {
// reached the breakpoint. Update verifier if applicable and return
gts->batch_insert(gts_buffer, 2 * i, thr_id);
#ifdef VERIFY_SAMPLES_F
std::lock_guard<std::mutex> lk(verifier_mtx);
verifier->combine(local_verifier);
Expand All @@ -167,14 +171,14 @@ class GraphSketchDriver {
}
else {
sketching_alg->pre_insert(upd, thr_id);
Edge edge = upd.edge;
gts->insert({edge.src, edge.dst}, thr_id);
gts->insert({edge.dst, edge.src}, thr_id);
gts_buffer[2 * i] = {upd.edge.src, upd.edge.dst};
gts_buffer[2 * i + 1] = {upd.edge.dst, upd.edge.src};
#ifdef VERIFY_SAMPLES_F
local_verifier.edge_update(edge);
local_verifier.edge_update(upd.edge);
#endif
}
}
gts->batch_insert(gts_buffer, 2 * updates, thr_id);
}
};

Expand Down
3 changes: 2 additions & 1 deletion tools/process_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ int main(int argc, char **argv) {
std::cout << std::endl;

auto driver_config = DriverConfiguration().gutter_sys(CACHETREE).worker_threads(num_threads);
auto cc_config = CCAlgConfiguration().batch_factor(1);
driver_config.gutter_conf().wq_batch_per_elm(8);
auto cc_config = CCAlgConfiguration().batch_factor(2);
CCSketchAlg cc_alg{num_nodes, get_seed(), cc_config};
GraphSketchDriver<CCSketchAlg> driver{&cc_alg, &stream, driver_config, reader_threads};

Expand Down

0 comments on commit 1408005

Please sign in to comment.