Partager via


MPI_Type_create_struct fonction

Définit un nouveau type de données avec un type de données, un déplacement et une taille spécifiés pour chaque bloc de données.

Syntaxe

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
);

Paramètres

  • count
    Nombre de blocs et nombre d’entrées dans les paramètres array_of_blocklengths, array_of_displacements et array_of_types .

  • array_of_blocklengths
    Nombre d’éléments de chaque bloc.

  • array_of_displacements
    Déplacement de chaque bloc individuel en octets.

  • array_of_types
    Type de données de chaque bloc individuel.

  • newtype [out]
    Au retour, contient un handle MPI_Datatype qui représente le nouveau type de données.

Valeur retournée

Retourne MPI_SUCCESS en cas de réussite. Sinon, la valeur de retour est un code d’erreur.

Dans Fortran, la valeur de retour est stockée dans le paramètre IERROR .

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

Remarques

Cette fonction remplace la fonction MPI_Type_struct , qui est déconseillée.

Configuration requise

Produit

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

En-tête

Mpi.h ; Mpif.h

Bibliothèque

Msmpi.lib

DLL

Msmpi.dll

Voir aussi

Fonctions de type de données MPI

MPI_Type_indexed

MPI_Type_create_hindexed

MPI_Type_create_indexed_block