I am looking for a simple example of a Cilk function calling a c function. I tried using the example of fibonacci numbers in the Cilk 5.4.6 Guide - it did not work.
A procedure call in a cilk function must be spawned (or so said the error when I compiled the progeram code).You cannot call a c function by spwaning it from a Cilk function. There is the problem.I am assuming it is something that is very easy, but I have seen no examples. You talk in the Guide about a c function calling a Cilk function using stubs. That is good. I just want it the other way around.
Iused the Cilk fibonacci main function and called the c function fib. It would not compile.I am not surpised because the c fib function is not a cilk function and cannot be spawned by the calling function. If I remove the word spawn from Cilk mainthen it says all procedure calls in cilk must be spawned. I cannot spawn a c function.
Any help appreciated. Thanks in advance.
Newport_j



