From 7181d247b8a407c4d1516258583fa737cd35a259 Mon Sep 17 00:00:00 2001 From: anakinxc <103552181+anakinxc@users.noreply.github.com> Date: Fri, 1 Dec 2023 15:13:55 +0800 Subject: [PATCH] Update parallel.h --- yacl/utils/parallel.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yacl/utils/parallel.h b/yacl/utils/parallel.h index df1c3d0c..a94319e8 100644 --- a/yacl/utils/parallel.h +++ b/yacl/utils/parallel.h @@ -51,6 +51,11 @@ body of your function, only data pointers. inline void parallel_for(int64_t begin, int64_t end, int64_t grain_size, const std::function& f); +inline void parallel_for(int64_t begin, int64_t end, + const std::function& f) { + parallel_for(begin, end, 1, f); +} + /* parallel_reduce