Merge pull request #16246 from mcdobe100/array-swap
Improvements to array swap optimization and additional testing
Add additional checking for both Block and Default Rectangular arrays before using the optimized pointer swap. Also, add additional tests checking array swaps on arrays with different dmaps and on different locales (that fail with the old implementation, but were not being tested on the main branch previously).
This makes the optimized array swap much safer and also cleans up the code in ChapelArray to make it more generalizable for future improvements and additions to the
doiOptimizedSwap() method (previously called
doiSwap(), now doiOptimizedSwap()` to make the name more indicative of what it is doing).
- [x] paratest gasnet
[ reviewed by @e-kayrakli ] (twice) - thanks Engin