Contiguous



next up previous contents
Next: Vector Up: Datatype Constructors Previous: Datatype Constructors

Contiguous

MPI_TYPE_CONTIGIOUS(count, oldtype, newtype)

   IN      count          replication count
   IN      oldtype        old  datatype
   OUT     newtype        new datatype
MPI_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype *newtype)

MPI_TYPE_CONTIGUOUS(COUNT, OLDTYPE, NEWTYPE, IERROR)INTEGER COUNT, OLDTYPE, NEWTYPE, IERROR

MPI_TYPE_CONTIGUOUS is the simplest datatype constructor. It constructs a typemap consisting of the replication of a datatype into contiguous locations. The argument newtype is the datatype obtained by concatenating count copies of oldtype. Concatenation is defined using extent(oldtype) as the size of the concatenated copies. The action of the Contiguous constructor is represented schematically in Figure gif.


Figure: Effect of datatype constructor MPI_TYPE_CONTIGUOUS.

In general, assume that the type map of oldtype is

with extent ex . Then newtype has a type map with count -n entries defined by:



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