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

Implement step_by #494

Closed
hherman1 opened this issue Dec 17, 2017 · 9 comments
Closed

Implement step_by #494

hherman1 opened this issue Dec 17, 2017 · 9 comments

Comments

@hherman1
Copy link

I believe this should be parallelizable? The iterator is currently in nightly rust:

https://doc.rust-lang.org/stable/std/iter/trait.Iterator.html#method.step_by

@cuviper
Copy link
Member

cuviper commented Dec 17, 2017

It should be possible, yes. I think I'd prefer to wait for Iterator::step_by to stabilize though, so we can make sure to match its signature.

@lu-zero
Copy link

lu-zero commented Feb 9, 2019

The iterator is now in stable since a while :)

@gbip
Copy link

gbip commented Feb 24, 2019

This would be a very useful feature 😄

@emmanuelantony2000
Copy link

Can i try to implement it?

@cuviper
Copy link
Member

cuviper commented Sep 5, 2019

Go for it!

@FlyingCanoe
Copy link
Contributor

I have created a pull request adding this future, but It depend on std StepBy being a double ended iterator. This trait as bean stabilise in rustc 1.38. Does bumping the minimal rustc version is acceptable for this future?

@cuviper
Copy link
Member

cuviper commented Feb 24, 2020

I don't think we should bump the MSRV for this feature. We can either implement our own version of the StepBy iterator, or add a build script which detects support to set a cfg (so it wouldn't be available at all earlier). Use autocfg if you go for a build script, where you can probe an expression like (0..10).step_by(2).rev().

bors bot added a commit that referenced this issue Mar 5, 2020
726: add step by parallel iterator. r=cuviper a=FlyingCanoe

this is a pull request for the #494. It add a step_by iterator for `IndexedParallelIterator` producing a iterator that is also indexed parallel iterator. It is Implemented in pull mode.

Co-authored-by: flyingcanoe <flyingcanoe@protonmail.com>
bors bot added a commit that referenced this issue Mar 6, 2020
726: add step by parallel iterator. r=cuviper a=FlyingCanoe

this is a pull request for the #494. It add a step_by iterator for `IndexedParallelIterator` producing a iterator that is also indexed parallel iterator. It is Implemented in pull mode.

Co-authored-by: flyingcanoe <flyingcanoe@protonmail.com>
Co-authored-by: Josh Stone <cuviper@gmail.com>
@Coder-256
Copy link

I think that this #726 was supposed to close this. :)

@cuviper
Copy link
Member

cuviper commented Mar 13, 2020

Yes, thanks!

@cuviper cuviper closed this as completed Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants