A header-only C++ parallel algorithm library. It is based on a parallel data structure called Toggle Tree.
[toggle-tree/dataset]$ cp example_of_config.sh config.shThen configure your graph directory inside it.
Use the following commands to download and generate the graphs:
[toggle-tree/dataset]$ bash ./download_graphs.sh
[toggle-tree/dataset/generate_weight]$ bash ./generate.sh 16Test scripts are provided in benchmarks/.
For example:
[toggle-tree/benchmarks/graph/breadth_first_search/dist]$ bash ./test.shAfter running benchmarks, two .csv files will be generated.
benchmark.csv contains timing results. verify.csv provides a fast sanity check.
This is a header-only C++ library. You may add include/ to the include path when compiling, or use CMakeLists.txt.
Standard: C++20
When TOGGLE_TREE_WEAK_MEMORY is defined, the library can be built on any architecture.
It is by default disabled on Linux (x86_64) with GCC/Clang, where Toggle Tree can then have an ideal theoretic bound under the BMI2 instruction set.
When TOGGLE_TREE_USE_PARLAY is defined, parlaylib can be used as the scheduler,
Since different schedulers can not exist in the mean time, this option is for those who want to use Toggle Tree together with parlaylib primitives.
Note that parlaylib scheduler has a bug (see parlaylib issue #99).
You are recommended to fix it locally before usage.
Our default scheduler is a lightweight but reliable design: scheduler queue overflows or wraparounds do not cause it to fail.
toggle::num_workerstoggle::worker_idtoggle::parallel_fortoggle::parallel_do
toggle::Array
toggle::CSRnmoffsetout_offsetin_offsetedgeout_edgein_edgeweighted_edgeweighted_out_edgeweighted_in_edge
toggle::IndexSetemptycontainsinsertremovefor_eachconsume_eachfor_rangeconsume_rangereducenum_elementssample
toggle::IndexMapemptyinsertrepairextract_minextract_prefix_min
toggle::LocalQueuepop_toppush_backfor_eachsequential_for_each
toggle::reducetoggle::scantoggle::packtoggle::pack_intotoggle::hash32toggle::hash64toggle::random_permutationtoggle::parallel_sort
toggle::read_graphtoggle::write_graphtoggle::make_random_weight
toggle::breadth_first_searchtoggle::breadth_first_search_treetoggle::graph_coloringtoggle::k_core_decompositiontoggle::bellman_fordtoggle::dijkstra