Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to spawn a range of tasks? #4

Open
cheng-hsiang-chiu opened this issue May 30, 2023 · 0 comments
Open

How to spawn a range of tasks? #4

cheng-hsiang-chiu opened this issue May 30, 2023 · 0 comments

Comments

@cheng-hsiang-chiu
Copy link

Hello,

Is it possible to spawn a range of tasks? In my application, I need to spawn tasks based on some runtime conditions. I would like to spawn tasks as the following pseudo code,

std::vector<tasks> TASKS = {t0, t1};
if (condition) TASKS.push_back(t2);

for (auto t : TASKS) {
      cilk_spawn t;
}

or the following(preferred),

cilk_spawn TASKS.begin() TASKS.end()

I did not find similar examples. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant