Visible to Intel only — GUID: GUID-99B44C4D-7D84-4A62-8703-527159B4A539
Visible to Intel only — GUID: GUID-99B44C4D-7D84-4A62-8703-527159B4A539
p?trmr2d
Copies a submatrix from one trapezoidal matrix to another.
call pstrmr2d(uplo, diag, m, n, a, ia, ja, desca, b, ib, jb, descb, ictxt)
call pdtrmr2d(uplo, diag, m, n, a, ia, ja, desca, b, ib, jb, descb, ictxt)
call pctrmr2d(uplo, diag, m, n, a, ia, ja, desca, b, ib, jb, descb, ictxt)
call pztrmr2d(uplo, diag, m, n, a, ia, ja, desca, b, ib, jb, descb, ictxt)
call pitrmr2d(uplo, diag, m, n, a, ia, ja, desca, b, ib, jb, descb, ictxt)
The p?trmr2droutine copies the indicated matrix or submatrix of A to the indicated matrix or submatrix of B. It provides a truly general copy from any block cyclicly-distributed matrix or submatrix to any other block cyclicly-distributed matrix or submatrix. With p?gemr2d, these routines are the only ones in the ScaLAPACK library which provide inter-context operations: they can take a matrix or submatrix A in context A (distributed over process grid A) and copy it to a matrix or submatrix B in context B (distributed over process grid B).
The p?trmr2droutine assumes the matrix or submatrix to be trapezoidal. Only the upper or lower part is copied, and the other part is unchanged.
There does not need to be a relationship between the two operand matrices or submatrices other than their global size and the fact that they are both legal block cyclicly-distributed matrices or submatrices. This means that they can, for example, be distributed across different process grids, have varying block sizes and differing matrix starting points, or be contained in different sized distributed matrices.
Take care when context A is disjoint from context B. The general rules for which parameters need to be set are:
All calling processes must have the correct m and n.
Processes in context A must correctly define all parameters describing A.
Processes in context B must correctly define all parameters describing B.
Processes which are not members of context A must pass ctxt_a = -1 and need not set other parameters describing A.
Processes which are not members of contextB must pass ctxt_b = -1 and need not set other parameters describing B.
Because of its generality, p?trmr2d can be used for many operations not usually associated with copy routines. For instance, it can be used to a take a matrix on one process and distribute it across a process grid, or the reverse. If a supercomputer is grouped into a virtual parallel machine with a workstation, for instance, this routine can be used to move the matrix from the workstation to the supercomputer and back. In ScaLAPACK, it is called to copy matrices from a two-dimensional process grid to a one-dimensional process grid. It can be used to redistribute matrices so that distributions providing maximal performance can be used by various component libraries, as well.
Note that this routine requires an array descriptor with dtype_ = 1.
Product and Performance Information |
---|
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex. Notice revision #20201201 |
- uplo
-
(global) CHARACTER*1. Specifies whether to copy the upper or lower part of the matrix or submatrix.
uplo = 'U'
Copy the upper triangular part.
uplo = 'L'
Copy the lower triangular part.
- diag
-
(global) CHARACTER*1. Specifies whether to copy the diagonal of the matrix or submatrix.
diag = 'U'
Do not copy the diagonal.
diag = 'N'
Copy the diagonal.
- m
-
(global) INTEGER. The number of rows of matrix A to be copied (m≥0).
- n
-
(global) INTEGER. The number of columns of matrix A to be copied (n≥0).
- a
-
(local)
REAL for pstrmr2d
DOUBLE for pdtrmr2d
COMPLEX for pctrmr2d
DOUBLE COMPLEX for pztrmr2d
INTEGER for pitrmr2d.
Pointer into the local memory to array of size lld_aby LOCc(ja+n-1) containing the source matrix A.
- ia, ja
-
(global) INTEGER. The row and column indices in the array A indicating the first row and the first column, respectively, of the submatrix of A) to copy. 1 ≤ia≤total_rows_in_a - m +1, 1 ≤ja≤total_columns_in_a - n +1.
- desca
-
(global and local) INTEGER array of size dlen_. The array descriptor for the distributed matrix A.
Only dtype_a = 1 is supported, so dlen_ = 9.
If the calling process is not part of the context of A, ctxt_a must be equal to -1.
- ib, jb
-
(global) INTEGER. The row and column indices in the array B indicating the first row and the first column, respectively, of the submatrix B to which to copy the matrix. 1 ≤ib≤total_rows_in_b - m +1, 1 ≤jb≤total_columns_in_b - n +1.
- descb
-
(global and local) INTEGER array of size dlen_. The array descriptor for the distributed matrix B.
Only dtype_b = 1 is supported, so dlen_ = 9.
If the calling process is not part of the context of B, ctxt_b must be equal to -1.
- ictxt
-
(global)INTEGER.
The context encompassing at least the union of all processes in context A and context B. All processes in the context ictxt must call this routine, even if they do not own a piece of either matrix.
- b
-
REAL for pstrmr2d
DOUBLE for pdtrmr2d
COMPLEX for pctrmr2d
DOUBLE COMPLEX for pztrmr2d
INTEGER for pitrmr2d.
Pointer into the local memory to array of size lld_bbyLOCc(jb+n-1).
Overwritten by the submatrix from A.