Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Summary This PR adds a `TupleSplit` function for `GpuTuple` similar to `IntVectSplit` in #3969. It can be used as an inverse function of `TupleCat` and `TypeMultiplier`. Example: ```C++ auto tup = amrex::makeTuple(2,4,5,7,2.324,7,8,342.3f,4ull,1ll,-38,"test"); auto [t0,t1,t2,t3] = amrex::TupleSplit<3,3,4,2>(tup); // t0 = GpuTuple( 2, 4, 5 ) // t1 = GpuTuple( 7, 2.324, 7 ) // t2 = GpuTuple( 8, 342.2999878, 4, 1 ) // t3 = GpuTuple( -38, test ) ``` ## Additional background The current implementation does not move the tuple elements and makes a copy instead.
- Loading branch information