Skip to content

Commit

Permalink
feat(shm-fm): make dense gain cache the default one
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSeemaier committed Mar 5, 2024
1 parent 4e917be commit 3737b97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion kaminpar-shm/presets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Context create_default_context() {
.unlock_seed_nodes = true,
.use_exact_abortion_threshold = false,
.abortion_threshold = 0.999,
.gain_cache_strategy = GainCacheStrategy::SPARSE,
.gain_cache_strategy = GainCacheStrategy::DENSE,
.constant_high_degree_threshold = 0,
.k_based_high_degree_threshold = 1.0,

Expand Down
12 changes: 6 additions & 6 deletions kaminpar-shm/refinement/fm/fm_refiner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
#include "kaminpar-shm/metrics.h"
#include "kaminpar-shm/refinement/fm/fm_batch_stats.h"
#include "kaminpar-shm/refinement/fm/stopping_policies.h"
#include "kaminpar-shm/refinement/gains/sparse_gain_cache.h"
#include "kaminpar-shm/refinement/gains/dense_gain_cache.h"

#ifdef KAMINPAR_EXPERIMENTAL
#include "kaminpar-shm/refinement/gains/dense_gain_cache.h"
#include "kaminpar-shm/refinement/gains/hybrid_gain_cache.h"
#include "kaminpar-shm/refinement/gains/on_the_fly_gain_cache.h"
#include "kaminpar-shm/refinement/gains/sparse_gain_cache.h"
#include "kaminpar-shm/refinement/gains/tracing_gain_cache.h"
#endif // KAMINPAR_EXPERIMENTAL

Expand All @@ -35,13 +35,13 @@ SET_STATISTICS(true);

std::unique_ptr<Refiner> create_fm_refiner(const Context &ctx) {
switch (ctx.refinement.kway_fm.gain_cache_strategy) {
case GainCacheStrategy::SPARSE:
return std::make_unique<FMRefiner<SparseGainCache<true>>>(ctx);

#ifdef KAMINPAR_EXPERIMENTAL
case GainCacheStrategy::DENSE:
return std::make_unique<FMRefiner<DenseGainCache<true>>>(ctx);

#ifdef KAMINPAR_EXPERIMENTAL
case GainCacheStrategy::SPARSE:
return std::make_unique<FMRefiner<SparseGainCache<true>>>(ctx);

case GainCacheStrategy::ON_THE_FLY:
return std::make_unique<FMRefiner<OnTheFlyGainCache<true>>>(ctx);

Expand Down

0 comments on commit 3737b97

Please sign in to comment.