[Scilab-users] parallelization
Paul Carrico
paul.carrico at free.fr
Sat Nov 17 23:30:14 CET 2012
Dear all,
Here is a basic function I would like to perform on a multicore architecture
(the function is just to illustrate the issue) :
- the inputs have been split into 18 sub-parts
- 18*20 = 360°
elementary Sherlock
Thus :
- How to use parallel_run macro ? (not understood)
- How to store the intermediate results into a final matrix ? has
the chronology of writing can be imposed ?
- 8 procs
however 18 = 2*8 +2
troubles ?
Thanks for any feedback / advice
Paul
// #####################################################################
mode(0);
nb = 18;
i = [1 : 1 : 20]';
j = [1 : 1 : 20]';
[nl,nc] = size(i)
function vect_fct=fct_angles(i, j)
vect_fct = [i j cos(i)+sin(j) -sin(j)];
endfunction
//vect1 = zeros(nb*nl,4);
vect1 = [];
for k = 1 : nb
vect1 = [vect1 ; fct_angles(nl*(k-1)+i([1: nl],1),nl*(k -1)+j([1:
nl],1))];
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20121117/634c9fd6/attachment.htm>
More information about the users
mailing list