octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling "parfor" as "for"


From: John W. Eaton
Subject: Re: Handling "parfor" as "for"
Date: Mon, 26 Sep 2011 02:01:32 -0400

On 25-Sep-2011, Mark Everitt wrote:

| I'd like to emphasise that parfor is intended for use only in "embarrassingly
| parallel" cases. i.e. each loop iteration must not depend on any other. That
| being the case, "parfor" can always be substituted for "for" in Matlab.
| Strangely enough, when a matlabpool is not available, Matlab actually
| interprets the loop backwards, at least in the version I have available. A
| straightforward replace of "parfor" with "for" in code is what is currently
| needed to run code in octave, but this is rather irritating with large
| volumes of code.

| I hope this helps.

Make and sed seem like the obvious solution to me as a way to automate
the task of converting your code so that it will run in Octave.

Also, please remember that everyone working on Octave is a volunteer,
and that features are generally added by people who want them, or
perhaps by someone who is being paid to do the work.  If you are not
in a position to contribute the code to implement this feature, would
you be willing to pay for it to be done?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]