ibis.mpj
Class Datatype

java.lang.Object
  extended by ibis.mpj.Datatype
All Implemented Interfaces:
Serializable

public class Datatype
extends Object
implements Serializable

Organisation of primitive and derived datatypes.

See Also:
Serialized Form

Method Summary
 void commit()
           NOT IMPLEMENTED YET.
 Datatype contiguous(int count)
          Construct new datatype representing replication of old datatype into contiguous locations.
 int extent()
          Returns the extent of a datatype - the difference between upper and lower bound.
 Datatype hindexed(int[] arrayofBlocklengths, int[] arrayofDisplacements)
           NOT IMPLEMENTED YET.
 Datatype hvector(int count, int blocklength, int stride)
           NOT IMPLEMENTED YET.
 Datatype indexed(int[] arrayofBlocklengths, int[] arrayofDisplacements)
           NOT IMPLEMENTED YET.
 int lb()
          Find the lower bound of a datatype - the least value in its displacement sequence.
 int size()
          Returns the total size of a datatype - the number of buffer elements it represents.
static Datatype struct(int[] arrayofBlocklengths, int[] arrayofDisplacements, Datatype[] arrayOfTypes)
           NOT IMPLEMENTED YET.
 int ub()
          Find the upper bound of a datatype - the greatest value in its displacement sequence.
 Datatype vector(int count, int blocklength, int stride)
           NOT IMPLEMENTED YET.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

contiguous

public Datatype contiguous(int count)
Construct new datatype representing replication of old datatype into contiguous locations.

Parameters:
count - replication count
Returns:
new datatype

vector

public Datatype vector(int count,
                       int blocklength,
                       int stride)
                throws MPJException
NOT IMPLEMENTED YET. Construct new datatype representing replication of old datatype into locations that consist of equally spaced blocks.

Parameters:
count - number of blocks
blocklength - number of elements in each block
stride - number of elements between start of each block
Returns:
new datatype
Throws:
MPJException

hvector

public Datatype hvector(int count,
                        int blocklength,
                        int stride)
                 throws MPJException
NOT IMPLEMENTED YET. Identical to vector except that the stride is expressed directly in terms of the buffer index, rather than the units of the old type.

Parameters:
count - number of blocks
blocklength - number of elements in each block
stride - number of elements between start of each block
Returns:
new datatype
Throws:
MPJException

indexed

public Datatype indexed(int[] arrayofBlocklengths,
                        int[] arrayofDisplacements)
                 throws MPJException
NOT IMPLEMENTED YET. Construct new datatype representing replication of old datatype into a sequence of blocks where each block can contain a different number of copies and have a different displacement.

Parameters:
arrayofBlocklengths - number of elements per block
arrayofDisplacements - displacement of each block in units of old type
Returns:
new datatype
Throws:
MPJException

hindexed

public Datatype hindexed(int[] arrayofBlocklengths,
                         int[] arrayofDisplacements)
                  throws MPJException
NOT IMPLEMENTED YET. Identical to indexed except that the displacements are expressed directly in terms of the buffer index, rather than the units of the old type.

Parameters:
arrayofBlocklengths - number of elements per block
arrayofDisplacements - displacement in buffer for each block
Returns:
new datatype
Throws:
MPJException

struct

public static Datatype struct(int[] arrayofBlocklengths,
                              int[] arrayofDisplacements,
                              Datatype[] arrayOfTypes)
                       throws MPJException
NOT IMPLEMENTED YET. The most general type constructor.

Parameters:
arrayofBlocklengths - number of elements per block
arrayofDisplacements - displacement in buffer for each block
arrayOfTypes - type of elements in each block
Returns:
new datatype
Throws:
MPJException

extent

public int extent()
Returns the extent of a datatype - the difference between upper and lower bound.

Returns:
datatype extent

lb

public int lb()
       throws MPJException
Find the lower bound of a datatype - the least value in its displacement sequence.

Returns:
displacement of lower bound from origin
Throws:
MPJException

ub

public int ub()
       throws MPJException
Find the upper bound of a datatype - the greatest value in its displacement sequence.

Returns:
displacement of upper bound from origin
Throws:
MPJException

size

public int size()
Returns the total size of a datatype - the number of buffer elements it represents.

Returns:
datatype size

commit

public void commit()
            throws MPJException
NOT IMPLEMENTED YET. Commit a derived datatype.

Throws:
MPJException


The Ibis project