You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm newbie for this grace and neat project. After several days of exploring. I suggest inIncorporate c++ 20 coroutine into open cilk.
Open cilk is target on pure computation, any blocking of I/O operation will cause trouble for this framework. This is not the reality application. People need conditional I/O operations during computation. We can not simply add I/O operations, current model can cause system hangup if all threads is blocked.
Wait for tasks spawned on another CPU core will cause CPU cycle wastes, and cache miss, etc. To my understand, it's almost unavoidable.
Potential to eliminate complex stacks , fibers and closures, stackless coroutine already has a neat solution.
To do this, we need change some code slightly to support the following code:
std:future<long> fib(long n) {
if (n < 2)
co_return n;
long x, y;
x = fib(n-1);
y = fib(n-2);
cilk_scope {
x = co_wait cilk_spawn fib(n-1);
y = fib(n-2);
}
co_return x + y;
}
The code snippet is just an example. More neat style is available. For example, you can make cilk_spawn mean an implicit suspend.
BTW Cheetah runtime is heavy by using mutex and spin lock, it's a little bit outdated. Contemporary computing model will spin thread on a single CPU, and avoid these heavy operation totally. To do this need re-write the runtime totally.
I think, open cilk has a very simple and neat program model. If it can adopt contemporary advances and not stick to Intel's implementation. This model can change something in parallel programing.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm newbie for this grace and neat project. After several days of exploring. I suggest inIncorporate c++ 20 coroutine into open cilk.
To do this, we need change some code slightly to support the following code:
The code snippet is just an example. More neat style is available. For example, you can make cilk_spawn mean an implicit suspend.
BTW Cheetah runtime is heavy by using mutex and spin lock, it's a little bit outdated. Contemporary computing model will spin thread on a single CPU, and avoid these heavy operation totally. To do this need re-write the runtime totally.
I think, open cilk has a very simple and neat program model. If it can adopt contemporary advances and not stick to Intel's implementation. This model can change something in parallel programing.
Beta Was this translation helpful? Give feedback.
All reactions