- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm new to cilk, and i wanted to ask if it has an implicit threshold for the task creation, in recursive computations like fib?
If so, is it based on the number of tasks created, or in the depth of the computation?
Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The short answer is "no", there are no implicit threshholds for recursive computations like fib. Any coarsening you might want in the base case to stop the recursion early needs to be specified manually.
Every cilk_spawn in fib should be doing roughly the same work at every level of the recursion, to push something onto the current worker's deque and allow for stealing of the continuation of the spawn.For an arbitrary computation, coarsening based on number of tasks created or task depth may not always do the right thing, since doing so often makes some implicit assumption about balance in the recursion. There is, however, an implicit calculation of grainsize of a cilk_for loop by default.
Cheers,
Jim

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page