-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Features/foreach parallel construct #146
Features/foreach parallel construct #146
Conversation
There seems to be two tests, but only output for one of them. |
@supercooldave:
|
Re 1: I didn't mean that the array had uninitialised entries -- that's quite challenging to check, so let it be the programmer's problem. Re 2: Nested loops can come later, but it will be important. Re 3: What is the default behaviour (I haven't read the manual)? |
It also seems that |
|
Re Re 3: the body of the foreach is transformed into an |
Re re re 3: D'oh! |
Re Re 3: the body of the |
Re Re 3 (2): So you are saying, indirectly, that there is an array of futures returned, or what? |
Re Re 3 (3) there's nothing returned at the moment. it's similar to using just the |
The semantics is fine. I just wanted to know what it is. |
Not sure where we stand right now... 1 is no issue, 2 will come later and 3 means that a |
Nothing to fix. Maybe add a test case for empty arrays. |
I get the following warning I will merge as it passed all the tests (except the three pesky ones), but perhaps you should check that wraning |
Features/foreach parallel construct
Add
foreach
parallel construct that iterates over an array and executes the iterations in parallel (by using tasks behind the scenes). You cannot assume that the side-effects of theforeach
construct have been applied (finished) by the end offoreach
construct.E.g.
It's tested under Mac and Linux (vagrant) and has documentation. Feedback is welcome! :)