Copy and transpose block.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real_8), | intent(out), | DIMENSION(:), TARGET | :: | extent_out |
output matrix in the form of a 1-d array |
|
real(kind=real_8), | intent(in), | DIMENSION(:) | :: | extent_in |
input matrix in the form of a 1-d array |
|
integer, | intent(in) | :: | rows |
input matrix size input matrix size |
||
integer, | intent(in) | :: | columns |
input matrix size input matrix size |
PURE_BLOCKOPS SUBROUTINE block_transpose_copy_d (extent_out, extent_in, & rows, columns) !! Copy and transpose block. #if defined(__LIBXSMM_TRANS) USE libxsmm, ONLY: libxsmm_otrans, libxsmm_ptr1 #endif REAL(kind=real_8), DIMENSION(:), INTENT(OUT), TARGET :: extent_out !! output matrix in the form of a 1-d array REAL(kind=real_8), DIMENSION(:), INTENT(IN) :: extent_in !! input matrix in the form of a 1-d array INTEGER, INTENT(IN) :: rows, columns !! input matrix size !! input matrix size ! --------------------------------------------------------------------------- #if defined(__LIBXSMM_TRANS) CALL libxsmm_otrans(libxsmm_ptr1(extent_out), libxsmm_ptr1(extent_in), & 8, rows, columns, rows, columns) #elif defined(__MKL) CALL mkl_domatcopy('C', 'T', rows, columns, 1.0_real_8, extent_in, rows, extent_out, columns) #else extent_out(1:rows*columns) = RESHAPE(TRANSPOSE( & RESHAPE(extent_in(1:rows*columns), (/rows, columns/))), (/rows*columns/)) #endif END SUBROUTINE block_transpose_copy_d