共用方式為


MPI_Type_create_darray函式

建立代表分散式陣列的資料類型。

語法

int MPIAPI MPI_Type_create_darray(
        int                   size,
        int                   rank,
        int                   ndims,
        _In_count_(ndims) int array_of_gszies[],
        _In_count_(ndims) int array_of_distribs[],
        _In_count_(ndims) int array_of_dargs[],
        _In_count_(ndims) int array_of_psizes[],
        int                   order,
        MPI_Datatype          oldtype,
  _Out_ MPI_Datatype          *newtype
);

參數

  • size
    進程群組的大小。

  • rank
    在進程群組中排名。

  • ndims
    陣列維度數目以及處理方格維度。

  • array_of_gszies
    全域陣列每個維度中 oldtype 類型的元素數目。

  • array_of_distribs
    每個維度中的陣列分佈。

  • array_of_dargs
    每個維度中的散發引數。

  • array_of_psizes
    每個維度中的進程格線大小。

  • order
    陣列儲存順序旗標。

  • oldtype
    舊資料類型。

  • newtype [out]
    新的資料類型。

傳回值

傳回成功 時MPI_SUCCESS 。 否則,傳回值是錯誤碼。

在 Fortran 中,傳回值會儲存在 IERROR 參數中。

Fortran

    MPI_TYPE_CREATE_DARRAY(SIZE, RANK, NDIMS, ARRAY_OF_GSIZES,
            ARRAY_OF_DISTRIBS, ARRAY_OF_DARGS, ARRAY_OF_PSIZES, ORDER,
            OLDTYPE, NEWTYPE, IERROR)
        INTEGER SIZE, RANK, NDIMS, ARRAY_OF_GSIZES(*), ARRAY_OF_DISTRIBS(*),
        ARRAY_OF_DARGS(*), ARRAY_OF_PSIZES(*), ORDER, OLDTYPE, NEWTYPE, IERROR

規格需求

產品

HPC Pack 2012 MS-MPI 可轉散發套件、HPC Pack 2008 R2 MS-MPI 可轉散發套件、HPC Pack 2008 MS-MPI 可轉散發套件或 HPC Pack 2008 用戶端公用程式

標頭

Mpi.h;Mpif.h

媒體櫃

Msmpi.lib

DLL

Msmpi.dll

另請參閱

MPI 資料類型函式