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

 

_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to