Skip to content

Commit

Permalink
Merge branch 'main' of github.com:dsalwasser/KaMinPar
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSeemaier committed Apr 29, 2024
2 parents acd9944 + 97ab058 commit 5f87e87
Show file tree
Hide file tree
Showing 43 changed files with 918 additions and 1,104 deletions.
386 changes: 3 additions & 383 deletions apps/benchmarks/shm_compressed_graph_benchmark.cc

Large diffs are not rendered by default.

18 changes: 10 additions & 8 deletions apps/benchmarks/shm_label_propagation_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

#include <tbb/global_control.h>

#include "kaminpar-shm/coarsening/lp_clustering.h"
#include "kaminpar-shm/coarsening/clustering/lp_clusterer.h"
#include "kaminpar-shm/coarsening/max_cluster_weights.h"
#include "kaminpar-shm/context_io.h"
#include "kaminpar-shm/graphutils/permutator.h"
#include "kaminpar-shm/partition_utils.h"

#include "kaminpar-common/console_io.h"
#include "kaminpar-common/logger.h"
Expand Down Expand Up @@ -74,19 +74,21 @@ int main(int argc, char *argv[]) {
graph::remove_isolated_nodes(graph, ctx.partition);
}

const NodeWeight max_cluster_weight =
compute_max_cluster_weight(ctx.coarsening, graph, ctx.partition);

LPClustering lp_clustering(graph.n(), ctx.coarsening);
lp_clustering.set_max_cluster_weight(max_cluster_weight);
LPClustering lp_clustering(ctx.coarsening);
lp_clustering.set_max_cluster_weight(compute_max_cluster_weight<NodeWeight>(
ctx.coarsening, ctx.partition, graph.n(), graph.total_node_weight()
));
lp_clustering.set_desired_cluster_count(0);

GLOBAL_TIMER.reset();

ENABLE_HEAP_PROFILER();
START_HEAP_PROFILER("Allocation");
StaticArray<NodeID> clustering(graph.n());
STOP_HEAP_PROFILER();
START_HEAP_PROFILER("Label Propagation");
TIMED_SCOPE("Label Propagation") {
lp_clustering.compute_clustering(graph, false);
lp_clustering.compute_clustering(clustering, graph, false);
};
STOP_HEAP_PROFILER();
DISABLE_HEAP_PROFILER();
Expand Down
6 changes: 3 additions & 3 deletions apps/benchmarks/shm_variable_length_codec_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,16 @@ template <typename Int>
void benchmark_rle(std::string_view name, const std::size_t count, const std::uint8_t *values_ptr) {
SCOPED_TIMER(name);

VarIntRunLengthDecoder<Int> decoder(values_ptr);
decoder.decode(count, [](const Int value) { do_not_optimize(value); });
VarIntRunLengthDecoder<Int> decoder(values_ptr, count);
decoder.decode([](const Int value) { do_not_optimize(value); });
}

template <typename Int>
void benchmark_sve(std::string_view name, const std::size_t count, const std::uint8_t *values_ptr) {
SCOPED_TIMER(name);

VarIntStreamDecoder<Int> decoder(values_ptr, count);
decoder.decode(count, [](const Int value) { do_not_optimize(value); });
decoder.decode([](const Int value) { do_not_optimize(value); });
}

template <typename Lambda>
Expand Down
1 change: 1 addition & 0 deletions apps/io/parhip_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <sys/mman.h>
#include <sys/stat.h>
#include <tbb/parallel_for.h>
#include <unistd.h>

#include "kaminpar-common/logger.h"

Expand Down
Loading

0 comments on commit 5f87e87

Please sign in to comment.