Next: Start of message buffer.
Up: Language Binding
Previous: Restrictions on struct derived
Contents
The C and Fortran languages define a straightforward mapping
(or ``sequence association'') between their multidimensional
arrays and equivalent one-dimensional arrays. So in C or Fortran a
multidimensional array passed as a message buffer argument is first
interpreted as a one-dimensional array with the same element type as
the original multidimensional array. Offsets in the buffer (such as
offsets occuring in derived data types) are then interpretted in terms of
the effective one-dimensional array (or--equivalent up to a constant
factor--in terms of physical memory). In Java the relationship between
multidimensional arrays and one dimensional arrays is different.
An ``-dimensional array'' is equivalent to a one-dimensional array
of -dimensional arrays. In mpiJava,
message buffers are always one-dimensional arrays.
The element type may be an object, which may have array type.
Hence multidimensional arrays can appear as message buffers, but the
interpretation is subtly different. In distinction to the C or Fortran
case offsets in multidimensional message buffers are always
interpretted as offsets in the outermost one-dimensional array.
Next: Start of message buffer.
Up: Language Binding
Previous: Restrictions on struct derived
Contents
Bryan Carpenter
2002-07-12