[PATCH] [lld][Core] Implement parallel_for_each
Rui Ueyama
ruiu at google.com
Mon Mar 16 13:05:02 PDT 2015
================
Comment at: include/lld/Core/Parallel.h:300
@@ +299,3 @@
+ const ptrdiff_t minParallelSizeForEach = 1024;
+ int64_t length = std::distance(begin, end);
+ int64_t taskSize =
----------------
Remove length.
================
Comment at: include/lld/Core/Parallel.h:304
@@ +303,3 @@
+ while (taskSize <= std::distance(begin, end)) {
+ tg.spawn([=, &func, &tg] { std::for_each(begin, begin + taskSize, func); });
+ begin += taskSize;
----------------
Remove &tg.
http://reviews.llvm.org/D8348
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list