help-octave
[Top][All Lists]
Advanced

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

Octave: Parallelizing a for-loop in Octave.


From: Constantine Frangos
Subject: Octave: Parallelizing a for-loop in Octave.
Date: Thu, 1 Oct 2015 14:22:25 +0200 (SAST)

Hi all,

I am using Octave 3.8 on an intel quad-core cpu running ubuntu linux.

In Matlab, there is a construct for parallelizing a single for-loop
as follows:

function test_parallel;
...............
N = 1000;
results_vec = zeros(1,N);

parfor i1 = 1:N
%Some computations producing y.
results_vec(i1) = y;
end;
.............
%end of function.

How can the above construct be implemented in Octave (in order 
to run on a quad-core cpu) ?

Thanks.
Regards,
Constantine.



reply via email to

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