Skip to content

Feat fill and generate#783

Merged
tsung-wei-huang merged 7 commits intotaskflow:masterfrom
Hatem-707:feat-fill
Apr 14, 2026
Merged

Feat fill and generate#783
tsung-wei-huang merged 7 commits intotaskflow:masterfrom
Hatem-707:feat-fill

Conversation

@Hatem-707
Copy link
Copy Markdown
Contributor

@Hatem-707 Hatem-707 commented Apr 13, 2026

Added fill and generate algorithms and their bounded versions.

@Hatem-707
Copy link
Copy Markdown
Contributor Author

Hatem-707 commented Apr 13, 2026

@tsung-wei-huang is there a reason to use different types for the begin and end iterators. Also I think it would be helpful to add a ticket to track parallel algorithms implemented and perhaps priority for the unimplemented onse

@tsung-wei-huang
Copy link
Copy Markdown
Member

The reason is to enable stateful iterator passing so one task can initialize data structure needed while its successor can launch the algorithm. See capture iterator by reference. In reality, we may have something like:

taskflow.for_each_index(std::ref(beg), end, 1, [](auto i) {});

@Hatem-707
Copy link
Copy Markdown
Contributor Author

Thanks for the explanation. I edited my implementation to support this and added new tests accordingly

@tsung-wei-huang tsung-wei-huang merged commit 6320aaa into taskflow:master Apr 14, 2026
12 checks passed
@tsung-wei-huang
Copy link
Copy Markdown
Member

Thank you for the contributions!

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

Successfully merging this pull request may close these issues.

2 participants