- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to get the serial elision of the Cilk c program? This was a nice option in Cilk Arts.
When and why do you underscore precedingcilk_spawn and cilk_for in Intel Cilk ? It seems that it is rare but at times the statements listed above must be precded by an underscore.
Any help appreciated.
Newport_j
When and why do you underscore precedingcilk_spawn and cilk_for in Intel Cilk ? It seems that it is rare but at times the statements listed above must be precded by an underscore.
Any help appreciated.
Newport_j
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The icc command line option
-cilk-serialize
may do what you want.
I agree that the extra underscore and the capitialization as in
_Cilk_sync
are an annoyance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The keywords in Cilk Plusare _Cilk_spawn, _Cilk_sync, and _Cilk_for.
If you have included the followingfile:
#include
then you can write "cilk_spawn" instead of "_Cilk_spawn" (and similarly "cilk_sync" and "cilk_for").
This includefile contains preprocessor macros to make this work. If "cilk_spawn" (without the underscore)_ works in your code, then this file has probably already been included.
Cheers,
Jim
If you have included the followingfile:
#include
then you can write "cilk_spawn" instead of "_Cilk_spawn" (and similarly "cilk_sync" and "cilk_for").
This includefile contains preprocessor macros to make this work. If "cilk_spawn" (without the underscore)_ works in your code, then this file has probably already been included.
Cheers,
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
in addition:
Setting $CILK_NWORKERS (environment variable) to "1" makes Intel Cilk Plus applications execute in a serialized way.
Alternatively you can set this variable to any (meaningful) amount of max. workers running in parallel.
Since this environment variable is evaluated during run-time you never need to recompile your application. By simply setting it before running the same binary it'll use the amount of workers specified.
Best regards,
Georg Zitzlsberger
in addition:
Setting $CILK_NWORKERS (environment variable) to "1" makes Intel Cilk Plus applications execute in a serialized way.
Alternatively you can set this variable to any (meaningful) amount of max. workers running in parallel.
Since this environment variable is evaluated during run-time you never need to recompile your application. By simply setting it before running the same binary it'll use the amount of workers specified.
Best regards,
Georg Zitzlsberger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Intel Cilk Plus keywordnames follow C++ standards. Since Intel Cilk Plus is not part of the standard language, the keywords must have a leading "_" to prevent them from polluting the user namespace.
As others have pointed out, including cilk/cilk.h will define macros for the keywords to make them easier to type.
- Barry

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page