Skip to content

Commit

Permalink
refactor(shm-fm): switch names for dense/sparse gain caches
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSeemaier committed Jul 30, 2024
1 parent 637d37c commit e942b97
Show file tree
Hide file tree
Showing 4 changed files with 630 additions and 630 deletions.
2 changes: 1 addition & 1 deletion kaminpar-shm/presets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Context create_default_context() {
.unlock_seed_nodes = true,
.use_exact_abortion_threshold = false,
.abortion_threshold = 0.999,
.gain_cache_strategy = GainCacheStrategy::DENSE,
.gain_cache_strategy = GainCacheStrategy::SPARSE,
.constant_high_degree_threshold = 0,
.k_based_high_degree_threshold = 1.0,

Expand Down
14 changes: 7 additions & 7 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/dense_gain_cache.h"
#include "kaminpar-shm/refinement/gains/sparse_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,15 +35,15 @@ SET_STATISTICS_FROM_GLOBAL();

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

case GainCacheStrategy::LARGE_K:
return std::make_unique<FMRefiner<DenseGainCache<false, LargeKDenseDeltaGainCache>>>(ctx);
return std::make_unique<FMRefiner<SparseGainCache<false, LargeKSparseDeltaGainCache>>>(ctx);

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

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

0 comments on commit e942b97

Please sign in to comment.