Skip to content

Commit

Permalink
fix(io): compile error with Clang due to capturing a structured binding
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSeemaier committed Jul 17, 2024
1 parent 8f1de40 commit dd93cf4
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions apps/io/dist_parhip_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,14 @@ DistributedCSRGraph csr_read(
if (header.has_node_weights) {
node_weights.resize(num_local_nodes + mapper.next_ghost_node(), static_array::noinit);

tbb::parallel_for(tbb::blocked_range<NodeID>(0, num_local_nodes), [&](const auto &r) {
for (NodeID u = r.begin(); u != r.end(); ++u) {
node_weights[u] = raw_node_weights[first_node + u];
}
});
tbb::parallel_for(
tbb::blocked_range<NodeID>(0, num_local_nodes),
[&, first_node = first_node](const auto &r) {
for (NodeID u = r.begin(); u != r.end(); ++u) {
node_weights[u] = raw_node_weights[first_node + u];
}
}
);
}

auto [global_to_ghost, ghost_to_global, ghost_owner] = mapper.finalize();
Expand Down Expand Up @@ -451,11 +454,14 @@ DistributedCompressedGraph compressed_read(
if (header.has_node_weights) {
node_weights.resize(num_local_nodes + mapper.next_ghost_node(), static_array::noinit);

tbb::parallel_for(tbb::blocked_range<NodeID>(0, num_local_nodes), [&](const auto &r) {
for (NodeID u = r.begin(); u != r.end(); ++u) {
node_weights[u] = raw_node_weights[first_node + u];
}
});
tbb::parallel_for(
tbb::blocked_range<NodeID>(0, num_local_nodes),
[&, first_node = first_node](const auto &r) {
for (NodeID u = r.begin(); u != r.end(); ++u) {
node_weights[u] = raw_node_weights[first_node + u];
}
}
);
}

DistributedCompressedGraph graph(
Expand Down

0 comments on commit dd93cf4

Please sign in to comment.