I am unsure why or when one cilk_spawns a function. It should be clear that if a section of code in a computer program is taking a lot the program's time, then you must look at why.
In my case that usually is becuase there are some very long running serial for loops. So you give them the cilk_for treatment.But, when do you cilk_spawn a function? If you treated the serial for loops that are long running (with repsect to time), why do anything else? I am unsure as tto the advantage to spawning a function. It seems the loops (provided they are independent) is all thta you need to do.
My second questions is how does one run a program once on each core of a multicore processor. In my case a four core Xeon processor.
Any help apprecciated. Thanks in advance.