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
  • Loading branch information
elohmeier committed Dec 8, 2024
1 parent 88f109f commit 657cf5d
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 657cf5d

Please sign in to comment.