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

Summary of Intel® Cilk™ Plus Language Features

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.

See cilk_spawn.

_Cilk_sync

Indicates that the current function cannot continue past this point in parallel with its spawned children.

See cilk_sync.

_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.

See cilk_for.

Pragmas:

cilk grainsize

Specifies the grain size for one cilk_for loop.

See cilk_for.

simd

Expresses vector parallelism for utilizing hardware SIMD parallelism.

See simd.

Predefined Macro:

__cilk

Specifies the supported Intel® Cilk™ Plus version number. The value is set at 200 for this release. If this macro is not defined, the compiler does not support Intel® Cilk™ Plus.

Environment Variable:

CILK_NWORKERS

Specifies the number of worker threads .

See Set Worker Count.

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.

See Serialization.

/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/cilk.h

Defines macros that provide names with simpler conventions (cilk_spawn, cilk_sync and cilk_for) .

cilk/cilk_api.h

Declares the runtime functions and classes.

cilk/cilk_stub.h

Can be used to serialize an Intel® Cilk™ Plus application .

cilk/holder.h

Contains the definition of the cilk::holder template.

See Introduction to Holders.

cilk/reducer.h

Contains common reducer definitions.

See Introduction to Reducers.

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.


Submit feedback on this help topic