Function PGABuildDatatypeHeader
Defined in File parallel.c
Function Documentation
-
int PGABuildDatatypeHeader(PGAContext *ctx, int p, int pop, int *counts, MPI_Aint *displs, MPI_Datatype *types)
Common part for building an MPI datatype for an individual.
Description
Returns by side effect a partially filled array of
counts
,displs
,types
. The returned index will be maxPGA_MPI_HEADER_ELEMENTS
. This means callers may use a statically allocated buffer.Example
PGAContext *ctx; int idx = 0; int counts [PGA_MPI_HEADER_ELEMENTS + ...]; int displs [PGA_MPI_HEADER_ELEMENTS + ...]; MPI_Datatype types [PGA_MPI_HEADER_ELEMENTS + ...]; ... idx = PGABuildDatatypeHeader (ctx, counts, displs, types); // Fill rest of counts, displs, types here and build datatype counts [idx] = displs [idx] = types [idx] = idx++; ...
- Parameters:
ctx – context variable
p – index of string
pop – symbolic constant of the population string p is in
counts – Number of elements in each block
displs – byte displacement array pointer
types – type elements
- Returns:
The index of the next-to-be-filled counts, displs, types