Question

I have several blocks of the following code that each use there own matrix. Is there a way to run each block in it's own thread rather then run all of them sequentially?

for i=1:length(DJI)
DJI2(:,1) = reshape(datenum(strvcat(DJI(:,2)(:)), length(DJI(:,2)),'yyyy-mm-dd'));
DJI2(:,2:6) = reshape(str2num(strvcat(DJI(:,3:7)(:)), length(DJI(:,3:7))));
end
Was it helpful?

Solution

According to members on the Octave email list the only way to do this is with the following library. http://atc.ugr.es/javier-bin/mpitb It is designed to be used on multiple machines but looks like it can be used on an individual one as well.

OTHER TIPS

I know this question was about Octave, but just to let you know, MATLAB provides this functionality via PARFOR.

P.S. I'm confused by your code snippet, since the loop variable "i" doesn't actually appear in the loop anywhere.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top