taskflow/taskflow
taskflow find_if doesn't work with infinite ranges because std::distance is used
Aperta
#534 aperta il 1 dic 2023
help wanted
Metriche repository
- Star
- (9162 stelle)
- Metriche merge PR
- (Merge medio 35g 4h) (1 PR mergiata in 30 g)
Descrizione
In taskflow::find_if doesn't work with infinite ranges.
However an infinite range is a reasonable input to find_if. For example
std::ranges::iota(0)
produces an infinite range starting from 0.
However taskflow::find_if calls std::distance on the two iterators which cannot work if the second iterator is a sentinel std::unreachable_sentinel
In this case taskflow::find_if should find a sensible alternative to chunking. In our case we explicitly pass StaticPartitioner(1) so we don't require chunking.