These subroutines transpose an n by n matrix A in place--that is, in matrix A:
A | Subroutine |
Short-precision real | SGETMI |
Long-precision real | DGETMI |
Short-precision complex | CGETMI |
Long-precision complex | ZGETMI |
Fortran | CALL SGETMI | DGETMI | CGETMI | ZGETMI (a, lda, n) |
C and C++ | sgetmi | dgetmi | cgetmi | zgetmi (a, lda, n); |
PL/I | CALL SGETMI | DGETMI | CGETMI | ZGETMI (a, lda, n); |
Matrix A is transposed in place; that is, the n rows and n columns in matrix A are exchanged. For matrix A with elements aij, where i, j = 1, n, the in-place transpose is expressed as aji = aij for i, j = 1, n.
For the following input matrix A:
the in-place matrix transpose operation A<--AT is expressed as:
If n is 0, no computation is performed.
None
This example shows an in-place matrix transpose of matrix A having 5 rows and 5 columns.
A LDA N | | | CALL SGETMI( A(2,3) , 10 , 5 )
* * | . . . . . . . | | . . 1.0 6.0 11.0 16.0 21.0 | | . . 2.0 7.0 12.0 17.0 22.0 | | . . 3.0 8.0 13.0 18.0 23.0 | A = | . . 4.0 9.0 14.0 19.0 24.0 | | . . 5.0 10.0 15.0 20.0 25.0 | | . . . . . . . | | . . . . . . . | | . . . . . . . | | . . . . . . . | * *
* * | . . . . . . . | | . . 1.0 2.0 3.0 4.0 5.0 | | . . 6.0 7.0 8.0 9.0 10.0 | | . . 11.0 12.0 13.0 14.0 15.0 | A = | . . 16.0 17.0 18.0 19.0 20.0 | | . . 21.0 22.0 23.0 24.0 25.0 | | . . . . . . . | | . . . . . . . | | . . . . . . . | | . . . . . . . | * *