Datatype
Date: 2015-04-18

mpi

## Class Datatype

- java.lang.Object
- - mpi.Datatype

-     public abstract class Datatype
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `baseType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Datatype()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `Commit()` Commit a derived datatype.
    `static Datatype` | `Contiguous(int count, Datatype oldtype)` 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.
    `void` | `finalize()`
    `void` | `free()`
    `int` | `getByteSize()`
    `int` | `getType()`
    `static Datatype` | `Hindexed(int[] array_of_blocklengths, int[] array_of_displacements, Datatype oldtype)` Identical to `indexed` except that the displacements are expressed directly in terms of the buffer index, rather than the units of the old type.
    `static Datatype` | `Hvector(int count, int blocklength, int stride, Datatype oldtype)` Identical to `vector` except that the stride is expressed directly in terms of the buffer index, rather than the units of the old type.
    `static Datatype` | `Indexed(int[] array_of_blocklengths, int[] array_of_displacements, Datatype oldtype)` 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.
    `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[] array_of_blocklengths, int[] array_of_displacements, Datatype[] array_of_types)` The most general type constructor.
    `int` | `Ub()` Find the upper bound of a datatype - the greatest value in its displacement sequence.
    `static Datatype` | `Vector(int count, int blocklength, int stride, Datatype oldtype)` Construct new datatype representing replication of old datatype into locations that consist of equally spaced blocks.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### baseType

          public int baseType

  - ### Constructor Detail

    - #### Datatype

          public Datatype()

  - ### Method Detail

    - #### getType

          public int getType()

    - #### getByteSize

          public int getByteSize()

    - #### Extent

          public int Extent()
                     throws MPIException

      Returns the extent of a datatype - the difference between upper and lower bound.

      returns: | datatype extent

      Java binding of the MPI operation `MPI_TYPE_EXTENT`.

      Throws:
        `MPIException`

    - #### Size

          public int Size()
                   throws MPIException

      Returns the total size of a datatype - the number of buffer elements it represents.

      returns: | datatype size

      Java binding of the MPI operation `MPI_TYPE_SIZE`.

      Throws:
        `MPIException`

    - #### Lb

          public int Lb()
                 throws MPIException

      Find the lower bound of a datatype - the least value in its displacement sequence.

      returns: | displacement of lower bound from origin

      Java binding of the MPI operation `MPI_TYPE_LB`.

      Throws:
        `MPIException`

    - #### Ub

          public int Ub()
                 throws MPIException

      Find the upper bound of a datatype - the greatest value in its displacement sequence.

      returns: | displacement of upper bound from origin

      Java binding of the MPI operation `MPI_TYPE_UB`.

      Throws:
        `MPIException`

    - #### Commit

          public void Commit()
                      throws MPIException

      Commit a derived datatype. Java binding of the MPI operation `MPI_TYPE_COMMIT`.
      Throws:
        `MPIException`

    - #### finalize

          public void finalize()
                        throws MPIException

      Overrides:
        `finalize` in class `java.lang.Object`
      Throws:
        `MPIException`

    - #### Contiguous

          public static Datatype Contiguous(int count,
                            Datatype oldtype)
                                     throws MPIException

      Construct new datatype representing replication of old datatype into contiguous locations.

      `count` | replication count
      `oldtype` | old datatype
      returns: | new datatype

      Java binding of the MPI operation `MPI_TYPE_CONTIGUOUS`.

      The base type of the new datatype is the same as the base type of `oldtype`.

      Throws:
        `MPIException`

    - #### Vector

          public static Datatype Vector(int count,
                        int blocklength,
                        int stride,
                        Datatype oldtype)
                                 throws MPIException

      Construct new datatype representing replication of old datatype into locations that consist of equally spaced blocks.

      `count` | number of blocks
      `blocklength` | number of elements in each block
      `stride` | number of elements between start of each block
      `oldtype` | old datatype
      returns: | new datatype

      Java binding of the MPI operation `MPI_TYPE_VECTOR`.

      The base type of the new datatype is the same as the base type of `oldtype`.

      Throws:
        `MPIException`

    - #### Hvector

          public static Datatype Hvector(int count,
                         int blocklength,
                         int stride,
                         Datatype oldtype)
                                  throws MPIException

      Identical to `vector` except that the stride is expressed directly in terms of the buffer index, rather than the units of the old type.

      `count` | number of blocks
      `blocklength` | number of elements in each block
      `stride` | number of elements between start of each block
      `oldtype` | old datatype
      returns: | new datatype

      Java binding of the MPI operation `MPI_TYPE_HVECTOR`.

      Unlike other language bindings, the value of `stride` is not measured in bytes.

      Throws:
        `MPIException`

    - #### Indexed

          public static Datatype Indexed(int[] array_of_blocklengths,
                         int[] array_of_displacements,
                         Datatype oldtype)
                                  throws MPIException

      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.

      `array_of_blocklengths` | number of elements per block
      `array_of_displacements` | displacement of each block in units of old type
      `oldtype` | old datatype
      returns: | new datatype

      Java binding of the MPI operation `MPI_TYPE_INDEXED`.

      The number of blocks is taken to be size of the `array_of_blocklengths` argument. The second argument, `array_of_displacements`, should be the same size. The base type of the new datatype is the same as the base type of `oldtype`.

      Throws:
        `MPIException`

    - #### Hindexed

          public static Datatype Hindexed(int[] array_of_blocklengths,
                          int[] array_of_displacements,
                          Datatype oldtype)
                                   throws MPIException

      Identical to `indexed` except that the displacements are expressed directly in terms of the buffer index, rather than the units of the old type.

      `array_of_blocklengths` | number of elements per block
      `array_of_displacements` | displacement in buffer for each block
      `oldtype` | old datatype
      returns: | new datatype

      Java binding of the MPI operation `MPI_TYPE_HINDEXED`.

      Unlike other language bindings, the values in `array_of_displacements` are not measured in bytes.

      Throws:
        `MPIException`

    - #### Struct

          public static Datatype Struct(int[] array_of_blocklengths,
                        int[] array_of_displacements,
                        Datatype[] array_of_types)
                                 throws MPIException

      The most general type constructor.

      `array_of_blocklengths` | number of elements per block
      `array_of_displacements` | displacement in buffer for each block
      `array_of_types` | type of elements in each block
      returns: | new datatype

      Java binding of the MPI operation `MPI_TYPE_STRUCT`.

      The number of blocks is taken to be size of the `array_of_blocklengths` argument. The second and third arguments, `array_of_displacements`, and `array_of_types`, should be the same size. Unlike other language bindings, the values in `array_of_displacements` are not measured in bytes. All elements of `array_of_types` with definite base types must have the same base type: this will be the base type of new datatype.

      Throws:
        `MPIException`

    - #### free

          public void free()