From 657cf5da7b1fced285b314f1997e22f3c3bf552e Mon Sep 17 00:00:00 2001 From: Enno Richter Date: Sun, 8 Dec 2024 06:12:56 +0100 Subject: [PATCH] fix(dgl/runtime): add static_cast to fix clang compilation when using OpenMP --- include/dgl/runtime/parallel_for.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dgl/runtime/parallel_for.h b/include/dgl/runtime/parallel_for.h index 85143de8e980..d4e9c3913a47 100644 --- a/include/dgl/runtime/parallel_for.h +++ b/include/dgl/runtime/parallel_for.h @@ -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(chunk_size + begin_tid)); try { f(begin_tid, end_tid); } catch (...) {