cilk_sync

The cilk_sync statement indicates that the current function cannot continue in parallel with its spawned children. After the children all complete, the current function can continue.

The syntax is as follows:


cilk_sync;

cilk_sync only syncs with children spawned by this function. Children of other functions are not affected.

There is an implicit cilk_sync at the end of every function and every try block that contains a cilk_spawn. The semantic is defined this way for these reasons:


Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.