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

Remove owning_view #1757

Open
wants to merge 3 commits into
base: distributed-ranges
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ take_segments(R&& segments, std::size_t last_seg, std::size_t local_id)
}
};

return stdrng::views::enumerate(segments) | stdrng::views::take(last_seg + 1) |
return stdrng::views::enumerate(std::forward<R>(segments)) | stdrng::views::take(last_seg + 1) |
stdrng::views::transform(std::move(take_partial));
}

Expand Down Expand Up @@ -96,7 +96,7 @@ drop_segments(R&& segments, std::size_t first_seg, std::size_t local_id)
}
};

return stdrng::views::enumerate(segments) | stdrng::views::drop(first_seg) |
return stdrng::views::enumerate(std::forward<R>(segments)) | stdrng::views::drop(first_seg) |
stdrng::views::transform(std::move(drop_partial));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "oneapi/dpl/iterator"

#include "../../detail/iterator_adaptor.hpp"
#include "../../detail/owning_view.hpp"
#include "../../detail/std_ranges_shim.hpp"
#include "../../detail/view_detectors.hpp"
#include "../remote_span.hpp"
Expand Down Expand Up @@ -222,7 +221,7 @@ class zip_view : public stdrng::view_interface<zip_view<Rs...>>
increment_local_idx(segment_ids, local_idx, size);
}

return dr::__detail::owning_view(std::move(segment_views));
return segment_views;
}

// Return a range corresponding to each segment in `segments()`,
Expand Down Expand Up @@ -258,7 +257,7 @@ class zip_view : public stdrng::view_interface<zip_view<Rs...>>
increment_local_idx(segment_ids, local_idx, size);
}

return dr::__detail::owning_view(std::move(segment_views));
return segment_views;
}

auto
Expand Down
Loading