Freigeben über


MPI_Type_create_struct-Funktion

Definiert einen neuen Datentyp mit einem angegebenen Datentyp, einer angegebenen Verschiebung und einer angegebenen Größe für jeden Datenblock.

Syntax

int MPIAPI MPI_Type_create_struct(
        int                            count,
        _In_count_(count) int          array_of_blocklengths[],
        _In_count_(count) MPI_Aint     array_of_displacements[],
        _In_count_(count) MPI_Datatype array_of_types[],
  _Out_ MPI_Datatype                   *newtype
);

Parameter

  • count
    Die Anzahl der Blöcke und die Anzahl der Einträge in den Parametern array_of_blocklengths, array_of_displacements und array_of_types .

  • array_of_blocklengths
    Die Anzahl der Elemente jedes Blocks.

  • array_of_displacements
    Die Verschiebung jedes einzelnen Blocks in Bytes.

  • array_of_types
    Der Datentyp jedes einzelnen Blocks.

  • newtype [out]
    Enthält bei Rückgabe ein MPI_Datatype-Handle , das den neuen Datentyp darstellt.

Rückgabewert

Gibt MPI_SUCCESS nach Erfolg zurück. Andernfalls ist der Rückgabewert ein Fehlercode.

In Fortran wird der Rückgabewert im IERROR-Parameter gespeichert.

Fortran

    MPI_TYPE_CREATE_STRUCT(COUNT, ARRAY_OF_BLOCKLENGTHS, ARRAY_OF_DISPLACEMENTS, ARRAY_OF_TYPES, NEWTYPE, IERROR)
        COUNT, ARRAY_OF_BLOCKLENGTHS, ARRAY_OF_DISPLACEMENTS, ARRAY_OF_TYPES, NEWTYPE, IERROR

Hinweise

Diese Funktion ersetzt die MPI_Type_struct-Funktion , die veraltet ist.

Anforderungen

Produkt

HPC Pack 2012 MS-MPI Redistributable Package, HPC Pack 2008 R2 MS-MPI Redistributable Package, HPC Pack 2008 MS-MPI Redistributable Package oder HPC Pack 2008 Client Utilities

Header

Mpi.h; Mpif.h

Bibliothek

Msmpi.lib

DLL

Msmpi.dll

Weitere Informationen

MPI-Datentypfunktionen

MPI_Type_indexed

MPI_Type_create_hindexed

MPI_Type_create_indexed_block