Swap the layout from col-major to row-major, or row-major to col-major, and invert the order of the dimensions.
Beware: the dimensions are reversed by this operation. If you want to preserve the ordering of the dimensions, you need to combine this operation with a shuffle.
© Eigen.
Licensed under the MPL2 License.
https://eigen.tuxfamily.org/dox/unsupported/classTensorLayoutSwap.html