Skip to content

Commit

Permalink
#37 filter_largest now runs faster
Browse files Browse the repository at this point in the history
  • Loading branch information
carljohnsen committed Mar 23, 2024
1 parent 844df3e commit 5e9c1c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/cpp/cpu/connected_components.cc
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,9 @@ void filter_largest(const std::string &base_path, bool *__restrict__ mask, const
}

auto filter_start = std::chrono::high_resolution_clock::now();
#pragma omp parallel for schedule(static)
for (int64_t j = 0; j < e_this_chunk_size; j++) {
assert (i*e_global_size + j < (e_total_shape.z * e_total_shape.y * e_total_shape.x) && "Index out of bounds");
//assert (i*e_global_size + j < (e_total_shape.z * e_total_shape.y * e_total_shape.x) && "Index out of bounds");
mask[i*e_global_size + j] = chunk[j] == largest;
}
auto filter_end = std::chrono::high_resolution_clock::now();
Expand Down

0 comments on commit 5e9c1c2

Please sign in to comment.