[PATCH] [lld][Core] Implement parallel_for_each
Rui Ueyama
ruiu at google.com
Mon Mar 16 12:50:56 PDT 2015
================
Comment at: include/lld/Core/Parallel.h:303
@@ +302,3 @@
+ ? length
+ : length / minParallelSizeForEach;
+ while (taskSize <= distance(begin, end)) {
----------------
shankarke wrote:
> ruiu wrote:
> > This expression doesn't make sense again. You divide length of the array with minSize, which is equal to how many minSize chunks in the array. It's not a task size.
> >
> > Let's make this simple as a starter. Just set 1024 to taskSize unconditionally. That's probably large enough. You may still have to run a test with that number, though.
> will change. we cannot set taskSize to 1024 unconditionally if the length < 1024.
Yes we can. The last std::for_each outside the while loop is for that.
http://reviews.llvm.org/D8348
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list