29.01.2015 Views

Dr. David Cronk Innovative Computing Lab University of ... - It works!

Dr. David Cronk Innovative Computing Lab University of ... - It works!

Dr. David Cronk Innovative Computing Lab University of ... - It works!

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Datatype Constructors (cont)<br />

MPI_TYPE_CREATE_HINDEXED (count, blocklengths, displs,<br />

oldtype, newtype, ierr)<br />

Identical to MPI_TYPE_INDEXED except displacements are in bytes<br />

rather then elements<br />

Displs are <strong>of</strong> type MPI_Aint in C and<br />

integer(KIND=MPI_ADDRESS_KIND) in Fortran<br />

MPI_TYPE_CREATE_STRUCT (count, lengths, displs, types,<br />

newtype, ierr)<br />

› Used mainly for sending arrays <strong>of</strong> structures<br />

› count is number <strong>of</strong> fields in the structure<br />

› lengths is number <strong>of</strong> elements in each field<br />

› displs should be calculated (portability) and are <strong>of</strong> type MPI_Aint in<br />

C and integer(KIND=MPI_ADDRESS_KIND) in Fortran<br />

<strong>David</strong> <strong>Cronk</strong> 137

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!