That is the general idea, but the compiler may decide that the loop is too small to justify parallelization.  There are some compiler controls that guide the estimate in terms of estimated iteration count.  You'll need to set that high enough to get the loop to parallelize

On Monday, March 3, 2014, Johann Smit <smit.johann@gmail.com> wrote:
Hi everyone!

I've written the following silly program, to see how the compiler builds a concurrent program vs a sequential program:

define main

type OneDim = array[integer];

function domap(thesize:integer returns OneDim)
  for i in 1,thesize
    new_count := i + 222
  returns array of new_count
  end for
end function % domap

function main(thesize : integer returns OneDim)
 let c:=domap(thesize)
 in c
 end let
end function % main

I've compiled using the following parameters:

sisalc -concur -C map.sis

and 

sisalc -no-concur -C map.sis

The output looks the same ,as in the loop is compiled to an ordinary "for(;;)" loop.  Does this mean that when I run the program with parameter -w4 (that is, 4 workers) and I give as input 1024, there will be 4 threads which each run 256 iterations of the loop?

Regards,
Johann


On Thu, Feb 6, 2014 at 7:56 PM, Johann Smit <smit.johann@gmail.com> wrote:
Hi everyone!

I have read a few papers talking about Sisal 2.0, which is supposed to have things like higher-order functions, etc.  However, I cannot find an actual Sisal 2.0 compiler anywhere.  Was such a compiler ever developed?

Kind Regards,
Johann