/*D
   MPI_Type_hindexed - Creates an indexed datatype with offsets in bytes

Synopsis:
.vb
int MPI_Type_hindexed(int count, int array_of_blocklengths[],
                      MPI_Aint array_of_displacements[], MPI_Datatype oldtype,
                      MPI_Datatype *newtype)
.ve

Input Parameters:
+ count - number of blocks -- also number of entries in array_of_displacements and array_of_blocklengths (non-negative integer)
. array_of_blocklengths - number of elements in each block (non-negative integer)
. array_of_displacements - byte displacement of each block (integer)
- oldtype - old datatype (handle)

Output Parameters:
. newtype - new datatype (handle)

.N Removed
   The replacement for this routine is 'MPI_Type_create_hindexed'.

.N ThreadSafe

.N Fortran
The array_of_displacements are displacements, and are based on a zero origin.  A common error
is to do something like to following
.vb
    integer a(100)
    integer array_of_blocklengths(10), array_of_displacements(10)
    do i=1,10
         array_of_blocklengths(i)   = 1
10       array_of_displacements(i) = (1 + (i-1)*10) * sizeofint
    call MPI_TYPE_HINDEXED(10,array_of_blocklengths,array_of_displacements,MPI_INTEGER,newtype,ierr)
    call MPI_TYPE_COMMIT(newtype,ierr)
    call MPI_SEND(a,1,newtype,...)
.ve
expecting this to send "a(1),a(11),..." because the array_of_displacements have values
"1,11,...".   Because these are `displacements` from the beginning of "a",
it actually sends "a(1+1),a(1+11),...".

If you wish to consider the displacements as array_of_displacements into a Fortran array,
consider declaring the Fortran array with a zero origin
.vb
    integer a(0:99)
.ve

.N Errors
.N MPI_SUCCESS
.N MPI_ERR_OTHER

D*/

