8000 Implement Zip::apply_collect for non-Copy elements too by bluss · Pull Request #814 · rust-ndarray/ndarray · GitHub
[go: up one dir, main page]

Skip to content

Implement Zip::apply_collect for non-Copy elements too #814

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

Merged
merged 3 commits into from
Apr 29, 2020

Conversation

bluss
Copy link
Member
@bluss bluss commented Apr 29, 2020

Implement a partial array wrapper, that keeps track of written elements, so
that we can drop the ones written, if unwinding happens before the whole
operation is done.

The written elements are recorded by their count, and in which memory order
they were written.

The parallel case does not yet have this update, since it will require handling
splitting and multiple simultaneous "write heads". Rayon's model, if it can be used,
is amenable to tracking this correctly for 1D-indexed parallel iterators, so it might
be possible to resolve that way.