implementation of the hilbert curve load balancing
More...
Go to the source code of this file.
|
| namespace | shamrock |
| | namespace for the main framework
|
| |
|
| template<class Torder , class Tweight > |
| void | shamrock::scheduler::details::apply_ordering (std::vector< LoadBalancedTile< Torder, Tweight > > &lb_vec) |
| | Sort tiles by their ordering value.
|
| |
| template<class Torder , class Tweight > |
| std::vector< i32 > | shamrock::scheduler::details::lb_startegy_parallel_sweep (const std::vector< TileWithLoad< Torder, Tweight > > &lb_vector, i32 wsize) |
| | Load balance using parallel sweep strategy based on accumulated load.
|
| |
| template<class Torder , class Tweight > |
| std::vector< i32 > | shamrock::scheduler::details::lb_startegy_roundrobin (const std::vector< TileWithLoad< Torder, Tweight > > &lb_vector, i32 wsize) |
| | Load balance using round-robin strategy ignoring actual load values.
|
| |
| template<class Torder , class Tweight > |
| LBMetric | shamrock::scheduler::details::compute_LB_metric (const std::vector< TileWithLoad< Torder, Tweight > > &lb_vector, const std::vector< i32 > &new_owners, i32 world_size, f64 strategy_weight) |
| | Compute load balance quality metrics.
|
| |
| template<class Torder , class Tweight > |
| std::vector< i32 > | shamrock::scheduler::load_balance (std::vector< TileWithLoad< Torder, Tweight > > &&lb_vector, i32 world_size=shamcomm::world_size()) |
| | load balance the input vector
|
| |
implementation of the hilbert curve load balancing
- Author
- Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)
Definition in file LoadBalanceStrategy.hpp.
◆ apply_ordering()
template<class Torder , class Tweight >
| void shamrock::scheduler::details::apply_ordering |
( |
std::vector< LoadBalancedTile< Torder, Tweight > > & |
lb_vec | ) |
|
|
inline |
Sort tiles by their ordering value.
- Template Parameters
-
| Torder | Ordering value type |
| Tweight | Load weight type |
- Parameters
-
| lb_vec | Vector of load-balanced tiles to sort |
Definition at line 58 of file LoadBalanceStrategy.hpp.
◆ compute_LB_metric()
template<class Torder , class Tweight >
| LBMetric shamrock::scheduler::details::compute_LB_metric |
( |
const std::vector< TileWithLoad< Torder, Tweight > > & |
lb_vector, |
|
|
const std::vector< i32 > & |
new_owners, |
|
|
i32 |
world_size, |
|
|
f64 |
strategy_weight |
|
) |
| |
|
inline |
Compute load balance quality metrics.
- Template Parameters
-
| Torder | Ordering value type |
| Tweight | Load weight type |
- Parameters
-
| lb_vector | Tiles with load information |
| new_owners | Owner assignments to evaluate |
| world_size | Number of workers |
- Returns
- LBMetric Statistics about load distribution (min, max, mean, stddev)
Definition at line 222 of file LoadBalanceStrategy.hpp.
◆ lb_startegy_parallel_sweep()
template<class Torder , class Tweight >
| std::vector< i32 > shamrock::scheduler::details::lb_startegy_parallel_sweep |
( |
const std::vector< TileWithLoad< Torder, Tweight > > & |
lb_vector, |
|
|
i32 |
wsize |
|
) |
| |
|
inline |
Load balance using parallel sweep strategy based on accumulated load.
- Template Parameters
-
| Torder | Ordering value type |
| Tweight | Load weight type |
- Parameters
-
| lb_vector | Tiles with load information |
| wsize | Number of workers |
- Returns
- std::vector<i32> New owner assignments for each tile
Definition at line 75 of file LoadBalanceStrategy.hpp.
◆ lb_startegy_roundrobin()
template<class Torder , class Tweight >
| std::vector< i32 > shamrock::scheduler::details::lb_startegy_roundrobin |
( |
const std::vector< TileWithLoad< Torder, Tweight > > & |
lb_vector, |
|
|
i32 |
wsize |
|
) |
| |
|
inline |
Load balance using round-robin strategy ignoring actual load values.
- Template Parameters
-
| Torder | Ordering value type |
| Tweight | Load weight type |
- Parameters
-
| lb_vector | Tiles with load information |
| wsize | Number of workers |
- Returns
- std::vector<i32> New owner assignments for each tile
Definition at line 144 of file LoadBalanceStrategy.hpp.
◆ load_balance()
template<class Torder , class Tweight >
load balance the input vector
- Template Parameters
-
| Torder | ordering value (hilbert, morton, ...) |
| Tweight | weight type |
- Parameters
-
- Returns
- std::vector<i32> The new owner list
Definition at line 274 of file LoadBalanceStrategy.hpp.