Serialization

The provided keywords are designed to have serial semantics. In other words, every Intel® Cilk™ Plus program corresponds to an equivalent C/C++ program. Such a C/C++ program is referred to as the serialization of the program. The serialization is particularly useful when debugging Intel® Cilk™ Plus programs.

How to Create a Serialization

The header file cilk_stub.h contains macros that redefine the Intel® Cilk™ Plus keywords and library calls into an equivalent serial form. Include cilk/cilk_stub.h before any other headers to build a serialization .

Linux* OS and Mac OS* X:

The Intel compiler provides command line options to facilitate serialization. There are two equivalent options:

-cilk-serialize

-include cilk/cilk_stub.h

For example, to build a serialized reducer called reducer.cpp (which contains Intel® Cilk™ Plus keywords), enter the following on the command line:

icc -O2 -cilk-serialize -o reducer_serial reducer.cpp

Windows* OS:

The Intel compiler provides command line options to facilitate serialization. There are two equivalent options:

/Qcilk-serialize

/FI cilk/cilk_stub.h

For example, to build a serialized reducer called reducer.cpp (which contains Intel® Cilk™ Plus keywords), enter the following on the command line:

icl /O2 /Qcilk-serialize reducer.cpp


Submit feedback on this help topic

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