Does array notation in Cilk run in parallel? -
i.e.
int a [100] a [:] = 1; Does it try to make a 100 threads? Or what to do for a loop?
I thought it was parallel, but I just tested it and it did not look like that.
Is there any way to use multiple threads or is array signaling, notation?
no Silk Plus supports two types of similarity; Data Equality and Work Equality
Data equality simultaneously operates on multiple values simultaneously. It is sometimes referred to as symode - single instruction, multiple data A "sign" for array signaling compiler is that it is a data parallel operation and should be done using CPU's vector units. When there are more elements than fit in the vector unit, then the compiler will generate a loop around the operation. If the compiler can detect that many lines are working on the same set of data, then it will keep the loop around the whole calculation.
Work equality brings many functions together, where each task is executing its own flow instructions. If you want to calculate your calculations in parallel, then you have to use a cilk_for loop around your calculation. If you like them, you can also use TBB or OpenMP.
- Barry
Comments
Post a Comment