-
Notifications
You must be signed in to change notification settings - Fork 757
Preparing zip_iterator and tuple_of_iterator_references for variadic tuple #1311
Conversation
…ces) for variadic tuple
The split between these PRs makes sense to me. I'll focus on getting the other one landed, and probably hold off on adding this until we have the new tuple in-place and can remove the preprocessor guards. |
For bookkeeping, this PR is blocked on NVIDIA/cccl#742. |
In that case, since it's blocked anyway, I'll redo the commit without the guard. Then, once NVIDIA/cccl#742 is taken care of, it can be merged as-is. I also have code ready to go for FYI, in case you're interested in seeing these changes in action, I created a new variadic tuple branch. I tried building and running all the tests. They succeeded with one exception, that I disabled. |
5469012
to
c203d48
Compare
33518ad
to
28a4267
Compare
The last commit fixes the one test that I mentioned had failed. All tests now pass using these changes on my branch. |
@allisonvacanti It looks like the reason for the incompatibility was #1314. I was not expecting such a simple fix. With #1314 merged, I think that this PR could be ready to go as soon as #1310 is merged. Would it make more sense to add these commits to #1310 and close this PR? Or should I keep it separate? |
28a4267
to
0280db2
Compare
Ahh, good catch, that makes some amount of sense. It'd probably be simpler to just combine the PRs and remove the workaround. We have some time -- our internal CI is currently unusable so I won't be able to move this forward until sometime next week at the earliest anyway. |
Depends on #1310. This reduces dependence of
zip_iterator
on implementation details ofthrust::tuple
, such ashead_type
,tail_type
, andnull_type
.The reason I submitted this as a separate PR is the following. Unfortunately, certain implementation details remain very inconvenient to workaround. Therefore, I introduced a guard
THRUST_VARIADIC_TUPLE
, which is obviously disabled. Upon a future variadicthrust::tuple
(regardless of whether it's from libcudacxx,std::tuple
, jaredhoberock/tuple, etc.), the code guarded byTHRUST_VARIADIC_TUPLE
can be activated, while the#else
branch code can be removed. The code guarded byTHRUST_VARIADIC_TUPLE
works. I have tested it extensively over the past 5 years on my variadic branch.With
-DTHRUST_DEVICE_SYSTEM=CPP
: