Conversation
Hi Andrew, thanks for owning this. I'll provide comments inline under the "files changed" tab. |
thrust/tuple_io.h
Outdated
@@ -0,0 +1,353 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't require a new public header to support this functionality; simply including thrust/tuple.h
should suffice.
Let's move this file to thrust/detail/tuple/tuple_io.h
, and add #include <thrust/detail/tuple/tuple_io.h>
to the end of thrust/tuple.h
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good to me. Just want to double-check. tuple_io.h
pulls in istream
, ostream
and locale
. Is it an issue that thrust/tuple.h
would be pulling those in as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's OK
The implementation of
Finally, before this pull request can be merged, the functionality needs documentation and tests. Function prototypes should be provided in |
Jared, Thanks for the feedback and answering my follow-up questions. I'll address each of these issues asap. |
…namespace along with corresponding operator<< operator>> overloads
A work-in-progress. I still need to deal with cons, null_type, and reorganize file structure, and also the copyright statement for tuple_cat, but I dealt with namespaces, newlines, and moving tuple_manipulator out of the global thrust namespace. |
Latest fixes:
Anything else besides unit tests and documentation? |
thrust/detail/tuple/tuple_helpers.h
Outdated
// in that case, use x when i == x_slot, | ||
// otherwise use null_type | ||
|
||
//const null_type null; // ==> syntax error: Default initialization of an object of const type 'const thrust::null_type' requires a user-provided default constructor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eliminate commented out code
Looks good. I'd eliminate the commented-out code which causes syntax errors. Unit tests & documentation should be all that is left to do. |
I finally had some spare time to work on this. I just added doxygen for tuple_io and tuple_cat. I put the prototypes after the includes, otherwise there are things from I'll get to unit testing as soon as I can, although I'm not sure when that will be.. |
Thanks Andrew, looks good. |
Conflicts: thrust/detail/raw_reference_cast.inl
unit tests are added. I had to compile the unit tests manually.. I tried with scons, using the latest upstream revision, but even after bypassing many errors, I couldn't get it to work. Is it supposed to work on mac 10.10 + cuda 7? |
I'm really sorry that I took forever to get this finished. Are you still interested in this PR? If there's anything I can do to help, please let me know. |
This was closed when we pushed the new Git master history to GitHub. Please rebase onto the new master and we'll take a look. |
So we're just gonna replace our tuple with a C++11 tuple or |
@brycelelbach Great to hear there may be some progress on that front. Will there be streaming/IO support using either of those tuple implementations (which I proposed to add via this PR)? |
Hey Andrew! Not at first, but we'll be open to PRs for that - if you want to rebase this onto top of trunk and reopen it we will be happy to merge it as is. |
Getting the ball rolling on this pull request. There are two pieces:
[1] https://github.com/boostorg/tuple
[2] http://www.boost.org/doc/libs/1_55_0/libs/tuple/doc/tuple_users_guide.html#streaming
[3] https://github.com/bryancatanzaro/tuple-cat
[4] https://groups.google.com/d/msg/thrust-users/NxMTkwPp2bg/-s79wXylAREJ