Add transform_input_output_iterator#1177
Conversation
|
I haven't gone through the patch yet, but I did hit a build error when using non-CUDA backends. Looks like a missing header in the example: I'm also wondering if just Thanks for the patch (esp the tests and examples!), I'll take a closer look through it next week. |
|
Thanks, I'll fix that include next week. I wasn't sure what to call this either. |
|
Ah, yeah, that's a good reason :-) IMO, ideally we'd make Let's think about it over the weekend and see if something more suitable comes to mind. @jaredhoberock @griwes @brycelelbach Any ideas? |
|
Oh, something like |
|
There's a completely separate definition of |
|
I think I prefer a name of the form @jaredhoberock what do you think? |
|
How about |
|
|
|
I'd suggest avoiding leading names like |
|
I agree with @allisonvacanti that IO sounds like it has something to do with file or network activity. |
I can rename the typenames |
|
If you go with |
|
Renamed to |
It looks like that's an implementation detail for the CUDA backend, and it doesn't look like anything actually uses it anymore. I think we can ignore it. |
alliepiper
left a comment
There was a problem hiding this comment.
Some minor style stuff pointed out inline, but otherwise this LGTM.
@brycelelbach @jaredhoberock, anything else?
|
Also -- @trevorsm7 Can you squash this all down into a single commit? That'll make it easier on our end to test and integrate. |
If that iterator code is truly not in use, then it should be eliminated immediately. Can we do that as part of this PR? |
@jaredhoberock @allisonvacanti There are several such definitions in that file e.g. |
4daf1ce to
bdf513f
Compare
|
@trevorsm7 The |
|
It looks like |
|
@trevorsm7 Could be. To get you unblocked, I'd recommend that we merge this PR (assuming there are no other outstanding issues) and deal with the superfluous iterators in a separate PR. |
|
I agree, let's do the cleanup in a followup PR. I created issue #1187 to track this. It looks like this is ready to go, I'll submit this to our internal CI and start integrating. Thanks for the patch and the quick responses, @trevorsm7! |
|
CI running in CL 28521053 |
bdf513f to
593f09a
Compare
|
Last push adds an explicitly default copy constructor to the reference proxy. This fixes an issue found by CI: Rerunning CI. |
593f09a to
8cea2e0
Compare
|
TIL we validate example outputs on internal CI. Rebased and added FileCheck reference for new example -- rerunning CI. |
alliepiper
left a comment
There was a problem hiding this comment.
Tests are looking good, merging this soon. Thanks for the patch!
Adds a variant of transform iterator adapter that works as both an input iterator and an output iterator. The given input function is applied after reading from the wrapped iterator while the output function is applied before writing to the wrapped iterator. The implementation is largely based on
transform_output_iterator, with additional operators added to the proxy reference.Also fixes some typos in
transform_output_iterator.