Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Fix transform_iterator with non-copyable types #1423

Merged
merged 2 commits into from
May 20, 2021

Conversation

jrhemstad
Copy link
Collaborator

Fixes #1421

Previously, the transform_iterator implementation would make a copy
of the adapted iterators value when dereferencing it in order to
force conversion to the value_type. This prevented transform_iterators
over non-copyable types. Using a reference instead allows for forcing
the conversion without invoking a copy ctor.

jrhemstad added 2 commits May 5, 2021 13:37
Previously, the transform_iterator implementation would make a copy
of the adapted iterators value when dereferencing it in order to
force conversion to the value_type. This prevented transform_iterators
over non-copyable types. Using a reference instead allows for forcing
the conversion without invoking a copy ctor.
@alliepiper
Copy link
Collaborator

This LGTM -- thanks @jrhemstad! I'll start testing and plan to get this in for 1.13.

@alliepiper
Copy link
Collaborator

run tests

@alliepiper alliepiper self-assigned this May 10, 2021
@alliepiper alliepiper added the testing: gpuCI in progress Started gpuCI testing. label May 10, 2021
@alliepiper alliepiper added this to the 1.13.0 milestone May 10, 2021
@alliepiper
Copy link
Collaborator

DVS CL: 29946602

@alliepiper alliepiper added the testing: internal ci in progress Currently testing on internal NVIDIA CI (DVS). label May 10, 2021
@jrhemstad
Copy link
Collaborator Author

@allisonvacanti are the ICC test failures expected? They look like they are happening in scan code unrelated to my changes.

@alliepiper
Copy link
Collaborator

Yeah, those can be ignored.

@alliepiper alliepiper added testing: internal ci passed Passed internal NVIDIA CI (DVS). testing: gpuCI passed Passed gpuCI testing. and removed testing: internal ci in progress Currently testing on internal NVIDIA CI (DVS). testing: gpuCI in progress Started gpuCI testing. labels May 12, 2021
Copy link
Collaborator

@alliepiper alliepiper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests look good -- I'll merge this soon. Thanks @jrhemstad!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
testing: gpuCI passed Passed gpuCI testing. testing: internal ci passed Passed internal NVIDIA CI (DVS).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

thrust::transform_iterator doesn't work with non-copyable types
2 participants