Commit dacd4250 authored by Sebastian Woelke's avatar Sebastian Woelke

for testing

parent fa5f795c
benchmarks @ 9f02100b
Subproject commit c2cdbbb3824f405eb06ff9413416cacac66f7534 Subproject commit 9f02100b879d429b6abe84a159098184bca864ef
...@@ -174,11 +174,11 @@ public: ...@@ -174,11 +174,11 @@ public:
while (current_cache_obj while (current_cache_obj
&& current_cache_obj->type == hwloc_obj_type_t::HWLOC_OBJ_CACHE) { && current_cache_obj->type == hwloc_obj_type_t::HWLOC_OBJ_CACHE) {
auto result_pus = hwloc_bitmap_make_wrapper(); auto result_pus = hwloc_bitmap_make_wrapper();
traverse_hwloc_obj(result_pus.get(), topo, current_cache_obj, current_pu_id, traverse_hwloc_obj(result_pus.get(), topo, current_cache_obj,
last_cache_obj); current_pu_id, last_cache_obj);
if (!hwloc_bitmap_iszero(result_pus.get())) { if (!hwloc_bitmap_iszero(result_pus.get())) {
result_map.insert(make_pair(current_cache_lvl / distance_divider, result_map.insert(make_pair(current_cache_lvl / distance_divider,
move(result_pus))); std::move(result_pus)));
} }
++current_cache_lvl; ++current_cache_lvl;
last_cache_obj = current_cache_obj; last_cache_obj = current_cache_obj;
...@@ -217,7 +217,7 @@ public: ...@@ -217,7 +217,7 @@ public:
auto result_map_it = result_map.find(dist_ptr[x]); auto result_map_it = result_map.find(dist_ptr[x]);
if (result_map_it == result_map.end()) { if (result_map_it == result_map.end()) {
// create a new distane group // create a new distane group
result_map.insert(make_pair(dist_ptr[x], move(tmp_pus))); result_map.insert(make_pair(dist_ptr[x], std::move(tmp_pus)));
} else { } else {
// add PUs to an available distance group // add PUs to an available distance group
hwloc_bitmap_or(result_map_it->second.get(), hwloc_bitmap_or(result_map_it->second.get(),
...@@ -249,14 +249,14 @@ public: ...@@ -249,14 +249,14 @@ public:
} }
cache_dists.insert(make_move_iterator(begin(node_dists)), cache_dists.insert(make_move_iterator(begin(node_dists)),
make_move_iterator(end(node_dists))); make_move_iterator(end(node_dists)));
return move(cache_dists); return std::move(cache_dists);
} else if (!cache_dists.empty() && node_dists.empty()) { } else if (!cache_dists.empty() && node_dists.empty()) {
// caf cannot it collected all pus because because it CPU could have two // caf cannot it collected all pus because because it CPU could have two
// L3-caches and only of them is represented by cahces_dists. // L3-caches and only of them is represented by cahces_dists.
CAF_CRITICAL("caf could not reliable collect all PUs"); CAF_CRITICAL("caf could not reliable collect all PUs");
} else if (cache_dists.empty() && !node_dists.empty()) { } else if (cache_dists.empty() && !node_dists.empty()) {
wp_matrix_first_node_idx = 0; wp_matrix_first_node_idx = 0;
return move(node_dists); return std::move(node_dists);
} else { } else {
// both maps are empty, which happens on a single core machine // both maps are empty, which happens on a single core machine
wp_matrix_first_node_idx = -1; wp_matrix_first_node_idx = -1;
...@@ -293,15 +293,17 @@ public: ...@@ -293,15 +293,17 @@ public:
} }
pu_distance_map_t tmp_node_dists; pu_distance_map_t tmp_node_dists;
tmp_node_dists.insert( tmp_node_dists.insert(
make_pair(normalized_numa_node_dist, move(all_pus))); make_pair(normalized_numa_node_dist, std::move(all_pus)));
pu_dists = merge_dist_maps(move(cache_dists), move(tmp_node_dists), pu_dists =
wp_matrix_first_node_idx); merge_dist_maps(std::move(cache_dists), std::move(tmp_node_dists),
wp_matrix_first_node_idx);
} else { } else {
auto cache_dists = traverse_caches(topo, current_pu); auto cache_dists = traverse_caches(topo, current_pu);
auto node_dists = traverse_nodes(topo, node_dist_matrix, current_pu, auto node_dists = traverse_nodes(topo, node_dist_matrix, current_pu,
current_node.get()); current_node.get());
pu_dists = merge_dist_maps(move(cache_dists), move(node_dists), pu_dists =
wp_matrix_first_node_idx); merge_dist_maps(std::move(cache_dists), std::move(node_dists),
wp_matrix_first_node_idx);
} }
xxx(current_pu, pu_dists); xxx(current_pu, pu_dists);
// map PU ids to worker* sorted by its distance // map PU ids to worker* sorted by its distance
...@@ -319,7 +321,7 @@ public: ...@@ -319,7 +321,7 @@ public:
} }
// current_worker_group can be empty if pus of this level are deactivated // current_worker_group can be empty if pus of this level are deactivated
if (!current_worker_group.empty()) { if (!current_worker_group.empty()) {
result_wp_matrix.emplace_back(move(current_worker_group)); result_wp_matrix.emplace_back(std::move(current_worker_group));
} }
} }
//accumulate steal_groups - each group contains all lower level groups //accumulate steal_groups - each group contains all lower level groups
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment