Intel® C++ Compiler XE 13.1 User and Reference Guides

cilk_sync

The keyword name is _Cilk_sync. The header file <cilk/cilk.h> defines macros that provide names with simpler conventions (in this case, cilk_sync). This document uses the names as defined in cilk.h.

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 sync is needed for these reasons:

The implicit cilk_sync occurs after destructors are invoked.


Submit feedback on this help topic