Skip to content

Commit 6dca8b0

Browse files
committed
remve perf.data, added comments
1 parent d8abb69 commit 6dca8b0

4 files changed

Lines changed: 30 additions & 0 deletions

File tree

include/osp/bsp/model/IBspSchedule.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ class IBspSchedule {
9797
/**
9898
* @brief Get the staleness of the schedule.
9999
*
100+
* The staleness determines the minimum number of supersteps that must elapse between the
101+
* assignment of a node to a processor and the assignment of one of its dependent neighbors
102+
* to a different processor. For a standard BSP schedule, the staleness is 1.
103+
*
100104
* @return The staleness of the schedule.
101105
*/
102106
virtual unsigned GetStaleness() const { return 1; }

include/osp/bsp/scheduler/LocalSearch/KernighanLin/comm_cost_modules/FastDeltaTacker.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ limitations under the License.
2020

2121
#include <vector>
2222

23+
/**
24+
* @brief Efficient sparse tracker for accumulating delta values across processors.
25+
*
26+
* FastDeltaTracker is used in local search algorithms (like Kernighan-Lin) to efficiently
27+
* track incremental changes (deltas) to metrics such as communication costs for each processor.
28+
* Instead of iterating over all processors to find or reset changes, it maintains a dense array
29+
* for O(1) lookups and updates, alongside a sparse list (`dirtyProcs_`) of only the modified
30+
* (non-zero) processors. This allows for fast O(1) additions, removals, and O(|dirty_procs|) clearing.
31+
*
32+
* @tparam CommWeightT The numerical type used for the communication weights/deltas.
33+
*/
2334
template <typename CommWeightT>
2435
struct FastDeltaTracker {
2536
std::vector<CommWeightT> denseVals_; // Size: num_procs

include/osp/bsp/scheduler/LocalSearch/KernighanLin/kl_improver_scan.hpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@ limitations under the License.
2323

2424
namespace osp {
2525

26+
/**
27+
* @class KlImproverScan
28+
* @brief An exhaustive, scan-based approach for finding the best Kernighan-Lin (KL) moves.
29+
*
30+
* This class implements a move-finding strategy that recomputes the gain for all active nodes
31+
* after each move. Unlike priority queue based approaches that try to incrementally update
32+
* affected nodes, `KlImproverScan` exhaustively scans the entire active set (`affinityTable_`)
33+
* during each move selection phase to find the move(s) with the highest gain.
34+
*
35+
* This approach makes sense and is often preferred for more complex communication cost
36+
* functions like BSP and Max BSP. In these models, a single move can trigger cascading cost
37+
* updates for a very large number of nodes (compared to simpler models like total communication
38+
* cost), making incremental priority queue updates highly inefficient due to the sheer volume
39+
* of affected elements.
40+
*/
2641
template <typename GraphT,
2742
typename CommCostFunctionT,
2843
typename MemoryConstraintT = NoLocalSearchMemoryConstraint,

perf.data

-335 KB
Binary file not shown.

0 commit comments

Comments
 (0)