CilkPlus comes with some keywords like cilk_spawn, cilk_for etc. I wonder if I can explore how are they invoked and where the definition for them are actually written. For example, when cilk_spawn is invoked where the control goes?
No, your question isn't clear. Have you checked the references at the top of this forum page (language specs, source code....) according to your interests, or looked up application source code examples?
Hello Tim, Thanks for your reply. Let me clarify my question. From the source code I am looking for the file (but failed) where the definition (or Algorithms) of cilk_spawn, cilk_for and cilk_Sync are written, because I want learn in details how these things works. How can I find them? Is my question clear now? Thanks again
Since Cilk Plus is a vendor extension, the keywords actually implemented by the compiler are _Cilk_spawn, _Cilk_sync, and _Cilk_for. cilk.h defines macros to allow you to type cilk_spawn, cilk_sync, and cilk_for, since:
> I want learn in details how these things works. How can I find them?
The information you want is at the Cilk Plus website download page. There you can find the Language Extension Specification, the Application Binary Interface spec, as well as other specifications. You can also get the runtime sources, as well as copies of GCC and Clang implementations of Cilk Plus. Though for GCC you're probably better off with the live sources. The version at the Cilk Plus site is GCC 4.8, from when we were first releasing it. Unfortunately the Clang developers were unwilling to accept the Cilk Plus implementation, so the version at the Cilk Plus website is the only available copy.