Calling Cilk functions

Calling Cilk functions

Hi all,

Looking through the new "Cilk language extensions" document for the new compiler, I don't see any sections dealing with cilk linkage vs. non-cilk linkage (except the brief mention in S 8.1). I assume this means the compiler figures out all the relevant info and that recursive calls between cilk & normal C++ functions is OK?

My main question: is there a performance hit for calling "cilk functions" from "normal C++ functions"? In the preview version I had to construct a cilk::context, and there was advice about making the object static, etc. to avoid runtime overhead. Does any of this carry over?

BTW, it is very nice to not have to have separate source files, wrapper functions, and the like!

Daniel Faken

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Daniel,

I did check with our Cilk experts too on your question and passed on your feedback, thanks much.
Yes, we are using a new linkage scheme that makes the calls between C/C++ and Cilk completely transparent. There is still some overhead to a spawn as opposed to a call, but there is no distinction between C++ and Cilk function types any more.

Your feedback on the beta product features that you're testing out, is very much appreciated.


Leave a Comment

Please sign in to add a comment. Not a member? Join today