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
Nightly has a step_trait feature supporting Step trait implementation for custom types, I have new types that implement it, but can't use with rayon directly and have to convert fo/from std integers. Would be nice to support it (behind nightly feature).
Even the current Range parallel implementations are a bit different between "indexed" (up to u32) and not, and I don't think the Step trait would be enough to cover that kind of difference for generic types. But couldn't you implement ParallelIterator yourself in your specific domain?
(I'm not keen to have a "nightly" feature in general...)
The goal would be to write (S::ZERO..).into_par_iter().take(200) rather than custom syntax. And I can't implement IntoParalellIterator for Range myself due to the way Rust rules around impls of foreign traits for foreign types work.
It's possible we could design our own Step trait that meets our needs and allows third-party Range<T> parallelization. There's some abstraction right now in the private RangeIntegerhere, but I don't think that's what we would want a public interface to look like.
Nightly has a
step_trait
feature supportingStep
trait implementation for custom types, I have new types that implement it, but can't use with rayon directly and have to convert fo/from std integers. Would be nice to support it (behindnightly
feature).rust-lang/rust#42168
The text was updated successfully, but these errors were encountered: