Vector



next up previous contents
Next: Hvector Up: Datatype Constructors Previous: Contiguous

Vector

MPI_TYPE_VECTOR(count, blocklength, stride, oldtype, newtype)

  IN        count             number of blocks
  IN        blocklength       number of elements in each block
  IN        stride            spacing between start of each block,
                              measured as number of elements
  IN        oldtype           old datatype
  OUT       newtype           new datatype
 
MPI_Type_vector(int count, int blocklength, int stride, MPI_Datatype oldtype, MPI_Datatype *newtype)

MPI_TYPE_VECTOR(COUNT, BLOCKLENGTH, STRIDE, OLDTYPE, NEWTYPE, IERROR)INTEGER COUNT, BLOCKLENGTH, STRIDE, OLDTYPE, NEWTYPE, IERROR

MPI_TYPE_VECTOR is a constructor that allows replication of a datatype into locations that consist of equally spaced blocks. Each block is obtained by concatenating the same number of copies of the old datatype. The spacing between blocks is a multiple of the extent of the old datatype. The action of the Vector constructor is represented schematically in Figure gif.

A call to MPI_TYPE_CONTIGUOUS(count, oldtype, newtype) is equivalent to a call to MPI_TYPE_VECTOR(count, 1, 1, oldtype, newtype), or to a call to MPI_TYPE_VECTOR(1, count, num, oldtype, newtype), with num arbitrary.



Jack Dongarra
Fri Sep 1 06:16:55 EDT 1995