-
Notifications
You must be signed in to change notification settings - Fork 756
variadic overload of make_zip_iterator #663
Comments
@jaredhoberock Will you entertain a pull request on this one too? |
This needs to be merged at the same time as variadic tuple. |
@jaredhoberock This already works with the current, non variadic tuple implementation (if |
That may be, but I'd prefer to just keep it simple and introduce a variadic overload of this function with variadic tuple. |
Is this something that could be implemented once NVIDIA/cccl#742 is implemented? |
This should be doable without much trouble now that we have C++11 or greater as a hard requirement. It's not a high priority issue right now, but I'm happy to review and test a PR if someone wants to work on it. |
Does @jaredhoberock 's concern about holding off until we have a variadic The implementation of the variadic |
From my perspective, I don't think it's worth waiting on tuple. The tentative plan regarding tuple is to switch There are some additional obstacles to using libcu++ in Thrust due to Thrust's role in the NV HPC SDK. Those are several months away from being resolved. Since the tuple update is pretty far down the roadmap and variadic That said, I'm okay with pushing this back if there's an angle that I'm not considering. |
Sorry for going a bit off-topic, but I wanted to add my two cents here: In terms of a new variadic tuple not being a drop-in replacement in Thrust, I agree, but my experience was that switching to a variadic |
@andrewcorrigan That's good to know. If we end up needing to preserve the existing But we should find out whether or not the libcu++ tuple will work out before anyone invests too much energy into updating the current implementation. If we're able to switch cleanly, our team will only have to maintain a single tuple implementation, and then Thrust can offload testing / maintenance to libc++/libcu++. Any work done on the current tuple in the meantime would get thrown out if our plans succeed. Roadmap-wise, this is likely to be a pattern going forward -- many of the pre-C++11 metaprogramming utilities in Thrust (and CUB) can be replaced with the more rigorously tested implementations in libcu++, and we want to leverage code reuse here as much as possible as these projects evolve. |
Makes sense. To clarify, I was actually referring to updating the rest of Thrust to deal with variadic tuples, regardless of which tuple implementation you end up using. Much of the work is entirely independent of whether libcu++ tuple is adopted as opposed to updating the tuple implementation embedded in Thrust. For example, code like this:
would get simplified to (as is done on my branch):
In my opinion, if you already require C++11 anyway, I would suggest getting started on such changes now, wherever the public tuple interface is used, since they're independent of the particular tuple implementation. |
Ah, I see what you mean. Agreed! Modernizations that don't depend on the tuple implementation should be fine to work on now. |
Would it make sense to add a variadic overload of
make_zip_iterator
that composes the existingmake_zip_iterator
withmake_tuple
? I have this in my own code, and I find that it reduces syntactic overhead.To disambiguate the single argument overloads, I replaced the existing overload for
IteratorTuple
with the one above that acceptsthrust::tuple<Iterators...>
.The text was updated successfully, but these errors were encountered: