Cilk: Add support for Cilk (with C/C++) #3522
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for the Cilk language extension to C/C++, specifically the set of keywords supported by the latest version of the OpenCilk platform. I have followed the various instructions in the README.
Summary
The entirety of the specification is only a few lines. It just creates 2 new languages by extending C and C++ with the parallel keywords
cilk_for
,cilk_reducer
,cilk_scope
,cilk_spawn
, andcilk_sync
. I used theinsertBefore()
function to add the new token label beforefunction
to capture Cilk keywords which are followed by arguments in parentheses.Ownership
I specified the OpenCilk GitHub organization (of which I am a part) as the "owner" in
components.json
. I plan to be handling future bug reports related to thecilkc
andcilkcpp
languages, but I believe that listing the OpenCilk organization as the owner should ensure better coverage and continuity as the Cilk language evolves.