MPI Derived Datatypes
MPI selected the latter approach. Why?
Idea: bundle all but the starting address into new MPI datatype
In effect, we are defining a struct during execution, rather than at compile time
More precisely, a gereral MPI datatype or derived datatype is a sequence of pairs {(t_0,d_0),(t_1,d_1),…,(t_n-1,d_n-1)} where each t_i is a basic MPI datatype and each d_i is a displacement in bytes
For get_data() we’d like to build the following derived datatype:
{(MPI_FLOAT,0),(MPI_FLOAT,16),(MPI_INT,24)}