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:
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 the serialized reducer example, build reducer.cpp (which contains Intel® Cilk™ Plus keywords) as follows:
icc -O2 -Qcilk-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 the serialized reducer example, build reducer.cpp (which contains Intel® Cilk™ Plus keywords) as follows:
icl /O2 /Qcilk-serialize reducer.cpp
Copyright © 1996-2010, Intel Corporation. All rights reserved.