IBM Books

Parallel Engineering and Scientific Subroutine Library for AIX Version 2 Release 3: Guide and Reference

PDSYMV and PZHEMV--Matrix-Vector Product for a Real Symmetric or a Complex Hermitian Matrix

These subroutines compute the matrix-vector product:

y <--alphaAx+betay

where, in the formula above:

A represents the global submatrix Aia:ia+n-1, ja:ja+n-1.
x represents the global vector:
y represents the global vector:
alpha and beta are scalars.

and:

In the following two cases, no computation is performed and the subroutine returns after doing some parameter checking:

See references [14] and [15].

Table 38. Data Types

alpha, beta, A, x, y Subprogram
Long-precision real PDSYMV
Long-precision complex PZHEMV

Syntax

Fortran CALL PDSYMV | PZHEMV (uplo, n, alpha, a, ia, ja, desc_a, x, ix, jx, desc_x, incx, beta, y, iy, jy, desc_y, incy)
C and C++ pdsymv | pzhemv (uplo, n, alpha, a, ia, ja, desc_a, x, ix, jx, desc_x, incx, beta, y, iy, jy, desc_y, incy);

On Entry

uplo
indicates whether the upper or lower triangular part of the global submatrix A is referenced, where:

If uplo = 'U', the upper triangular part is referenced.

If uplo = 'L', the lower triangular part is referenced.

Scope: global

Specified as: a single character; uplo = 'U' or 'L'.

n
is the number of rows and columns in submatrix A and the number of elements in vectors x and y used in the computation.

Scope: global

Specified as: a fullword integer; n >= 0.

alpha
is the scalar alpha.

Scope: global

Specified as: a number of the data type indicated in Table 38.

a
is the local part of the global real symmetric or complex Hermitian matrix A. This identifies the first element of the local array A. This subroutine computes the location of the first element of the local subarray used, based on ia, ja, desc_a, p, q, myrow, and mycol; therefore, the leading LOCp(ia+n-1) by LOCq(ja+n-1) part of the local array A must contain the local pieces of the leading ia+n-1 by ja+n-1 part of the global matrix, and:

Scope: local

Specified as: an LLD_A by (at least) LOCq(N_A) array, containing numbers of the data type indicated in Table 38. Details about the square block-cyclic data distribution of global matrix A are stored in desc_a.

ia
is the row index of the global matrix A, identifying the first row of the submatrix A.

Scope: global

Specified as: a fullword integer; 1 <= ia <= M_A and ia+n-1 <= M_A.

ja
is the column index of the global matrix A, identifying the first column of the submatrix A.

Scope: global

Specified as: a fullword integer; 1 <= ja <= N_A and ja+n-1 <= N_A.

desc_a
is the array descriptor for global matrix A, described in the following table:
desc_a Name Description Limits Scope
1 DTYPE_A Descriptor type DTYPE_A=1 Global
2 CTXT_A BLACS context Valid value, as returned by BLACS_GRIDINIT or BLACS_GRIDMAP Global
3 M_A Number of rows in the global matrix If n = 0:
M_A >= 0
Otherwise:
M_A >= 1
Global
4 N_A Number of columns in the global matrix If n = 0:
N_A >= 0
Otherwise:
N_A >= 1
Global
5 MB_A Row block size MB_A >= 1 Global
6 NB_A Column block size NB_A >= 1 Global
7 RSRC_A The process row of the p × q grid over which the first row of the global matrix is distributed 0 <= RSRC_A < p Global
8 CSRC_A The process column of the p × q grid over which the first column of the global matrix is distributed 0 <= CSRC_A < q Global
9 LLD_A The leading dimension of the local array LLD_A >= max(1,LOCp(M_A)) Local

Specified as: an array of (at least) length 9, containing fullword integers.

x
is the local part of the global matrix X. This identifies the first element of the local array X. This subroutine computes the location of the first element of the local subarray used, based on ix, jx, desc_x, p, q, myrow, and mycol; therefore:

Scope: local

Specified as: an LLD_X by (at least) LOCq(N_X) array, containing numbers of the data type indicated in Table 38. Details about the block-cyclic data distribution of the global matrix X are stored in desc_x.

ix
has the following meaning:

If incx = M_X, it indicates which row of global matrix X is used for vector x.

If incx = 1 and incx <> M_X, it is the row index of global matrix X, identifying the first element of vector x.

Scope: global

Specified as: a fullword integer; 1 <= ix <= M_X and:

If incx = 1 and incx <> M_X, then ix+n-1 <= M_X.

jx
has the following meaning:

If incx = M_X, it is the column index of global matrix X, identifying the first element of vector x.

If incx = 1 and incx <> M_X, it indicates which column of global matrix X is used for vector x.

Scope: global

Specified as: a fullword integer; 1 <= jx <= N_X and:

If incx = M_X, then jx+n-1 <= N_X.

desc_x
is the array descriptor for global matrix X, described in the following table:
desc_x Name Description Limits Scope
1 DTYPE_X Descriptor type DTYPE_X=1 Global
2 CTXT_X BLACS context Valid value, as returned by BLACS_GRIDINIT or BLACS_GRIDMAP Global
3 M_X Number of rows in the global matrix If n = 0:
M_X >= 0
Otherwise:
M_X >= 1
Global
4 N_X Number of columns in the global matrix If n = 0:
N_X >= 0
Otherwise:
N_X >= 1
Global
5 MB_X Row block size MB_X >= 1 Global
6 NB_X Column block size NB_X >= 1 Global
7 RSRC_X The process row of the p × q grid over which the first row of the global matrix is distributed 0 <= RSRC_X < p Global
8 CSRC_X The process column of the p × q grid over which the first column of the global matrix is distributed 0 <= CSRC_X < q Global
9 LLD_X The leading dimension of the local array LLD_X >= max(1,LOCp(M_X)) Local

Specified as: an array of (at least) length 9, containing fullword integers.

incx
is the stride for global vector x.

Scope: global

Specified as: a fullword integer; incx = 1 or incx = M_X, where:

If incx = M_X, then x is a row-distributed vector.

If incx = 1 and incx <> M_X, then x is a column-distributed vector.

beta
is the scalar beta.

Scope: global

Specified as: a number of the data type indicated in Table 38.

y
is the local part of the global matrix Y. This identifies the first element of the local array Y. This subroutine computes the location of the first element of the local subarray used, based on iy, jy, desc_y, p, q, myrow, and mycol; therefore:

When beta is zero, y need not be set on input.

Scope: local

Specified as: an LLD_Y by (at least) LOCq(N_Y) array, containing numbers of the data type indicated in Table 38. Details about the block-cyclic data distribution of the global matrix Y are stored in desc_y.

iy
has the following meaning:

If incy = M_Y, it indicates which row of global matrix Y is used for vector y.

If incy = 1 and incy <> M_Y, it is the row index of global matrix Y, identifying the first element of vector y.

Scope: global

Specified as: a fullword integer; 1 <= iy <= M_Y and:

If incy = 1 and incy <> M_Y, then iy+n-1 <= M_Y.

jy
has the following meaning:

If incy = M_Y, it is the column index of global matrix Y, identifying the first element of vector y.

If incy = 1 and incy <> M_Y, it indicates which column of global matrix Y is used for vector y.

Scope: global

Specified as: a fullword integer; 1 <= jy <= N_Y and:

If incy = M_Y, then jy+n-1 <= N_Y.

desc_y
is the array descriptor for global matrix Y, described in the following table:
desc_y Name Description Limits Scope
1 DTYPE_Y Descriptor type DTYPE_Y=1 Global
2 CTXT_Y BLACS context Valid value, as returned by BLACS_GRIDINIT or BLACS_GRIDMAP Global
3 M_Y Number of rows in the global matrix If n = 0:
M_Y >= 0
Otherwise:
M_Y >= 1
Global
4 N_Y Number of columns in the global matrix If n = 0:
N_Y >= 0
Otherwise:
N_Y >= 1
Global
5 MB_Y Row block size MB_Y >= 1 Global
6 NB_Y Column block size NB_Y >= 1 Global
7 RSRC_Y The process row of the p × q grid over which the first row of the global matrix is distributed 0 <= RSRC_Y < p Global
8 CSRC_Y The process column of the p × q grid over which the first column of the global matrix is distributed 0 <= CSRC_Y < q Global
9 LLD_Y The leading dimension of the local array LLD_Y >= max(1,LOCp(M_Y)) Local

Specified as: an array of (at least) length 9, containing fullword integers.

incy
is the stride for global vector y.

Scope: global

Specified as: a fullword integer; incy = 1 or incy = M_X, where:

If incy = M_Y, then y is a row-distributed vector.

If incy = 1 and incy <> M_Y, then y is a column-distributed vector.

On Return

y
is the updated local part of the global matrix Y, containing the results of the computation.

Scope: local

Returned as: an LLD_Y by (at least) LOCq(N_Y) array, containing numbers of the data type indicated in Table 38.

Notes and Coding Rules
  1. These subroutines accept lowercase letters for the uplo argument.
  2. The matrix and vectors must have no common elements; otherwise, results are unpredictable.
  3. The imaginary parts of the diagonal elements of a complex Hermitian matrix A are assumed to be zero, so you do not have to set these values.
  4. The NUMROC utility subroutine can be used to determine the values of LOCp(M_) and LOCq(N_) used in the argument descriptions above. For details, see Determining the Number of Rows and Columns in Your Local Arrays and NUMROC--Compute the Number of Rows or Columns of a Block-Cyclically Distributed Matrix Contained in a Process.
  5. For suggested block sizes, see Coding Tips for Optimizing Parallel Performance.
  6. The following values must be equal: CTXT_A = CTXT_X = CTXT_Y.
  7. The global matrix A must be distributed using a square block-cyclic distribution; that is, MB_A = NB_A.
  8. The block row and block column offsets of the global matrix A must be equal; that is, mod(ia-1, MB_A) = mod(ja-1, NB_A).
  9. The vectors x and y must be distributed along the same axis--that is, they must both be row distributed or column distributed, where:
  10. If incx = M_X and incy = M_Y, then (in the process grid) the process column containing the first column of the submatrix A must also contain the first column of the submatrices X and Y; that is:
    iacol = ixcol
    iacol = iycol
    where:
    iacol = mod((((ja-1)/NB_A)+CSRC_A), q)
    ixcol = mod((((jx-1)/NB_X)+CSRC_X), q)
    iycol = mod((((jy-1)/NB_Y)+CSRC_Y), q)
  11. If incx = 1( <> M_X) and incy = 1( <> M_Y), then (in the process grid) the process row containing the first row of the submatrix A must also contain the first row of the submatrices X and Y; that is:
    iarow = ixrow
    iarow = iyrow
    where:
    iarow = mod((((ia-1)/MB_A)+RSRC_A), p)
    ixrow = mod((((ix-1)/MB_X)+RSRC_X), p)
    iyrow = mod((((iy-1)/MB_Y)+RSRC_Y), p)
  12. If incx = M_X:
  13. If incx = 1( <> M_X):
  14. If incy = M_Y:
  15. If incy = 1( <> M_Y):

Error Conditions

Computational Errors

None

Resource Errors

Unable to allocate work space

Input-Argument and Miscellaneous Errors

Stage 1 

  1. DTYPE_A is invalid.
  2. DTYPE_X is invalid.
  3. DTYPE_Y is invalid.

Stage 2 

  1. CTXT_A is invalid.

Stage 3 

  1. This subroutine was called from outside the process grid.

Stage 4 

  1. uplo <> 'U' or 'L'
  2. n < 0
  3. MB_X < 1
  4. NB_X < 1
  5. M_X < 0 and n = 0; M_X < 1 otherwise
  6. N_X < 0 and n = 0; N_X < 1 otherwise
  7. RSRC_X < 0 or RSRC_X >= p
  8. CSRC_X < 0 or CSRC_X >= q
  9. CTXT_A <> CTXT_X
  10. ix < 1
  11. jx < 1
  12. MB_Y < 1
  13. NB_Y < 1
  14. M_Y < 0 and n = 0; M_Y < 1 otherwise
  15. N_Y < 0 and n = 0; N_Y < 1 otherwise
  16. RSRC_Y < 0 or RSRC_Y >= p
  17. CSRC_Y < 0 or CSRC_Y >= q
  18. CTXT_A <> CTXT_Y
  19. iy < 1
  20. jy < 1
  21. RSRC_A < 0 or RSRC_A >= p
  22. CSRC_A < 0 or CSRC_A >= q
  23. M_A < 0 and (m = 0 and n = 0); M_A < 1 otherwise
  24. N_A < 0 and (m = 0 and n = 0); N_A < 1 otherwise
  25. NB_A < 1
  26. MB_A < 1
  27. ja < 1
  28. ia < 1

Stage 5 

  1. MB_A <> NB_A

    If n <> 0:

  2. ix > M_X
  3. jx > N_X
  4. iy > M_Y
  5. jy > N_Y
  6. ia+n-1 > M_A
  7. ja+n-1 > N_A

    If incx = M_X and incy = M_Y:

  8. NB_A <> NB_X
  9. MB_A <> NB_Y
  10. mod(jx-1, NB_X) <> mod(ja-1, NB_A)
  11. mod(jy-1, NB_Y) <> mod(ia-1, MB_A)
  12. n <> 0 and jx+n-1 > N_X
  13. n <> 0 and jy+n-1 > N_Y

    If incx = 1( <> M_X) and incy = 1( <> M_Y):

  14. NB_A <> MB_X
  15. MB_A <> MB_Y
  16. mod(ix-1, MB_X) <> mod(ja-1, NB_A)
  17. mod(iy-1, MB_Y) <> mod(ia-1, MB_A)
  18. n <> 0 and ix+n-1 > M_X
  19. n <> 0 and iy+n-1 > M_Y

    Otherwise:

  20. incx <> M_X and incx <> 1
  21. incy <> M_Y and incy <> 1

Stage 6 

  1. LLD_A < max(1, LOCp(M_A))
  2. LLD_X < max(1, LOCp(M_X))
  3. LLD_Y < max(1, LOCp(M_Y))
  4. mod(ia-1, MB_A) <> mod(ja-1, NB_A)
  5. If incx = M_X and incy = M_Y, then (in the process grid) the process column containing the first column of the submatrix A does not contain the first column of the submatrices X and Y; that is:
    ixcol <> iacol
    iycol <> iacol
    where:
    iacol = mod((((ja-1)/NB_A)+CSRC_A), q)
    ixcol = mod((((jx-1)/NB_X)+CSRC_X), q)
    iycol = mod((((jy-1)/NB_Y)+CSRC_Y), q)
  6. If incx = 1( <> M_X) and incy = 1( <> M_Y), then (in the process grid) the process row containing the first row of the submatrix A does not contain the first row of the submatrices X and Y; that is:
    ixrow <> iarow
    iyrow <> iarow
    where:
    iarow = mod((((ia-1)/MB_A)+RSRC_A), p)
    ixrow = mod((((ix-1)/MB_X)+RSRC_X), p)
    iyrow = mod((((iy-1)/MB_Y)+RSRC_Y), p)

Example 1

This example computes y = alphaAx+betay using a 2 × 2 process grid.

Call Statements and Input
 ORDER = 'R'
 NPROW = 2
 NPCOL = 2
 CALL BLACS_GET (0, 0, ICONTXT)
 CALL BLACS_GRIDINIT(ICONTXT, ORDER, NPROW, NPCOL)
 CALL BLACS_GRIDINFO(ICONTXT, NPROW, NPCOL, MYROW, MYCOL)
 
               UPLO   N    ALPHA    A  IA  JA    DESC_A   X   IX   JX
                |     |      |      |   |   |      |      |    |    |
 CALL PDSYMV(  'U'  , 8 ,  1.0D0  , A , 1 , 1 ,  DESC_A , X ,  1 ,  1 ,
 
              DESC_X   INCX    BETA    Y   IY   JY   DESC_Y   INCY
                |        |      |      |    |    |     |       |
              DESC_X ,   1  , 0.0D0  , Y ,  1 ,  1 , DESC_Y ,  1 )


Desc_A Desc_X Desc_Y
DTYPE_ 1 1 1
CTXT_ icontxt(IOBGC5) icontxt(IOBGC5) icontxt(IOBGC5)
M_ 8 8 8
N_ 8 1 1
MB_ 2 2 2
NB_ 2 1 1
RSRC_ 0 0 0
CSRC_ 0 0 0
LLD_ See below(EPSSLA5) See below(EPSSLA5) See below(EPSSLA5)

Notes:

  1. icontxt is the output of the BLACS_GRIDINIT call.

  2. Each process should set the LLD_ as follows:
    LLD_A = MAX(1,NUMROC(M_A, MB_A, MYROW, RSRC_A, NPROW))
    LLD_X = MAX(1,NUMROC(M_X, MB_X, MYROW, RSRC_X, NPROW))
    LLD_Y = MAX(1,NUMROC(M_Y, MB_Y, MYROW, RSRC_Y, NPROW))
    

    In this example, LLD_A = LLD_X = LLD_Y = 4 on all processes.

Global real symmetric matrix A of order 8 with block size 2 × 2:

B,D        0             1             2             3
     *                                                     *
 0   |  0.0 -1.0  |  -1.0  0.0  |   0.0  0.0  |   0.0  0.0 |
     |   .   1.0  |   0.0  1.0  |   0.0  1.0  |   0.0  1.0 |
     | -----------|-------------|-------------|----------- |
 1   |   .    .   |  -1.0 -1.0  |   0.0  0.0  |   1.0  0.0 |
     |   .    .   |    .  -1.0  |   1.0  1.0  |   0.0  1.0 |
     | -----------|-------------|-------------|----------- |
 2   |   .    .   |    .    .   |  -1.0  0.0  |   0.0  0.0 |
     |   .    .   |    .    .   |    .   1.0  |   0.0  0.0 |
     | -----------|-------------|-------------|----------- |
 3   |   .    .   |    .    .   |    .    .   |   0.0  0.0 |
     |   .    .   |    .    .   |    .    .   |    .   0.0 |
     *                                                     *

The following is the 2 × 2 process grid:

B,D  |   0 2   | 1 3 
-----| ------- |-----
0    |   P00   |  P01
2    |         |
-----| ------- |-----
1    |   P10   |  P11
3    |         |

Local arrays for A:

p,q  |          0           |           1
-----|----------------------|----------------------
     |  0.0 -1.0  0.0  0.0  |  -1.0  0.0  0.0  0.0
     |   .   1.0  0.0  1.0  |   0.0  1.0  0.0  1.0
 0   |   .    .  -1.0  0.0  |    .    .   0.0  0.0
     |   .    .    .   1.0  |    .    .   0.0  0.0
-----|----------------------|----------------------
     |   .    .   0.0  0.0  |  -1.0 -1.0  1.0  0.0
     |   .    .   1.0  1.0  |    .  -1.0  0.0  1.0
 1   |   .    .    .    .   |    .    .   0.0  0.0
     |   .    .    .    .   |    .    .    .   0.0

Global vector x of size 8 × 1 with block size 2:

B,D     0
     *      *
 0   |  1.0 |
     |  1.0 |
     | ---- |
 1   |  1.0 |
     |  1.0 |
     | ---- |
 2   |  1.0 |
     |  1.0 |
     | ---- |
 3   |  1.0 |
     |  1.0 |
     *      *

The following is the 2 × 2 process grid:

B,D  |    0    | --  
-----| ------- |-----
0    |   P00   |  P01
2    |         |
-----| ------- |-----
1    |   P10   |  P11
3    |         |

Local arrays for x:

p,q  |  0
-----|------
     |  1.0
     |  1.0
 0   |  1.0
     |  1.0
-----|------
     |  1.0
     |  1.0
 1   |  1.0
     |  1.0

Output:

Global vector y of size 8 × 1 with block size 2:

B,D     0
     *      *
 0   | -2.0 |
     |  3.0 |
     | ---- |
 1   | -2.0 |
     |  2.0 |
     | ---- |
 2   |  0.0 |
     |  3.0 |
     | ---- |
 3   |  1.0 |
     |  2.0 |
     *      *

The following is the 2 × 2 process grid:

B,D  |    0    | --  
-----| ------- |-----
0    |   P00   |  P01
2    |         |
-----| ------- |-----
1    |   P10   |  P11
3    |         |

Local arrays for y:

p,q  |  0
-----|------
     | -2.0
     |  3.0
 0   |  0.0
     |  3.0
-----|------
     | -2.0
     |  2.0
 1   |  1.0
     |  2.0

Example 2

This example computes y = alphaAx+betay using a 2 × 2 process grid.

Note:
The imaginary parts of the diagonal elements of a complex Hermitian matrix are assumed to be zero, so you do not have to set these values.

Call Statements and Input
 ORDER = 'R'
 NPROW = 2
 NPCOL = 2
 CALL BLACS_GET (0, 0, ICONTXT)
 CALL BLACS_GRIDINIT(ICONTXT, ORDER, NPROW, NPCOL)
 CALL BLACS_GRIDINFO(ICONTXT, NPROW, NPCOL, MYROW, MYCOL)
 
               UPLO   N    ALPHA    A  IA  JA    DESC_A   X   IX   JX
                |     |      |      |   |   |      |      |    |    |
 CALL PZHEMV(  'U'  , 6 ,  ALPHA  , A , 1 , 1 ,  DESC_A , X ,  1 ,  1 ,
 
              DESC_X   INCX    BETA    Y   IY   JY   DESC_Y   INCY
                |        |      |      |    |    |     |       |
              DESC_X ,   1  ,  BETA  , Y ,  1 ,  1 , DESC_Y ,  1 )
 
             ALPHA = (1.0,0.0)
 
             BETA  = (0.0,0.0)


Desc_A Desc_X Desc_Y
DTYPE_ 1 1 1
CTXT_ icontxt(IOBGC6) icontxt(IOBGC6) icontxt(IOBGC6)
M_ 6 6 6
N_ 6 1 1
MB_ 2 2 2
NB_ 2 1 1
RSRC_ 0 0 0
CSRC_ 0 0 0
LLD_ See below(EPSSLA6) See below(EPSSLA6) See below(EPSSLA6)

Notes:

  1. icontxt is the output of the BLACS_GRIDINIT call.

  2. Each process should set the LLD_ as follows:
    LLD_A = MAX(1,NUMROC(M_A, MB_A, MYROW, RSRC_A, NPROW))
    LLD_X = MAX(1,NUMROC(M_X, MB_X, MYROW, RSRC_X, NPROW))
    LLD_Y = MAX(1,NUMROC(M_Y, MB_Y, MYROW, RSRC_Y, NPROW))
    

    In this example, LLD_A = LLD_X = LLD_Y = 4 on P00 and P01 and LLD_A = LLD_X = LLD_Y = 2 on P10 and P11.

Global complex Hermitian matrix A of order 6 with block size 2 × 2:

B,D               0                         1                         2            
     *                                                                             *
 0   | ( 0.0, 0.0) (-1.0, 1.0) | (-1.0,-2.0) ( 0.0, 3.0) | ( 2.0, 1.0) ( 1.0, 0.0) |
     |      .      ( 2.0, 0.0) | ( 5.0, 4.0) ( 2.0, 0.0) | (-1.0,-1.0) ( 0.0, 2.0) |
     | ------------------------|-------------------------|-------------------------|
 1   |      .           .      | ( 0.0, 0.0) (-1.0, 0.0) | ( 0.0, 0.0) ( 1.0, 1.0) |
     |      .           .      |      .      ( 4.0, 0.0) | ( 2.0,-1.0) (-1.0,-1.0) |
     | ------------------------|-------------------------|-------------------------|
 2   |      .           .      |      .           .      | (-1.0, 0.0) ( 0.0, 2.0) |
     |      .           .      |      .           .      |      .      ( 1.0, 0.0) |
     *                                                                             *

The following is the 2 × 2 process grid for A:

B,D  |   0 2   |  1  
-----| ------- |-----
0    |   P00   |  P01
2    |         |
-----| ------- |-----
1    |   P10   |  P11

Local arrays for A:

p,q  |                        0                        |            1
-----|-------------------------------------------------|-------------------------
     | ( 0.0,  . ) (-1.0, 1.0) ( 2.0, 1.0) ( 1.0, 0.0) | (-1.0,-2.0) ( 0.0, 3.0)
     |      .      ( 2.0,  . ) (-1.0,-1.0) ( 0.0, 2.0) | ( 5.0, 4.0) ( 2.0, 0.0)
 0   |      .           .      (-1.0,  . ) ( 0.0, 2.0) |                           
     |      .           .           .      ( 1.0,  . ) |                          
-----|-------------------------------------------------|-------------------------
     |      .           .      ( 0.0, 0.0) ( 1.0, 1.0) | ( 0.0,  . ) (-1.0,  . )   
 1   |      .           .      ( 2.0,-1.0) (-1.0,-1.0) |      .      ( 4.0,  . )   

Global vector x of size 6 × 1 with block size 2:

B,D         0
     *             *
 0   | (-1.0, 1.0) |
     | ( 2.0, 1.0) |
     | ----------- |
 1   | ( 1.0, 2.0) |
     | (-2.0,-3.0) |
     | ----------- |
 2   | ( 0.0, 1.0) |
     | ( 1.0, 0.0) |
     *             *

The following is the 2 × 2 process grid:

B,D  |    0    | --  
-----| ------- |-----
0    |   P00   |  P01
2    |         |
-----| ------- |-----
1    |   P10   |  P11

Local arrays for x:

p,q  |      0
-----|-------------
     | (-1.0, 1.0)
     | ( 2.0, 1.0)
 0   | ( 0.0, 1.0)
     | ( 1.0, 0.0)
-----|-------------
     | ( 1.0, 2.0)
 1   | (-2.0,-3.0)

Output:

Global vector y of size 6 × 1 with block size 2:

B,D          0
     *               *
 0   | (  9.0, -7.0) |
     | (  0.0, 11.0) |
     | ------------- |
 1   | ( 16.0, -2.0) |
     | ( -2.0, -8.0) |
     | ------------- |
 2   | ( -5.0, -3.0) |
     | ( 12.0, -1.0) |
     *               *

The following is the 2 × 2 process grid:

B,D  |    0    | --  
-----| ------- |-----
0    |   P00   |  P01
2    |         |
-----| ------- |-----
1    |   P10   |  P11

Local arrays for y:

p,q  |       0
-----|---------------
     | (  9.0, -7.0)
     | (  0.0, 11.0)
 0   | ( -5.0, -3.0)
     | ( 12.0, -1.0)
-----|---------------
     | ( 12.0, -2.0)
 1   | ( -2.0, -8.0)


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]