Intel® Cilk™ Plus provides a number of related elements such as keywords, command line options, environment variables and pragmas. The following table provides a summary.
Element | Description |
Keywords: | |
_Cilk_spawn |
Modifies a function call statement to tell the runtime system that the function may (but is not required to) run in parallel with the caller |
_Cilk_sync |
Indicates that the current function cannot continue past this point in parallel with its spawned children |
_Cilk_for |
Specifies a loop that permits loop iterations to run in parallel; is a replacement for the normal C/C++ for loop. This statement divides a loop into chunks containing one or more loop iterations. Each chunk is executed serially, and is spawned as a chunk during the execution of the loop. |
Pragmas: | |
cilk grainsize |
Specifies the grain size for one cilk_for loop |
simd |
Expresses vector parallelism for utilizing hardware SIMD parallelism |
Predefined Macro: | |
__cilk |
Specifies the version number. The value is set at 200 for this release. |
Environment Variable: | |
CILK_NWORKERS |
Specifies the number of worker threads. |
Elemental Function: | |
declspec(vector) |
Used to write an elemental function. See Elemental Functions. |
Compiler Options: | |
/Qcilk-serialize, cilk-serialize |
Specifies that a Intel® Cilk™ Plus program should be serialized. |
/Qintel-extensions[-], -[no]intel-extensions |
Enables or disables Intel language extensions (which include Intel® Cilk™ Plus). Intel language extensions are on by default. |
Header files (located in include/cilk): | |
cilk.h |
Defines macros that provide names with simpler conventions (cilk_spawn, cilk_sync and cilk_for) |
cilk_api.h |
Declares the runtime functions and classes |
cilk_stub.h |
Can be used to serialize a Intel® Cilk™ Plus application |
holder.h |
Contains the definition of the cilk::holder template, as described in the section on Holders. |
reducer.h |
Contains common reducer definitions. |
reducer_list.h reducer_max.h reducer_min.h reducer_opadd.h reducer_opand.h reducer_opor.h reducer_opxor.h reducer_ostream.h reducer_string.h |
Reducers provided in the reducer library. See Reducer Library. |
Copyright © 1996-2011, Intel Corporation. All rights reserved.