Can this be interpreted as a form of dynamic assignment?
@albystein I would consider this a form of dynamic assignment. Just like ISPC tasks, we essentially have a work queues, and different threads grab the next available piece of work to do whenever they finish their work. Since we are not dictating which threads specifically do certain pieces of work, this would not be a static assignment of work. It is just interesting to note the different implementation details between something like ISPC tasks and Cilk programs.
Is the extra overhead from maintaining multiple work queues really worth it to reduce synchronization costs? I imagine it's pretty application-specific
Having multiple work queues does provide some benefits since this way thread 1 won't have to stay idle by having to wait for the other thread's batch jobs to finish executing and could start executing bar
Please log in to leave a comment.
one thing that differentiates cilk from a traditional multi-threaded program is that a cilk program maintains its own work queue (per thread) for keeping track of unassigned workload