Skip to content

Commit

Permalink
fix(dgl/runtime): add static_cast to fix clang compilation when using…
Browse files Browse the repository at this point in the history
… OpenMP (#7844)
  • Loading branch information
elohmeier authored Jan 26, 2025
1 parent ba73133 commit 51907e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/dgl/runtime/parallel_for.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void parallel_for(
auto chunk_size = divup((end - begin), num_threads);
auto begin_tid = begin + tid * chunk_size;
if (begin_tid < end) {
auto end_tid = std::min(end, chunk_size + begin_tid);
auto end_tid = std::min(end, static_cast<size_t>(chunk_size + begin_tid));
try {
f(begin_tid, end_tid);
} catch (...) {
Expand Down

0 comments on commit 51907e0

Please sign in to comment.