Next: Concurrent access to arrays.
Up: Language Binding
Previous: Multiple return values.
The proposed binding often omits array size arguments, because they can
be picked up within the function by reading the length member of
the array argument. A major exception is for message buffers, where
an explicit count is always given.
- Rationale. In the proposed binding, message buffers have explicit offset and
count arguments whereas other kinds of array argument typically
do not. Message buffers aside, typical array arguments to MPI
functions (eg, vectors of request structures) are small arrays. If
subsections of these must be passed to an MPI function, the sections
can be copied to smaller arrays at little cost. In contrast message
buffers are typically large and copying them is expensive, so it is
worthwhile to pass the extra arguments. Also, if derived data types
are being used, the required value of the count argument is
always different to the buffer length.(End of rationale.)