- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I took the fibonacci progam in the cilk 5.4.6 manual and I tried to cilkify it. The attached file fi3.c is the basic file in c form. I then took that file and cilkified it to fib3.cilk. That was easy. It compiled and ran perfectly.
Please note that I added a third function strictly because I wanted to call the single cilkfunction from a non-cilk function (using stub and all) so I could see howthat works. Whena c function that is not the main function calls a cilk function shown in fib3.cilk.I then broke the fib3.cilk function up into three files:
fib3_1.cilk
fib3_2.cilk
fib3_3.cilk
They are also attached.
Now when I compile using the command
cilkc fib3_1.cilk fib3_2.cilk fib3_3.cilk
I got a couple of the warnings
Warning implicitly declaring function to return int:
They applied for both function fib3_2.cilk and fib3_3.cilk. When fib3_2.cilk ispure c source and fib3_3.cilk is cilk source.
When I prototyped the function in fib3_2.cilkand put it in fib3_1.cilk (where it is first used), that got rid ofone error. I tried to prototype the function in fib3_3.cilk and put it in fib3_2.cilk where it is first used.
Igot the error:
Warning implicitly declaring function to return int:
anyway.
I then added extern to this protype statement and still got the error.
It is only a warning, but it should be eliminated. Protpyping and adding the modifer extern does not do it.
What will?
Any help appreciated. Thanks in advance.
Newport_j
Link Copied
0 Replies

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